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

0
votes
0answers
16 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 ...
1
vote
1answer
18 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
29 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 ...
1
vote
2answers
159 views

How umask works [duplicate]

I'm new in Linux and I been practicing a little some commands. The deal is that when I'm creating different files using different umask, like for example: umask 222, as I understand this must be 777 ...
2
votes
2answers
45 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 ...
0
votes
1answer
75 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
333 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
71 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
109 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
153 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
57 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 ...
2
votes
1answer
113 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 ...
1
vote
1answer
33 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, ...
0
votes
0answers
222 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 ...
3
votes
1answer
893 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 ...
1
vote
3answers
630 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 ...
2
votes
1answer
153 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 ...
2
votes
1answer
333 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 ...
0
votes
1answer
300 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
189 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 ...
2
votes
2answers
871 views

How to find where I have set “umask 077”?

When logged in as root, I have umask set to 077 which causes problems (such as /etc/resolv.conf being unreadable for non-root and thus DNS not working. I don't know where I have set the umask 077. It ...
3
votes
4answers
2k views

scp and umask setting

How do i make SCP respect umask ? Ive tried adding this Subsystem sftp internal-sftp -u 0002 in /etc/ssh/sshd_config and session optional pam_umask.so umask=0002 in ...
5
votes
1answer
3k 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 ...
0
votes
0answers
369 views

Umask for root and other system users

If I am not wrong, this is how umask is calculated. for dir, 777 - 022(root's umask value) = 755. for file, 666 - 022(root's umask value) = 644. Now, where this umask value is defined? Is it the ...
3
votes
2answers
4k views

Setting umask for su root

In my user account I set the umask to be 022 with my .bashrc, but I want root to use a umask of 077 no matter how I become root (e.g., logging in directly as root on a tty or using sudo or su). If I ...
6
votes
2answers
17k views

How to check umask for all users under Linux?

Under AIX I can check the umask for all users with: cut -d : -f 1 /etc/passwd | while read ONELINE; do lsuser -a umask "$ONELINE"; done But how can I check the umask setting for all users under ...
0
votes
1answer
60 views

Doesn't umask apply to files?

I have set the umask to 0. So: $umask 0000 I do echo 'test' > test.txt And test.txt is created. If I do: ls -l test.txt I see: $ls -l test.txt -rw-rw-rw- 1 jim None 5 Jun 30 22:50 ...
1
vote
1answer
376 views

Base permissions on a fat32 usb drive

On linux, the base permissions for directories is 777 and for files, it is 666. Thus, with umask=022, new files are 644 and new directories are 755. But when I mount a usb drive with fat32 ...
1
vote
1answer
310 views

umask base permissions on usb drive [duplicate]

On linux, the base permission for a file is 666 and for directories, it is 777. With a umask=022, new files and directories have permissions 644 and 755 respectively. When I mount a usb drive with ...
1
vote
1answer
1k views

Properly Setting Red Hat Daemon Umask

I've been trying to figure out the proper location to set daemon umasks in RedHat 5. All my searches lead to setting it in /etc/init.d/functions or /etc/sysconfig/init. What are the pros/cons of ...
6
votes
1answer
723 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 ...
1
vote
1answer
460 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 ...
0
votes
3answers
2k views

Why is umask setting a different permission for a directory and file I have created?

Consider: [user@server1 ~]$ umask 0770 [user@server1 ~]$ mkdir TEST2; touch TEST2.txt; [user@server1 ~]$ ls -l d------rwx 2 user group_name 4096 Mar 5 05:16 TEST2 -------rw- 1 user group_name 0 ...
4
votes
2answers
923 views

How can I change the umask for one command only?

How can I interactively execute a command in Linux (zsh, if it matters) with a different umask from the default, for one command only? Perhaps a combination of commands combined in a single line? The ...
2
votes
1answer
267 views

How are default permissions determined (on OS X)?

My (limited) understanding of basic Unix is that any files that are created will be created based on the permissions of the creating user. In particular, the group assigned will be the creating user's ...
2
votes
2answers
91 views

Read umask for a user

Plenty of examples on how to set umask for a user... but how do you read (or uncover) the default umask for a given user (say the logged in user)
3
votes
1answer
200 views

How to display the permissions of a new file in the status line of the Vim editor?

With the following piece of code I get the permissions for an existing file: augroup Get_file_perm autocmd! autocmd BufWinEnter,FileChangedShell * let w:file_perm=getfperm(expand('%:p')) augroup ...
0
votes
4answers
2k views

umask is not working for directories

I have an odd problem with umask. My current setting is: $ umask 0022 $ umask -S u=rwx,g=rx,o=rx This only works for files though and not directories: $ touch abc $ ll abc 0 -rw-rw-rw- 1 user1 ...
2
votes
2answers
770 views

Pre-defined umask under a given path [duplicate]

Possible Duplicate: How to set default file permissions for all folders/files in a directory? Say I have default umask, umask1. I would like all files/folders that I create/modify under a ...
2
votes
1answer
2k views

What is the difference between cmask and umask?

What is the difference between the umask setting that can be found in /etc/profile and the cmask setting that can be found in /etc/default/init? What is the difference between the two? When will one ...
3
votes
2answers
230 views

What is the proper solution to a web server trying to write to a directory?

So, I have a box with a "deploy" user. This deploy user owns a code repository and wordpress is running on this box... When wordpress attempts to do something like upload a plugin, it is using the ...
3
votes
1answer
1k views

umask changes to 0002 after cd

I've noticed an odd behavior on my Ubuntu 12.04 LTS system. This is my first experience with Ubuntu; previously I used Fedora and never had this problem. I have set my umask in .bashrc to 0027. But ...
2
votes
1answer
1k views

No effect of umask and chmod on mounted drives

The windows drives are mounted at boot-time using pysdm. The setting were nls=iso8859-1,users,umask=002,sync,user,dirsync,uid=mtk When I try to change the permission of files using chmod, I don't ...
2
votes
4answers
4k 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 ...
7
votes
3answers
9k 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)?
1
vote
1answer
153 views

Why are directories created with permissions 2070 and files with 060 in a directory with setgid bit?

I have the following directory: $ ll -d neptune drwxrws---+ 5 beamin psych 4096 Mar 7 16:18 neptune $ getfacl neptune # file: neptune # owner: beamin # group: psych # flags: -s- user::rwx ...
2
votes
1answer
185 views

Permissions UMASK for New Directories

I have a directory "dir1" who's owner is "owner1" and it has 775 permissions. Another user in the same group as "owner1" is called "owner2" Whenever a file is written to "dir1" by "owner2" I need ...
4
votes
2answers
3k views

Using umask to set group permissions

A long time ago an old friend showed me a way to use an octal or hex umask with a group I think using /etc/profile. I'm not sure. I'm trying to create group on Debian so that every member of that ...
2
votes
2answers
2k 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)
2
votes
1answer
443 views

On AIX 6100-05-02-1034 how can I create custom umask for a specific directory?

On AIX 6100-05-02-1034 how can I create custom umask for a specific directory?