PDA

View Full Version : File permission help



WebWatcher
March 27th, 2010, 17:33
I have a VPS and when i upload files it automatically does the file permissions as 644! (Which is no good when using most php scripts!!)

Is there a way to change it so it automatically changes hem to 744 or 755??

Thanks in advance

Tracker
March 27th, 2010, 22:27
There probably is I just don't know how to but... if you go in via ssh and want to change all the files in say public_html to 777 then do the following

navigate to the folder ABOVE public_html (i.e. /home/user/)

chmod 777 public_html -R

the -R will make sure all files folders and sub folders are 777

:)

Dynash
March 27th, 2010, 22:32
Just remember though... if you need to change permissions on certain files, only change them, not globally.

aloycasmir
March 28th, 2010, 02:46
Make sure you don't have suPHP which requires any executable scripts to have 644 permissions and all folders to have 755 permissions . If you change this it won't work .

Again , if you don't use suPHP , change it to 777 . If your scripts don't work , change the permissions as stated above .

Best Regards,
Aloycasmir

themoose
March 29th, 2010, 07:16
Also try looking at the settings in your FTP program.