View previous topic :: View next topic |
Author |
Message |
beerli n00b
Joined: 18 Apr 2004 Posts: 9 Location: vienna/austria
|
Posted: Mon Oct 24, 2005 4:51 pm Post subject: default homedir permissions |
|
|
I'm using useradd and /etc/skel for a default homedir design.
does anyone know how to set the default mask of a homedir created by useradd to 600 instead of 755?
is there a option to set in /etc/default/useradd?
thanks. |
|
Back to top |
|
|
nixnut Bodhisattva
Joined: 09 Apr 2004 Posts: 10974 Location: the dutch mountains
|
Posted: Mon Oct 24, 2005 4:54 pm Post subject: |
|
|
Moved from Installing Gentoo to Other Things Gentoo.
Not an installation question. _________________ Please add [solved] to the initial post's subject line if you feel your problem is resolved. Help answer the unanswered
talk is cheap. supply exceeds demand |
|
Back to top |
|
|
ohyeah1942 n00b
Joined: 21 Mar 2004 Posts: 68
|
Posted: Tue Oct 25, 2005 5:35 am Post subject: |
|
|
well, you can change the umask in i think /etc/profile
That will let you set the default permissions that new files and directories are created with.
However I'm not sure thats what you want to do, as it would affect your entire system not just your home directoreis.
This is also a question I have. I hope you get a reply, I never really did. |
|
Back to top |
|
|
piwacet Guru
Joined: 30 Dec 2004 Posts: 486
|
Posted: Mon Dec 12, 2005 6:07 pm Post subject: |
|
|
To change the default permissions when I log in to my user account, I've edited ~/.bashrc and added:
at the end. This seems to set the default file and directory permissions I want, and so far is working.
Note that the first time you do this you must log out and log back in to have this take effect.
Also note this changes the default permissions of your session, no matter which directory you are working in. Since my user almost always uses files in the user home directory, this works fine. But when you su root, these new permissions will still be in effect (which I did not want). I wanted whatever work I do as root to have gentoo's default permissions, so I added to my /root/.bashrc:
Code: | source /etc/profile |
Thus, when I su to root, gentoo's default permissions are in effect. When I exit from the root shell, the umask 077 permissions resume.
HTH |
|
Back to top |
|
|
hayalci n00b
Joined: 18 Jul 2004 Posts: 44
|
Posted: Tue Mar 21, 2006 4:14 pm Post subject: |
|
|
You can have a look at /etc/login.defs |
|
Back to top |
|
|
|