Questions tagged [umask]

Umask is a value (the Ubuntu default is 022) that refers to those permissions that cannot be set by default when either a user or an application creates a new file.

Filter by
Sorted by
Tagged with
238 votes
7 answers
489k views

What is "umask" and how does it work?

I believe that umask is something that controls file permissions, but do not fully understand it. After running umask 0644 in a terminal, I cannot read the files I create with the command-line text ...
Lekensteyn's user avatar
  • 174k
12 votes
2 answers
72k views

Why does umask 077 not allow the user to execute files/directories?

I'm using umask 077 ."Other" and "group" do not have any rights, but the user can't execute files/directories. Why does umask 077 not allow the owner to execute files/directories?
Just me's user avatar
  • 121
8 votes
7 answers
21k views

How to set default umask in Ubuntu 17.04?

In the past, I have always set umask at ~/.profile. I set a umask of 077 so my documents get a permission of 600 (rw-------). But setting this at ~/.profile no longer works in Ubuntu 17.04. So as new ...
G.W.'s user avatar
  • 643
7 votes
1 answer
4k views

How to make a directory with permanent permissions different from default

I have system-wide default permissions set with umask 027. I am in the need to make a directory whose sub-directories would need 775 permission and whose files would need 664 permissions and make ...
Cormite's user avatar
  • 151
1 vote
2 answers
5k views

Setting files and directories to match umask setting recursively

Is there a way to go into my home directory and recursively set files and directories to match my umask setting? The issue is, way back when I started using linux, I didn't understand permissions. In ...
Don Fink's user avatar
47 votes
6 answers
195k views

How to set umask for a specific folder

I need to set the umask value for one specific folder. I have a web application and when it creates some file the default permission is 700. But I need at least 755 permission for that file. How can ...
Bakhtiyor's user avatar
  • 12.3k
13 votes
3 answers
42k views

How to change umask mode permanently?

I've read a couple of articles like this old one how to change umask mode but still can't figure it out 100% I have Ubuntu 14.04 running with Xenial kernel with default umask 0002 and my aim is to set ...
JoKeR's user avatar
  • 6,972
6 votes
2 answers
48k views

What permissions would change if I change umask to 027 from 022?

I have just started using Lynis (please don't think I have misspelled Linux). After running it, I was suggested to set umask in /etc/login.defs and /etc/init.d/rc to 027 than the default 022. I want ...
Registered User's user avatar
1 vote
1 answer
2k views

umask not work on ubuntu 19.10

everybody, i have found some postings about this problem but none of the solutions work for me. I want to set the UMASK system-wide on 007. I am using Ubuntu 19.10 with the default desktop. I have ...
Sven Gehr's user avatar
0 votes
1 answer
412 views

new file default execution permission? [duplicate]

I can't figure out why I don't have execution permissions on files I create by default. I don't think I messed with any Ubuntu permissions, it's pretty default stuff. When doing some research I found ...
Farzher's user avatar
  • 295