0

Normally when I make a directory with mkdir the permissions I expect are 751 or 755. However for some reason when new files are created, even in a users home directory, they are set to 700.

What controls the default permissions on new files and what kind of configuration change led to this happening?

  • 2
    you need to understand umask, read man umask – Tejas Jul 20 '16 at 10:56
3

As @Tejas mentioned, you need to understand umask and its values for changing the default permissions.

I recommend you read this article so you'll understand how to use it properly.

In addition, you should know that it's not permanent, so after rebooting your system the umask value you've set will be gone. To set it in a permanent way, you need to write a new umask value in your shell’s configuration file (~/.bashrc which is executed for interactive non-login shells, or ~/.bash_profile which is executed for login shells).

Good Luck

  • Thanks @Tejas and Farazx, I learned a lot about umask, apparently someone changed it at some point and didn't tell any users. – Aage Torleif Jul 20 '16 at 21:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.