Mask that controls which file permissions are set for files and directories when they are created. It also refers to a function that sets the mask, and to the mask itself, which is formally known as the file mode creation mask.

learn more… | top users | synonyms

3
votes
3answers
214 views

How to set `umask` for the entire gnome session?

Using Gnome 3.18. I share files between other family members, but the default umask on my distro (archlinux) is 0022. So every file/directory created is not writable for our common group. I tried to ...
1
vote
1answer
914 views

Apache created files and its permissions for CentOS 6.x

In short, I have an authenticated HTTP-POST that: posts a jpg image (created as 666 apache:www) into /directory1 (777 ftpuser:www) creates /directory2 (created as 666 apache:www) in a 777 ftpuser:...
2
votes
2answers
2k views

Confused on file and directory permissions for Samba shares

I've been searching for while to try to understand the following mask/mode fields for creating files/folders in Samba shares: create mask force create mode directory mask force directory mode But I'...
3
votes
0answers
32 views

Umask value isn't reflected after making changes

I changed umask from 002 to 007 in /etc/bashrc and in /etc/profile. After logging as a normal user I run umask, and it displays 0027. It should display 0007, but it doesn't. What should I do? if [ $...
4
votes
4answers
3k views

scp and umask setting

How do I make SCP respect umask ? I've tried adding this Subsystem sftp internal-sftp -u 0002 in /etc/ssh/sshd_config and session optional pam_umask.so umask=0002 in /etc/pam.d/...
2
votes
0answers
28 views

Understanding sshfs and umask

I have a remote access to a server. There I have my umask set to 0007. I refer to my server name as "sme", my local name as "lme". So I do the following: sme@server$ touch f1 sme@server$ ls -l f1 -rw-...
3
votes
1answer
131 views

set umask for sshfs-mounted filesystem

I have a remote sshfs filesystem mounted on /mnt/data. Following is the relevant line in /etc/fstab: www-data@192.168.1.10:/var/www/ /mnt/data fuse.sshfs rw,noauto,nodev,nosuid,noexec,_netdev,...
1
vote
1answer
61 views

umask not working as expected in other than home directory

I try to set up a deployer user for CI with Teamcity. I followed the instructions from this question on ServerFault: What's the best way of handling permissions for apache2's user www-data in /var/www?...
4
votes
3answers
368 views

Why doesn't umask change execute permissions on files? [duplicate]

If I change the umask to 0000, I'd expect a text file to be created with rwxrwxrwx permissions (based on my understanding of the umask, as described in the "possible duplicate" question) However, when ...
3
votes
1answer
192 views

files saves to ntfs drive adhere to umask, ext4 does not

I have 2 storage drives, 1 is NTFS and the other is ext4. Both mounted in /media as Storage_1 and Storage_2 I've run chmod -R *user*:*user* /media/Storage_* I've tried putting umask=022 in /etc/bash....
1
vote
1answer
96 views

Set sudo umask apart from the user calling it

The problem: I set my umask for my user to be 0077. Now I use sudo instead of su when I need super-user access, and the problem is that whenever I execute a software installation using sudo with ...
0
votes
1answer
32 views

setting umask for directories and files

Is it possible to create an umask , which will result in newly created files and directorties to have the same access rights ? e.g both of them to have for example rwxrwrw Directories starts with ...
3
votes
3answers
61 views

What are the conventional file permissions per filetype before umask is applied

I am looking for a list that specifies the conventional file permission of all the different file-types before the umask is applied. I read in man 1p touch that the default for a regular file is: ...
0
votes
1answer
20 views

Change another user's umask on macosx

How can I change another user's umask on Mac OS X? This question only has answers that work on Linux.
1
vote
1answer
212 views

Change permissions for files created by docker daemon service

I'm trying to change the default permissions assigned to files when created by the docker daemon by changing the default umask. The docker daemon service runs as root and creates the files with umask ...
2
votes
0answers
75 views

Setting umask of libvirt/virt-manager for proper permissions in a directory shared by host and guest

I'm attempting to create a directory that is fully available to both the host and guest systems of a virt-manager/libvirt/QEMU/KVM virtual machine, with read, write and execute permissions for non-...
0
votes
1answer
22 views

umask permissions that result in no change

I am having a really hard time understanding how umask works. How is something that is 666 masked with 001 still 666 ?
3
votes
2answers
603 views

umask XXX (permission bits) to give execute permission to files

Because files created by default having permission of 666 and umask (in permission bits form) subtract bit-wise from this permission, can we do something to give execute permission without using ...
1
vote
0answers
24 views

permissons on ftp'd files don't seem to match umask

I've read several postings indicating that ftp respects the user's umask. I don't see that that is the case. this is what happens on my server X when I FTP a file from SystemX, to SystemX. SystemX is ...
1
vote
2answers
362 views

How umask works [duplicate]

I'm new to Linux. I have been practicing a few commands. My question is about when I'm creating different files using a different umask. For example: umask 222, as I understand it, is the same as 777 ...
3
votes
2answers
256 views

SFTP clients uploading files with too restrictive rights

I have the following setup: Ubuntu 14.4 server offering SFTP service in a front-end area. External clients have the ability to upload files. A back-end process (on another server) tracks uploaded ...
1
vote
1answer
192 views

set umask before every non login non interactive shell command

I'm using PHP script and to connect to ssh server. It executes one command and exits. Connection is made to non interactive and non login shell. Because of that it does not load .bashrc or ...
2
votes
2answers
229 views

How to change permission of anonymous pipe?

I've the script which loads the SSH key from the variable (as part of script in CI environment) in order to not keep the private file in the public repository, however ssh-add complains about the ...
2
votes
0answers
73 views

What is the effect of ACLs/umask on the permissions of the executable file generated by gcc?

I have been wondering how gcc determines the resulting file permissions of the executable file being generated. To gain some insight, I considered a minimalistic program test.c #include <fcntl.h&...
5
votes
3answers
169 views

Historically why is umask the way it is?

umask has always tripped me up. Logically I would prefer to have a 'setmask' instead that takes chmod-style arguments. Anyone know why it is the way it is?
1
vote
1answer
456 views

mount command permissions: ntfs vs. ntfs-3g

I see numerous how-to examples for mounting an ntfs partition with either a mount command or an entry in fstab. In all cases, specifying ntfs as the filesystem is associated with also specifying ...
1
vote
1answer
78 views

umask vs -m, --mode command options

Is there any technical merit/necessity to numerous *nix commands (mkdir, mkfifo, mknod) having a -m (--mode) option? I ask this because near as I can tell, umask (both the shell command and the ...
0
votes
0answers
68 views

umask issue with apache phusion passenger

We have a rails application where a unix account will write to directory belonging to another unix account. I have added both the accounts to a common group. The new file which is getting created does ...
68
votes
3answers
88k views

Make all new files in a directory accessible to a group

Suppose I have two users A and B and a group G and a folder foo, both users are members of G (using linux and ext3). If I save as user A a file under foo, the permissions are: -rw-r--r-- A A. ...
1
vote
1answer
57 views

Umask not respected in OCFS2 filesystem

I encountered some strange behavior on a machine that uses a replicated block device (via DRBD) along with OCFS2 to allow concurrent mounts on multiple machines. The issue, in short, is that new files ...
1
vote
0answers
41 views

Can't determine where umask is being changed

On my RHEL system, my /etc/login.defs has the line UMASK 077. I have one user who has a .cshrc which changes his umask to 022. I also have a second user who does not have a .cshrc or .bashrc or any ...
2
votes
2answers
3k views

AIX ftpd - how to set umask for a given user?

I know how can I change the umask settings for all the users using ftpd, but how can I change the umask for a given user using FTPD? AIX/6100-05-02-1034 FTP server (Version 4.2)
0
votes
1answer
95 views

umask getting sets to 022 even though all necessary files are modified

umask is creating lots of problem to me . I tried following . I have commented umask set entry in /etc/profile and /etc/bashrc . There is not even single file in my home direcotry where i set umask ....
2
votes
1answer
1k views

Default umask for cron jobs

How to set default umask for cron jobs, please? (On RHEL 6.) Jobs are started under non-interactive (obviously) no-login (?) shell. Not only I prefer dash over bash. But consider also bash called as /...
1
vote
1answer
168 views

Set default permissions so only owner can read, execute and write for every new file and directory

I added this to my ~/.bashrc file: umask 077 So that every new file and directory has by default read, write and execute permissions. It does work with directories, but files only have write and ...
4
votes
3answers
315 views

mkdir permissions do not correspond to umask (change depending on location)

Whenever I create new directories in my home (or its subdirectories) they do not have write permission, even though umask is set correctly. Files I make DO have write permission. [mmanary@seqap33 ~]$ ...
3
votes
2answers
317 views

Setting correct permissions automatically for certain file type when file is copied from non-Linux file system

The main reason I want this is my heavy use of dircolors, especially for ls --color=auto. For example, whenever a .mp3 file is copied from NTFS, it will have permissions set by umask 022 which ought ...
2
votes
1answer
95 views

Where does the value that umask is applied to come from

I'm trying to understand umask properly. If I set umask to 0000 and then create a file I get the following permissions: -rw-rw-rw- I presume that this value (or set of permissions) is what the ...
7
votes
3answers
13k views

How to set umask for a system-user?

Is it possible to set the umask for a system-user (created with useradd --system username)?
8
votes
1answer
7k views

How is umask calculated in Linux?

So I know umask can restrict privileged users, using this format umask ugo. I understand that the read = 4, write = 2, and exec = 1. However, when I type umask, it returns 4 digits which is 0022 or ...
6
votes
1answer
822 views

Default umask 077 not applied at session start

I cannot get the default umask for a session to be 0077. I have edited /etc/login.defs and set the value to 077 there: UMASK 077 Also I've made sure the following entry exists in /etc/...
1
vote
1answer
53 views

UMASK privacy- how can I make user files private to the users

I have a debian virtual machine set up and thought of something in regards to UMASK. First I would like to ask if the function of UMASK is to set CHMOD values on any file created by a user. Secondly, ...
1
vote
3answers
1k views

Why can't my python script change umask?

This is my script #!/usr/bin/python import os print "hello world from python" os.system("echo 'hello world from bash'") os.system("umask 055") os.system("ls -alh > test") If I run this code ...
3
votes
1answer
673 views

setting default umask and user:group on directory

I have a directory data and I need to set default umask and ownership for all directories/files (both existing and future files). I want all files in data to have ownership root:martin ans ...
2
votes
4answers
5k views

Why is the default umask value for useradd in openSuSE set to 022?

I recently built a very simple test environment with oepnSuSE. As I tried to configure a shared directory, wihtout using ACLs, but with SetGID on that directory instead for some reason, I noticed ...
3
votes
2answers
5k views

How to make scp respect umask

My scp doesn't respect umask setting of the user it's sending files to. Is there a setting somewhere or should I use a different solution?
3
votes
1answer
2k views

How to make a cifs/smb mount ignore umask?

I have a cifs mount that is mounted from /etc/fstab. But I would quite like creation of files/dirs on that share to ignore my umask. Is that possible? It seems that cifs does not support the umask=000 ...
2
votes
1answer
207 views

How to set umask so that directories to be `r-x` and files to be `---`

I want to set the default permissions for newly created directories to have r-x for others and those of newly created files (non-directory files) to have ---. If I set the umask to 2, directory ...
0
votes
1answer
512 views

Does ~/.bashrc set environment for users whose shell is /sbin/nologin?

I have an SFTP server and have set user shells to nologin to restrict access to SFTP. I want to set a conditional umask of 0002 so that newly created files are group writable for all SFTP users. Can ...
2
votes
2answers
359 views

set umask (permissions) similarly as setgid on a directory

I know how to use setgid on directories, to enforce that whole directory structure has uniform user:group ownership. Is there a similar way to set the umask for a directory, so that the whole ...