Does php.ini support upload permissions?
Posted 05 May 2006 - 03:54 PM
I am having a difficult time finding the solution to this, and as far as I can tell, it's not even implemented -- this is where I think I am wrong.
I am trying to set the default permissions from file uploads through php files to 666 (I think), rather than 644 (as I believe the default setting is at the present).
The only related directive in php.ini that I can see is:
file_uploads = On
Where can I set the default upload permissions for php-uploaded files? I can't find this on httpd.conf and I certainly do not see any functionality with php.ini.
Thanks in advance!
Posted 05 May 2006 - 04:01 PM
One solution may be to change the permissions on the files straight after the upload with the chmod() function.
Posted 05 May 2006 - 04:21 PM
Thanks for your reply. The issue is that I have many domains to maintain and it would be a continuous battle to chmod the files -- and then having to deal with changing the permissions once again (I've noticed that the behavior of permissions is not stable).
That is why I am looking for universal support for such an issue -- but it seems that it is missing.
If anyone does know how to do this -- if it's possible, I'd love to hear how.
Posted 05 May 2006 - 06:07 PM
And I have to disagree with your statement that "the behavior of permissions is not stable".
Info: PHP Manual
Posted 05 May 2006 - 06:51 PM
Perhaps I should have been more clearer. I guess I was comparing apples to oranges, since the behavior of the permissions is not stable when uploading via the ProFTPD server, but I guess it's not the same via the creation of PHP files through scripts.
Let me add that I'm not a PHP programmer; I am an admin on the server. I see what you are suggesting regarding implementation but unfortunately I will not know how to do it myself, so I'll try to ask someone who knows better how do this.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users