smarch291 Posted February 22, 2015 Posted February 22, 2015 hi ! I'm new here. I'm from Montreal, Canada. I have a problem with chmod 777 text.txt why read write is not enough for a simple text counter in php ? thanks for any answer! Steph Quote
THCMinister Posted February 22, 2015 Posted February 22, 2015 If you could post your code snippet that handles the counter. Quote
digip Posted February 23, 2015 Posted February 23, 2015 Also, are you trying a chmod on a file that doesn't exist? You should be able to write to a file that isn't 0777. It only needs 0644 if you're the owner of the file, so permissions are probably not the issue, but without your code, hard to say. Ownership of the directory also come into play, not just file permissions, but again, lets see the code first to see if there is something there that is the culprit. Quote
cooper Posted February 23, 2015 Posted February 23, 2015 I've yet to encounter a situation where that last 7 isn't a configuration error. Quote
Jason Cooper Posted February 23, 2015 Posted February 23, 2015 Did you get any errors in your logs? Personally my money's on SELinux blocking httpd writing to an executable file. You'll probably find that your counter file will work fine with permissions of 666 or, even better, 600 (assuming you've got the owner of the file correct). Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.