Portal Home > Knowledgebase > Articles Database > Default file permissions for uploaded files?


Default file permissions for uploaded files?




Posted by waya, 07-12-2013, 01:01 PM
I have two centos servers. One has cpanel, the other doesn't. I notice that when I upload/create folders and files on the server with cpanel, the permissions are 755/644 respectively, but on the other server they are 775/664. I checked the umask of each and they are the same (0002). Does anyone else know what could be causing this? I prefer it to be 755 and 644.

Posted by FLDataTeK, 07-12-2013, 01:16 PM
You can set the default file permissions of uploaded files typically in the config of the FTP server software you are using.

Posted by waya, 07-12-2013, 01:36 PM
I actually tried looking for such a setting earlier, but couldn't find it. I'm on linux using filezilla. Although considering I'm using the same software to upload to both servers and the permissions end up different, it would indicate the cause is elsewhere I think. I actually just googled that umask of 002 or 0002 should result in 775 and 664. So how is the cpanel server able to get 755/644 instead?

Posted by monitorscout, 07-13-2013, 05:15 AM
775 = 111111101 = rwxrwxr-x , ie, owner and group have all permits and all other users only read and execute. So it supposed to be changed as it is not secured. I do believe that can log into your web hosting panel and change the file permission from there even if you don't have the cPanel for that certain one.

Posted by waya, 07-13-2013, 01:20 PM
I ended up adding umask 022 to my ~/.bashrc which seems to be working fine. Although weird thing is on the cpanel server I checked all the bashrc, bash profile, etc. files and didn't see it. Well I guess I will leave that for now since it's working.



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
Setup DNS (Views: 778)
httpd failed (Views: 750)
what about hosting24-7 (Views: 750)
Unlimited (Views: 1006)


Language:

LoadingRetrieving latest tweet...

Back to Top Copyright © 2018 DC International LLC. - All Rights Reserved.