PDA

View Full Version : [ubuntu] Auto chmod file to 0755



neomaximus2k
February 20th, 2009, 08:46 PM
hey guys, quick question I code several sites on my acer aspire one notebook running ubuntu (Also have an ubuntu server with the same problem), basicly I wasnt to auto set file permissions on every .php file and directory within the /var/www directory to 0755, by default they chmod to some weird number and naturally generate a "Permission Denied" error message which means I have to go into terminal and chmod which I dont want to do all the time as it gives me a major headache especially when doing advanced coding.

Can anyone suggest a method of doing this?

Thanks in advanced

bodhi.zazen
February 21st, 2009, 12:09 AM
When working with these files, set umask to 022, which should be the default


umask 022

Or you can set your umask in .bashrc if you want to change your "default" behavior.