777 permissions required on uploads and other folders?

Help with getting the CMS CORE package up and running. This does not include 3rd party modules, PHP scripts, anything downloaded via module manager or from any external source.
Locked
lucia22
Forum Members
Forum Members
Posts: 47
Joined: Tue Jul 20, 2010 11:03 am

777 permissions required on uploads and other folders?

Post by lucia22 »

After having our server hacked over the weekend I have been told to tighten up all security on our web server ensuring all directories are not world writeable. I have tried changing the permissions for the uploads, images and modules folder however I get an error when trying to upload to it. From other posts i have read it does advise not to set as 777 as this is a security risk, are there any other alternatives or does anyone have any suggestions how I can work around this?
Wishbone
Power Poster
Power Poster
Posts: 1368
Joined: Tue Dec 23, 2008 8:39 pm

Re: 777 permissions required on uploads and other folders?

Post by Wishbone »

I chmod 755 on all core CMS directories and leave "uploads", "tmp" and "cache", etc. open. I don't see any way around your issue. If you're really paranoid, you can lock it down, and open it when you need to upload data, then lock it back down again. If your server was hacked as "root", no permissions would stop it.
Last edited by Wishbone on Fri Nov 12, 2010 1:08 am, edited 1 time in total.
Wishbone
Power Poster
Power Poster
Posts: 1368
Joined: Tue Dec 23, 2008 8:39 pm

Re: 777 permissions required on uploads and other folders?

Post by Wishbone »

I just checked something on my host (godaddy.. don't ask :().. It seems that the process is being run as myself (not 'nobody' or 'web' or something else)... My PHP scripts are able to chmod my own files.. I think that this is bad. If someone was able to sneak a PHP script on my system, the script can change the permissions to my files that I've locked down, then make edits.

I just checked HostGator.. Seems to be the same. Locking down permissions would help some cases, but any PHP script that finds it's way onto your system can do anything it wants to, regardless of the permissions you set.
Last edited by Wishbone on Fri Nov 12, 2010 2:28 am, edited 1 time in total.
Locked

Return to “[locked] Installation, Setup and Upgrade”