Mittwoch, 25. April 2012

Preparing LPIC-1, #7 umask

The command 'umask' sets the default permissions on files and directories. The umask itself is specified as digits which are subtracted from the standard permissions maks, which is
  • 666 for files (that is rw-rw-rw-),  and
  • 777 for directories (that is rwxrwxrwx)
So if 'umask 002'  is specified, files will have standard permissins of 664 and directories will have 775.

'umask' without any parameters displays the currently set umask. If you give a parameter, 'umask' will interpret it as a umaks and set it. Thus you can change your umask by putting something like 'umask 022' in your .profile.

Keine Kommentare:

Kommentar veröffentlichen