Discover How To Harden My Filesystem HOWTOs
How To Set Permissions for New Files on Linux With umask
File permissions are critical for the security of a Linux system. But how do you set default permissions for new files on Linux?
If you've used Linux for any length of time, you'd know how important Linux file permissions are. But what about permissions for when you create new files? A utility called umask lets you set default file permissions for new files on Linux.
A umask is a "bit mask" that sets permission bits on new files. On Linux systems, it's a standalone command, though modern shells like Bash or Zsh include it as a built-in command.