SES by degreeadvantage.com

Thursday, November 29, 2007

Default Permission & Umask

The default permission for files is 666 and directory is 777. umask is used to withhold permission. Default root’s umask is 022. without a umask in effect, only file created will have 666 permission and directory will have 777. this means that anyone on the system will have read and write access to any file. A umask of 002 will result in file created with 664 permission and directory with permission 775.

Default umask on Red hat enterprise linux is 002. to change

#umask 022

umask is typically set by script run at login time. The next time you lig in umask will be set bask to your default unless you add command to one of your startup files such as .bashrc.

User Mask

Default value for root = 0022

Default value for users = 0002

When we create any new file. The default value will be 666. in this case Umask means 666-002 = 664 for normal user and for the root the default value will be 666-022=644

The default value for a directory is 777. in this case umask means that whenever we create new directory, the default valkue for normal user 777-002 = 775 and for root, the default value 777-022 = 755

No comments:

 
Free Search Engine Submission thanks to: Create a Website