Directory permissions are: Read: with this permission we can see the contents of the directory.
Write: with this permission we can create or delete files in the directory.
Execute: with this permission user can change into that directory. Without this permission user cannot change into that directory.
Note: To modify a file you should have both read and write permissions.
umask: Default file and directory permissions To assign all the permissions to a regular file the notation is 666. Since a regular file will not have executable permission.
To assign all the permissions to a directory the notation is 777.
Initial permissions of the files and directories depends upon current umask value (when a file is created newly the default permissions are given depending on umask value)
To check the umask value, umask command is used.
$ umask
0022
Here first zero is the sticky bit value; second zero for users; 2 for group; another 2 for others
Umask value tells that not to grant specified permissions.
For example as above umask value is 022 it means
The default permissions of a file is 644 (666-022=644) and for directories 755 (777-022=755)
After that permissions of files and directories can be changed by using chmod command.
T he result of cmd1 will be return to pipe temporary file. From this file cmd2 will read data and send to output screen.
Note: multiple pipes can be used.