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.

Getting ready

This recipe requires a CentOS system and administrative access, either provided by logging in with the root account or by using sudo.

How to do it...

Follow ...

Get CentOS 7 Server Deployment Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.