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.
Questions tagged [umask]
46 questions
251
votes
7 answers
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 editor nano . I noticed that the permissions of…
Lekensteyn
- 178,864
50
votes
6 answers
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 one do that?
Bakhtiyor
- 12,884
13
votes
4 answers
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 0027 umask mode permanently all across the…
JoKeR
- 7,062
13
votes
2 answers
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
- 131
8
votes
7 answers
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 documents get created in a gnome session on…
G.W.
- 773
7
votes
1 answer
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 these permissions permanent after booting the…
Cormite
- 151
6
votes
1 answer
Why doesn't umask work as expected?
Please, can someone explain this to me? I set: umask 000 touch afile.tmp result: -rw-rw-rw- 1 jay apache 0 Aug 16 18:11 afile.tmp I was expecting this: -rw-rw-rw- to be like this: -rwxrwxrwx Why isn't umask setting the ' x '`s of the permissions for…
Ted
- 995
6
votes
1 answer
Why does my umask keep resetting to 000?
When I login anew my umask is 002 . At least for a while. Then at some point, and I'm not sure when, it reverts to 000 . This is very inconvenient and I'm now constantly living in fear of dropping files and folders with strange permissions across my…
Miles
- 170
6
votes
2 answers
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 to know what changes that would make to file…
Registered User
- 9,771
- 15
- 55
- 86
5
votes
1 answer
Why does a user's umask values differ between two systems?
I have two systems, A and B. A is Ubuntu 16.04, and B is Ubuntu 20.04. Each has a utility user 'rufus' defined on it. 'rufus' has no login on either system. I want to understand why 'rufus' has different default umask values between the two systems.…
Borea Deitz
- 234
- 2
- 13
4
votes
2 answers
Permission problems installing with sudo between 14.04 and 16.04
I have run into many permissions problems installing packages in 16.04. I install them using sudo , but then normal users cannot read the files in the package. So I ran a simple test: I created a directory using sudo in 14.04, and looked at the…
kingaj
- 143
3
votes
0 answers
Wrong permissions on "make install"
When I compile and install tarballs using the usual ./configure , make , sudo make install , the files and directories created always have wrong permissions. In particular, nothing that should have the group and user execute bits actually has them.…
koschei
- 131
3
votes
1 answer
Ubuntu 12.04 Server - Default directory permissions
I am new to linux and I installed linux for web server purpose with apache2. I have created a new directory /var/www/mysite. My main problem is that each new file I create has read only permissions 644 permissions using root user. I would like each…
nimi
- 131
2
votes
1 answer
Why is UMASK set in /etc/login.defs ignored?
I have set UMASK 077 in /etc/login.defs and there is no override in ~/.profile or ~/.bashrc . The umask command still prints 0022 in gnome-terminal, but prints 0007 when I log into tty1 . Newly created files get the same permissions as when umask is…
Chandra Sekar
- 200
2
votes
1 answer
Issue with umask UBUNTU 14.04.3
I am new to UBUNTU As per our security policies Umask value for each user must be as restrictive as possible: • for “root”: at least 077. • for other users: at least 027. I have set umask as 0077 for root in root's .bashrc file. It reflects…
Nidhi
- 271
- 1
- 3
- 11