Setting default permissions for new files and directories
Linux's permissions system governs whether a user can enter a directory or read, write, or execute a file. By setting the permission bits on files and directories, access can be granted or revoked to different users and groups of users. However, it's possible for a user to create a file and expect others in their group to access it, but the initial file permissions prevents this. To help avoid this situation, this recipe teaches you how to set the default permissions for new files and directories by specifying a mask value.
This recipe requires a CentOS system and administrative access, either provided by logging in with the
root account or by using
How to do it...