Calculating default permission

1. file – Maximum allowed permission at the time of file creation (666)

-umask

Default permission on a file

0022

1st zero is special permission

2nd zero is owner perm.

2. Directory

Max. allowed permission at the time if dir creation (777)

Default permission on a dir.

Questions:

Set the value of umask such that file created after changing umask value have read & write perm. for owner but no permission to group members & others.

Answer:

umask 066

-sets value of umask for the curent session

#umask

#cat>newfile

3rd zero group perm.