tami Posted May 5, 2006 Share Posted May 5, 2006 Hi,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 = OnWhere 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! :) Quote Link to comment https://forums.phpfreaks.com/topic/9138-does-phpini-support-upload-permissions/ Share on other sites More sharing options...
zq29 Posted May 5, 2006 Share Posted May 5, 2006 I don't think you can do this with the php.ini nor the httpd.conf file. You [i]may[/i] be able to do it with a .htaccess but I don't know.One solution may be to change the permissions on the files straight after the upload with the chmod() function. Quote Link to comment https://forums.phpfreaks.com/topic/9138-does-phpini-support-upload-permissions/#findComment-33621 Share on other sites More sharing options...
tami Posted May 5, 2006 Author Share Posted May 5, 2006 SemiApocalyptic: 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.Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/9138-does-phpini-support-upload-permissions/#findComment-33628 Share on other sites More sharing options...
ober Posted May 5, 2006 Share Posted May 5, 2006 I don't understand how chmodding would be an issue for you at all. You wouldn't have to do it manually... you can use PHP to chmod the files after they're uploaded.And I have to disagree with your statement that "the behavior of permissions is not stable". Quote Link to comment https://forums.phpfreaks.com/topic/9138-does-phpini-support-upload-permissions/#findComment-33659 Share on other sites More sharing options...
tami Posted May 5, 2006 Author Share Posted May 5, 2006 ober:Perhaps I should have been more clearer. I guess I was comparing apples to oranges, since the behavior of the permissions is not stable [b]when uploading via the ProFTPD server[/b], 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.Thanks. :) Quote Link to comment https://forums.phpfreaks.com/topic/9138-does-phpini-support-upload-permissions/#findComment-33678 Share on other sites More sharing options...
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.