PDA

View Full Version : uploaded files have the permissions: 600



extor
10-31-2005, 11:17 AM
Hello,

Since I have installed suPHP om my server all files (images) that have been uploaded (with a PHP script) get automaticly the 600 file permissions.

While a image get 600 it won't be visible to visitors of the website so the image must be chmod'ed to 644.

Is there a file/manner to set somewhere that files that being uploaded have the 644 instead of the 600 permissies, like you can do it for the public_html (http://www.directadmin.com/features.php?id=497)?

Thanks in advance!

duke28
03-11-2006, 06:25 PM
i have the same problem ( with suphp )

all avatar uploaded by forum.. the avatar get the mod 600

so he cannot to be view on the web

any idea ?

illogix
03-12-2006, 08:30 PM
You need to setup the umask to set the default permissions on file creation.

duke28
03-12-2006, 09:54 PM
ok how ?

illogix
03-13-2006, 08:27 AM
Put:


umask=0022

in suphp.conf

duke28
03-13-2006, 02:12 PM
i dont have any files suphp.conf in /etc

so i create a new one with just this line ?

illogix
03-14-2006, 06:51 PM
suphp.conf should come with suphp. Where did you install suphp ?

duke28
03-14-2006, 10:24 PM
in /root/suphp-0.5

illogix
03-15-2006, 06:03 AM
Then I guess suphp.conf will be located at /root/suphp-0.5/etc/suphp.conf

LionRock
06-03-2007, 03:45 AM
My 2 cents here. If I upload files with DA (or if I extract tar package or move files or copy files with DA) the permissions are wrong. Permission are set to user:user 755 and the page is not working. If I upload files through ftp then all is ok and permission are set to user:apache 644 -> files and 755 ->directory's. So if users use DA file manager and try to move or copy files then their permissions messes up. Is there any fix for that or this is normal ? :rolleyes:

Regards

future assassin
06-04-2007, 09:03 PM
I've see and read about the 600 persmissions with certain scripts. For me it was using Xinha editor with Etomite or WebsiteBaker. Part of it was solved by having Xinha change the file permissions after upload. But there where other problems with Xinah creating preview thumbnails.

Eventually I switched to FCK Editor and this script file uploads worked correctly with 644 permissions set to uploaded files.