O'Reilly logo

Linux and Unix Shell Programming by David Tansley

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

1.8. umask

When you initially log in to the system a command called umask sets your default file creation mode. This command is actually the opposite of the chmod command! Your system administrator should have set this to a reasonable value so when you create files users who are not members of your group will not be able to write to them.

When you are in the shell you can use umask to alter the creation mode of files to your personal preference. This change is effective until you either log out or manually issue another umask command.

Generally, the umask is set in the /etc/profile file, which is the file everybody gets, so if you want to change the umask for everyone put an entry in that file. If you want to set it permanently for your own ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required