I want to modify the permissions for a user with the command umask
but I don't know if I have to put this in the file, /bashrc
for example:
umask 022 díaz
Where diaz is the user.
I want to modify the permissions for a user with the command umask
but I don't know if I have to put this in the file, /bashrc
for example:
umask 022 díaz
Where diaz is the user.
lazy solution
Add the following code to the end of the file
(/home/usuario/.bashrc)
of the user in question. If the file does not exist, you can create it from scratch:Explanation
OSs do not distinguish by user. You must adopt a user customization shortcut.
/etc/login.defs
and put the mask you want, but it will apply to all users equally. Solution not recommendedpam_umask.so
You could customize the PAM service file . Advanced solution and not recommended either.In programming, the term
lazy
/perezos@
programming of a solution is often used, which is functional but not recommended. In your case, if it works for you, go ahead.Also know:
.bashrc
consola
one used, if you change for example tozsh
you will have to edit.zshrc