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
0
votes
0answers
30 views

Umask is ok, but for some files group does not have correct permission

I have searched a lot for this question but I did not find any answer. I've used Ubuntu 18.04 LTS as my server OS for a year. Recently I saw a problem that I have not seen it before. Umask setting ...
-1
votes
1answer
23 views

why doesn't mkdir -m 07 test use umask?

umask returns 0011. Consequently, when I do mkdir -m 07 test I'd expect the resultant directory to have d------rw- permissions but it doesn't - it has d------rwx permissions. What's up with this?
1
vote
0answers
60 views

How to reliably set umask on Ubuntu 19.10?

I have set up a new computer running Ubuntu 19.10. Now I want to set default permissions to be more restrictive via umask, but fail to do so. I tried setting umask with every advice I could find here ...
0
votes
1answer
331 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 ...
0
votes
1answer
134 views

umask's full path and runing it as different user

Today i learned about the command umask and it returns 0002 for my default user. I wanted to see its value for the root user, so I executed sudo umask and it returns: $ sudo umask sudo: umask: ...
0
votes
0answers
37 views

VirtualBox doesn't respect umask? Not writing Group permissions properly

I'm trying to share a VM between my wife's account and my own. I've made both of our accounts members of the group vboxusers, and the directory the VM is in is owned by vboxusers. Despite the fact ...
0
votes
1answer
369 views

default permissions for specific directories (home directory)

asumming a system where only 1 new user was added and was given root (administrator) privileges. we want to keep the user files within the user home directoy safe, meaning the no other user (except ...
1
vote
2answers
173 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
710 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
639 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
49 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
2k 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
165 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
173 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("...
0
votes
1answer
732 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
754 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
128 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
1k 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 ...
5
votes
6answers
12k 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 ...
8
votes
3answers
24k 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
235 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
3k 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
100 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.
3
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
543 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 (...
5
votes
2answers
26k 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 ...
3
votes
1answer
423 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
830 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
247 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
1k 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
45k 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
687 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 ...
201
votes
5answers
370k 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 ...
29
votes
6answers
134k 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
1k 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, ...