Results 1 to 10 of 11
I am using Fedora Core 4. By default, when I create a new file, it is given permissions of -rw-rw-r-- for files, and drwxrwxr-x for directories. Is there any way ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 11-10-2005 #1Just Joined!
- Join Date
- Oct 2005
- Location
- Pennsylvania, USA
- Posts
- 27
Default file permissions
I am using Fedora Core 4. By default, when I create a new file, it is given permissions of -rw-rw-r-- for files, and drwxrwxr-x for directories. Is there any way to change my settings so that files have default permissions of -rw-r--r-- and directories have default permissions of drwxr-xr-x?
- 11-11-2005 #2Linux Enthusiast
- Join Date
- Aug 2005
- Location
- Hell
- Posts
- 514
Change your umask from 0002 to 0022:
Code:umask 0022
- 11-11-2005 #3Just Joined!
- Join Date
- Oct 2005
- Location
- Pennsylvania, USA
- Posts
- 27
That works great, but it doesn't seem to stick once I close the terminal; is there any way to make it permanent?
- 11-11-2005 #4Linux Engineer
- Join Date
- Jan 2005
- Location
- Chicago (USA)
- Posts
- 1,028
Put it in /etc/profile.
- 11-12-2005 #5Just Joined!
- Join Date
- Oct 2005
- Location
- Pennsylvania, USA
- Posts
- 27
I did that, and then I logged out and logged back in to test it, but that didn't work...
Originally Posted by a thing
- 11-12-2005 #6Linux Engineer
- Join Date
- Feb 2005
- Posts
- 1,044
bash uses /etc/bashrc, not /etc/profile. I'd suggest putting it in the .bash_profile in your home directory.
- 11-12-2005 #7Just Joined!
- Join Date
- Oct 2005
- Location
- Pennsylvania, USA
- Posts
- 27
I put it in .bash_profile, logged out and logged back in to test, and it didn't work either.
Originally Posted by scm
- 11-17-2005 #8Just Joined!
- Join Date
- Oct 2005
- Location
- Pennsylvania, USA
- Posts
- 27
Anyone have any ideas? I tried putting it in ~/.bashrc, as well, and that didn't work.
- 11-17-2005 #9Linux Engineer
- Join Date
- Jan 2005
- Location
- Chicago (USA)
- Posts
- 1,028
Are you even using Bash?
- 11-17-2005 #10Just Joined!
- Join Date
- Oct 2005
- Location
- Pennsylvania, USA
- Posts
- 27
Yes.



