How can I set the permission on the home directory when creating an user
Hi all.
Both creating an user with useradd and with smc, the newly created directory has permissions 755, that is, the default umask 022 has been used. Is there a way to change this behavior (I want a 700 permission on user home directories)? Bye, Enrico. |
Yes you can change the umask. Dont remember how. Is there a "umask" command?
|
Yes, umask can be changed (with the umask command, too). But I wanted to change the umask as a last resource: moreover, it should be changed only when creating user... Is there any useradd related option?
|
There is no useradd option for setting permissions. The home directory is created with 0755 permissions. This is hardcoded in the command source code.
Of course, the current shell umask can limit these permissions. You can use Code:
(umask 0077;useradd ...) |
Thanks jlliagre.
Strange choice, isn't it? By default, and in most of the cases, I wouldn't like my home directory to be world readable! Quote:
Thanks, as always. Enrico |
All times are GMT -5. The time now is 11:17 AM. |