Is it possible to create default file permissions?
Hello! I use windows emulation so I can use Dreamweaver and graphics apps for some webpage design. Unfortunately, when I save them, Linux creates permissions that, when uploaded to the web server, make them unaccessible to everybody.
I've been manually changing files using chmod 744 filename.ext but I'd like to eliminate this step if possible. Can this be done? Thx much! |
Depending on your distro, check your /etc/profile or ~/.bashrc or ~/.bash_profile for your umask setting. I've never changed the default, and I'm not an expert at the umask and mode settings, so I can't think offhand what the umask setting would be to create mode 744 files by default.
The default umask=022 creates files with mode 644 (ie. files are 666 by default, subtract the umask, and you have 644). However, you probably shouldn't change the settings. The inconvenience you experience is actually a security feature. You should probably just create your files in a given directory (eg /webfiles), then recursively chmod them all ie. chmod -R 744 /webfiles |
Thanks!! For instructions, advice, and links! I hadn't thought of the access as a security feature (one 'duh' to me...), at least from the perspective of if a hacker broke into my system via the internet...
|
You should also read up on these additional threads:
Permissions problem setting umask that affects all programs |
All times are GMT -5. The time now is 05:40 AM. |