Results 1 to 3 of 3
Hi!
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 ...
- 12-30-2008 #1Just Joined!
- Join Date
- Dec 2008
- Posts
- 4
How NOT to Require CHMOD 755 Permissions To Create, Write and Delete Files with PHP?
Hi!
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!
- 12-31-2008 #2
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.
- 01-01-2009 #3Just Joined!
- Join Date
- Dec 2008
- Posts
- 4
Thank you very much for your reply cheapscotchron

I'll try that.


Reply With Quote
