- The default creation permissions can be modified using the
- By default, on Linux systems, the default creation permissions are
666for files, which gives read and write permission to user, group, and others, and to
777for directories, which means read, write and execute permission to user, group, and others.
- Linux does not allow a file to be created with execute permissions.
Command to view the current mask value
umask umask -S
- As we have already mentioned, the default creation permissions for files are
666and for directories
- To calculate the permission bits of the new files subtract the umask value from the default value.
- For example, to calculate how
uname 022will affect newly created files and directories, use:
666 - 022 = 644. The owner can read and modify the files. Group and others can only read the files.
777 - 022 = 755.The owner can cd into the directory and list read, modify, create or delete the files in the directory. Group and others can
cdinto the directory and list and read the files.