Questions tagged [umask]

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.

Filter by
Sorted by
Tagged with
0
votes
3answers
54 views

How to force set (not subtract) permissions to future files?

I have a program on Ubuntu Linux that creates a logs/error.log file with a permissions 660 (rw-rw----) or 640 (rw-r-----). But I want the file permissions always to be 666 (rw-rw-rw-) (including when ...
0
votes
0answers
45 views

File Permissions keep changing back

We have a cent os7 server that recently had a new user added. It seems that during this process permissions were wrongly updated. After I have fixed the permissions to suit the site required ...
0
votes
0answers
17 views

How do I change the umask of processes launched by plasmashell from 0022 to 0002

I'm using Fedora 33, KDE Plasma 5.20.5. I'd like the permissions for files created by my user on this system to include the write permission for the group. Using umask successfully accomplishes this, ...
0
votes
1answer
225 views

unix domain socket permissions and umask integration between root and non root users

I'm trying to understand the permissions of a unix domain socket, when using an existing file, umask changes are required as well as the dir permissions. If I create a world readable dir as root and ...
0
votes
1answer
26 views

Allow user to run nonpermissive commands in shell script (KSH)

I have a ksh script I am developing for work. (I am on the newer side to shell-scripting) I have root access but the future-users of this script will not. Say the other user is named User1. Within the ...
3
votes
0answers
85 views

Why do I get umask 022 as default in my main user instead of the 0002 one?

I'm using Fedora 34 (Workstation Edition) —although I've seen this same behaviour on a Debian Buster machine, and I'm trying to understand why the users that I am creating are getting the umask 0002 ...
0
votes
0answers
73 views

ACLs are not respected on FreeBSD

I am trying to set default group permission for the folder on FreeBSD 13.0 $mkdir test $setfacl -d -m u::rwx,g::rwx,o::rx,mask::rwx test $getfacl -d test # file: test # owner: john # group: wheel user:...
0
votes
0answers
50 views

I get the weirdest umask with `sudo -u user -i` when setting it with pam_umask

I want to set a umask of 077 using PAM for the user postgres who uses peer authentication, meaning I can't reach him with a password. I use sudo -u postgres -i to switch. I set session optional ...
0
votes
1answer
248 views

How do I find the umask value for a given system user?

I would like to find the umask value for a particular system user, the one that is applied when a script running as this user creates a new directory. I'm using both Ubuntu 16.04 and 20.04 systems. ...
0
votes
1answer
1k views

NFS share umask

I am configuring an nfs share and my /etc/exports looks something like this: /nfs_anon 192.168.122.0/24(rw,all_squash,anonuid=1111,anongid=1111) Is there a way to force clients to use default ...
2
votes
0answers
50 views

Using umask vs. setgid: best practice for peacefully sharing a directory in a Linux users group?

What is the best way to share a directory between multiple Linux users? Say I have a directory at /foo (a regular directory no NFS or else) and a bunch of users added to the group bar. What I want is ...
0
votes
0answers
19 views

umask: fs, option, superblock, codepage, helper error

mount works fine, but mount -o umask=0 gives mount: /home/user/sdb1: wrong fs type, bad option, bad superblock on /dev/sdb1, missing codepage or helper program, or other error.. It happens only for ...
0
votes
0answers
30 views

The parameters a new process inherits

It appears that a new Linux process inherits its parent's present working directory, umask, process group (getpgid) and process session (getsid). Also, the parent's PID becomes the new process's ...
0
votes
1answer
17 views

Umask: group permissions effect on files and directories

If I changed my "umask", so that group members had all permissions. What would be the effect when creating new files and directories?
0
votes
1answer
32 views

Displaying umask in symbolic and octal form, at the same time?

I'm trying to display the umask in both octal and symbolic at the same time. The command I'm using is umask -S -O, but it doesn't work. I would appreciate any help.
0
votes
1answer
199 views

Set umask for a user

How do I make umask output be 22 instead of 0022? Server1: user@vxs-app01> umask 22 Server2 user@vxs-app02> umask 0022
2
votes
2answers
541 views

ACL default::mask not being used for new file

I have a directory with the following ACL rules setup: cd /nobackupp13/jrwrigh7 getfacl . I get # file: . # owner: jrwrigh7 # group: a1983 user::rwx group::r-x group:a1983:r-x mask::r-x other::--- ...
1
vote
0answers
31 views

Default acl not yielding the permissions i want in a shared directory

I am trying to share a directory between 2 users. Both users should always have rw permissions on all existing and newly created files and subdirectories under a given path. I added both users to the ...
1
vote
0answers
126 views

Incorrect permissions assigned to file when created from Windows computer

I have a Linux server with a NFS share. User1 and Group1 have rwx permissions to the folder. When I create a file on the Linux host as user1, it has the correct permissions. On the Windows machine, ...
0
votes
1answer
85 views

Set default permission for user using copy (using winscp) in Centos 7

I did set umask 001 for user (ex: desmon) in /home/desmon/.bashrc When desmond create a file then permission is -rw-rw-rw- But when desmon use scp command to copy file then permission is -rwxr-x r-- ...
1
vote
3answers
461 views

What does the letter 'u' mean in umask?

Is it "user mask" or something? Wikipedia does not have details, but says the feature has been in Unix since 1978. POSIX just says it is the "file mode creation mask".
1
vote
0answers
37 views

File permissions while sending the file from one Linux host to another host

One of the source servers is sending the files to destination servers using lftp. The umask setting in the destination host is 007(in proftpd.conf file), so the files landing in the destination ...
4
votes
2answers
472 views

How to have files extracted from archive inherit permission from parent folder

I'm using a Centos 8 Linux with multiple user belonging to the same group accessing a number ff folder/subfolder and files in the same FS (xfs). I want all files and folders have write permission for ...
1
vote
1answer
347 views

pam_umask.so doesn't work

I try to configure pam.d on a centos 8. I wanted to configure system wide umask to 0077 in /etc/pam.d/postlogin. postlogin is included by several services under /etc/pam.d e.g. su, su-l My postlogin ...
-1
votes
2answers
107 views

What's the point of setting individual file permissions if no one can access/view your directory anyway?

Scenario: I have a file inside my ~ directory called file.txt. My ~ directory has it's permissions set to 700. My file has permissions set to 664. The problem is, no one can even access it because ...
0
votes
3answers
120 views

home permissins are still too generous

i guess i'm still missing something, but after some time of researching (without any clear statements), i have to consult the experts: i'm using Linux Mint MATE (Ubuntu based) and know, therefore a ...
4
votes
1answer
2k views

mount with umask does not works

I tried to run mount /home/user/nvme0n1 -U 8da513ec-20ce-4a2d-863d-978b60089ad3 -t ext4 -o umask=0000 and the response is: mount: /home/user/nvme0n1: wrong fs type, bad option, bad superblock ...
2
votes
1answer
3k views

Why is execute permission denied for bin file I created?

I've made a Makefile to simplify my life, and this Makefile calls a script in a bin file I've created. After running my command make something, I got following error : /bin/sh: 1: .docker/bin/echo-...
2
votes
2answers
166 views

Controlling file mode of created target directory possible for rsync?

I'm looking to control the file mode bits of the directory-to-be-created in the rsync command below: rsync -a ... <remote-user>@<remote-host>:/some/existing/path/directory-to-be-created/ ...
0
votes
1answer
78 views

Set specific umask for .Trash-* folder

We are working on CentOS and our data servers are running FreeNAS. We have a few shared projects automounted in /shared_projects folder. Each times a user delete a file in those shared projects, it ...
0
votes
2answers
456 views

Correct umask value to automate the creation of file with the SSH private key content

I'm trying to find a way to shorten these lines (CI_PRIVATE_SSH_KEY is already set): mkdir -p "${HOME}/.ssh/" chmod 700 "${HOME}/.ssh/" echo "${CI_PRIVATE_SSH_KEY}" > "${HOME}/.ssh/id_rsa" chmod ...
0
votes
2answers
4k views

Set default permissions for new files and folders

I have an upload directory which has information fed into it by users, each time a user registers they submit a picture which creates a folder for them in the upload directory and stores their photo(s)...
0
votes
1answer
213 views

umask doesn't work with nohup

It seems that umask and nohup don't work correctly together. I did this: $ umask 022 $ nohup java -jar blah.jar & [1] 12345 nohup: ignoring input and appending output to `nohup.out' $ ls -l ...
2
votes
0answers
45 views

What are the directories and configuration files used to set the umask by the superuser in Solaris UNIX?

One file I can think of is the .profile file in the user's home directory. However what are the absolute paths (directories and file names) that are used to set the UMASK level at the operating ...
4
votes
1answer
4k views

Why choose a umask of 002 over 022?

I was cleaning up groups and permissions on my home system today, and re-familiarized myself with umasks. It seems that the default on my system (Ubuntu 18.10) is 002, but that for root it's 0022. ...
0
votes
1answer
147 views

Set File Permissions to Default from Umask

https://geek-university.com/linux/set-the-default-permissions-for-newly-created-files/ So I want my umask (command) which in this case is 0002 to be subtracted (bitwise) from 666 for files and 777 ...
0
votes
0answers
77 views

what is the significance of the ACL value being a complement of UMASK value?

From the description section of man 2 umask command, it says For example, the following default ACL is equivalent to a umask of 022: u::rwx,g::r-x,o::r-x What's the significance of having another ...
0
votes
1answer
380 views

umask not applied when mounting from udev

I have a udev rule which automatically mounts usb device when connected The rule is the following one : # cat /etc/udev/rules.d/10-usbdetectd.rules KERNEL!="sd[a-z]*", GOTO="...
1
vote
0answers
307 views

Does Access Control lists override group or owner permissions?

I came across the following task: Add 3 new users - alice, bob, charles Create a new group - marketing - and add alice, bob and charles to that group Create a directory - /marketing - whose owner ...
3
votes
1answer
477 views

umask not being applied? [duplicate]

I am setting the umask to a new value as below. However although I am applying rxw to the user, this does not seem to be respected (?) /home/pkaramol $ umask u=rxw,g=rw,o=r /home/pkaramol $ umask -...
2
votes
0answers
166 views

Other has permissions with umask 007 on VM with mounted folder

One thing that's odd to me right now is I am playing around with permissions. The way umask works to my knowledge is it basically tells what permissions u g o don't have using octal representation (...
2
votes
3answers
3k views

How to get sftp to respect my umask setting

I'm trying to get sftp to give me a umask of 002 but it keeps behaving like the umask is 022. How do I get it to do that? Red Hat 7.4 /etc/ssh/sshd_config has the line: Subsystem sftp internal-sftp ...
0
votes
2answers
154 views

Is the umask function a kernel function?

I assumed the umask() function is a: shell function containing a variable commonly referred to as file creation mask but I was wrong because umask() is not a shell function and doesn't contain ...
0
votes
0answers
688 views

Zsh: force file/folder obey new umask

Default zsh shell uses umask 0022, when changing to new umask, e.g: 0077. Only new file/folders after changing to new umask are applied. How to use zsh/or-else to force old file/folder create under ...
1
vote
1answer
588 views

Is a file creation mask setted by a given shell's umask is typically unique to the operating system entirely or just to that given shell?

Is a file creation mask setted by a given shell's umask is typically unique to the operating system entirely or just to that given shell? For example, if I change the file creation mask (umask's mask/...
-8
votes
5answers
3k views

What is masking a mode?

I understand that in GNU/Linux, file permissions are also called a file's mode and that the term mask can mean at least these different meanings: The umask shell builtin (the usual meaning). The ...
0
votes
0answers
181 views

Why is umask changeing

Problem: umask changes when new shell is created, despite what's in .cshrc On linux... In my .cshrc, I have "umask 002" At the prompt I see 2... % umask 2 I have a shell script... #! /usr/bin/...
0
votes
1answer
199 views

umask does not have -S option

I'm trying to use umask -S to show the current mask in symbolic form (per man umask on my system, which gives me the page BASH_BUILTINS(1)). But umask doesn't seem to behave as the manpage claims: ...
7
votes
1answer
4k views

What is the exact purpose of `mask` in file system ACL?

When I apply default ACL in a directory I see default:mask or just mask in the following two scenario. Scenario 1 -bash-4.2$ ls -ld test/ drwxr-x---. 2 test test 4096 Oct 15 19:12 test/ -bash-4.2$...
2
votes
3answers
4k views

How can I override the umask setting for all users for a specific folder?

I am running RHEL6. I have a requirement to have "umask 077" in my /etc/bashrc which I am not allowed to change. We have a folder designated for group collaboration where we would like everyone in ...