Find the answer to your Linux question:
Results 1 to 3 of 3
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Unhappy How NOT to Require CHMOD 755 Permissions To Create, Write and Delete Files with PHP?


    On my previous server and on some other hosts, I was able to write to files (for example with PHP) without having to chmod the files first.

    Now I cannot, and files are required to be chmoded properly so I can write to them.

    I cannot even touch() a file with PHP.

    Is there any way to have this permissions removed?

    I don't want to chmod the all thing, all I want is to change the configurations so I can fwrite() or file_put_contents() normally.

    I's a dedicated un-managed server, so basically any advanced configurations can be done.

    Please help!

    Thank you in advance!

  2. #2
    Just Joined! cheapscotchron's Avatar
    Join Date
    Dec 2008
    swamps of jersey
    There are several ways to accomplish this. A combination of using groups and proper default file permissions should work.

    Set the default file permissions (using umask) you want for the php process owner, then ensure that the process owner is in the same group as the owner of the directory you are trying to write to.

  3. #3
    Thank you very much for your reply cheapscotchron
    I'll try that.

  4. $spacer_open

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts