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.

1
vote
2answers
59 views

Making all folders not readable to “others” - but keeping their original status regarding “write” and “execute”

TLDR: How can I change permissions of all folders in the computer such that, for "others", the folders loose only readability? In other words, they keep their status regarding "write" and "execute", ...
1
vote
0answers
294 views

umask settings in Ubuntu 18.04

For system-wide umask setting I edited "/etc/pam.d/common-session". session optional pam_umask.so umask=027 It doesn't have any effect. It does work on Ubuntu 16.04. I don't know why this won't work ...
0
votes
1answer
303 views

Why USERGROUPS_ENAB property in /etc/login.defs does not have any effect?

I just found the following comment in /etc/login.defs: # Enable setting of the umask group bits to be the same as owner bits # (examples: 022 -> 002, 077 -> 007) for non-root users, if the uid ...
1
vote
1answer
41 views

Default mode bits for a network share?

I have a software RAID array set up on PC with Ubuntu 16.04 Gnome, with the resulting /dev/md0 formatted as EXT4 and mounted as /RAID. I'm using Samba to share various directories from this machine's ...
1
vote
1answer
1k views

Is setting umask to 000 dangerous

I know that setting umask to 000 causes potential security issues. I don't care. I only want to know if something bad happens if I do it as root (sudo umask 000), or in /etc/init.d/rc script. By ...
2
votes
1answer
132 views

What command can you use to quickly find which file on your home folder containing the umask command? [duplicate]

What command can you use to quickly find which file on your home folder containing the umask command? $ grep -rnw "umask" ~
0
votes
0answers
108 views

Why umask in C program doen't work as expected

I have the following code comes from the apue book: #define RWRWRW (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH) int main() { umask(0); if(creat("foo",RWRWRW)<0) err_sys("...
1
vote
0answers
472 views

I can't give a full permission using umask command [closed]

I'm using Ubuntu 12.04 and qBittorrent. I'm trying to give 777 permission to all the folders created from within qBittorrent and I've tried umask 000 in the terminal, but when I download files in ...
0
votes
1answer
334 views

Umask settings for users=rwx, group=r, others=

How can i set the umask in ubuntu for permissions like this: users = rwx group = r others = I tried this mask, but it didn't work: umask 011
4
votes
2answers
586 views

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 ...
1
vote
0answers
95 views

Why is the umask number not the same for different local users?

For one of my local users, "ram", the umask is 0002. Another user, "yas" has the umask value 0022 instead. Shouldn't all users have gotten the same umask setting on their creation?
1
vote
2answers
935 views

Why umask 555 is setting the file mods to “222” instead of “111”?

I know that: A file default mod is 666 umask value will be removed from default mods. So why when I set the "umask" to 555 it doesn't set newly created file's permissions to 111? instead it's ...
3
votes
4answers
7k 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 ...
2
votes
1answer
2k views

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 ...
4
votes
3answers
18k 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 ...
0
votes
1answer
148 views

umask leading 0

My umask is currently (default) set to 0002, as shown below. I understand that the permissions from right to left are, other, user, owner. So what is the first 0 for? $ umask 0002
2
votes
1answer
1k views

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 ...
1
vote
2answers
2k 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 ...
1
vote
1answer
91 views

Umask on the command line

Where can I go to set a umask for any new users I create through the command line? I think it's through the /etc/.profile but I'm not sure.
2
votes
1answer
2k views

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 ...
5
votes
1answer
1k views

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 ...
0
votes
1answer
442 views

How to Create Text Files with user execution bit set automatically [duplicate]

The closest I got was umask to change the default permissions set for files/folders. However, umask doesn't seem to allow enabling the x bit for files: The base permissions for directories are 0777 (...
3
votes
2answers
20k views

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

I have just started using Lynis(lynis is a software, 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 ...
3
votes
1answer
408 views

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 ...
2
votes
2answers
812 views

How to set the umask in 13.10?

Apparently, there's a bug in Upstart that's shipped with Ubuntu 13.10, which overrides the umask set either through $HOME/.profile or /etc/login.defs. Upstart has been updated to fix this in Trusty, ...
0
votes
1answer
211 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 ...
0
votes
2answers
893 views

Can I set a specific group|umask to be the default one for all actions within a certain path?

I would like to override the default umask and owner:group settings within certain directories only, without requiring root privileges, as that kind of defeats the purpose. For example, when I touch ...
10
votes
2answers
37k 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?
7
votes
1answer
3k 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 ...
3
votes
0answers
564 views

Wrong permissions on “make install” [closed]

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 ...
183
votes
5answers
331k 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 ...
23
votes
5answers
113k views

How to set umask for a specific folder

For some obvious reasons I need to set umask value for one specific folder. How can one do that? Thanks beforehand! UPDATE 1 The reason I need to use umask for a specific folder is following. I ...
2
votes
1answer
947 views

Firefox downloaded files permissions

My umask is 0022, but when I download a file (using Firefox 40b11) it is created with umask 0026 (-rw-r-----). No clue where the issue is, if I'm even asking in the right forum. I'm on Mint 10 (sorry, ...