Explore top 10 tips to secure your open-source projects now. Read More

×
Alerts This Week
Warning Icon 1 556
Alerts This Week
Warning Icon 1 556

How to Adjust Default File Permissions with Umask in Linux

20.Lock AbstractDigital Circular Esm H446

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.