Jump to content

newbie question : php writing to counter txt file ...


Recommended Posts

Posted

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

Posted

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.

Posted

I've yet to encounter a situation where that last 7 isn't a configuration error.

Posted

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).

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...