Skip to main content

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
0 answers
23 views

login.defs only for specified user

I need to set umask for specified user for all file he will make: from terminal and from file manager ex Dolphin. I have set umask in /etc/login.defs but now ALL user have this umask. There is a way ...
cicoria67's user avatar
2 votes
1 answer
44 views

Why does setting `umask` to `0077` (and then downloading public key) makes a gpg public key unavailable for apt?

Why does setting umask to 0077 makes a gpg public key unavailable for apt when installing a package, e.g. umask 0077 curl -fsSLo /usr/share/keyrings/brave-browser-beta-archive-keyring.gpg https://...
John Smith's user avatar
0 votes
1 answer
19 views

/etc/samba/smb.conf: With what command's logical approach the octal values are based?: chmod or umask?

About Samba I am reading the following valuable tutorial: How to Set Up a Network Shared Folder on Ubuntu With Samba At the Step 2: Configuring Samba section appears the following configuration [...
Manuel Jordan's user avatar
1 vote
0 answers
47 views

How was the formula for calculating umask derived?

When using umask, I know that to get the resulting permission, the mask is first NOTed and then it is ANDed with the default permission (777 or 666). Now my question is, how was this formula derived? ...
JLC's user avatar
  • 317
0 votes
0 answers
26 views

Umask questions in mount [duplicate]

I have a question regarding 'umask.' I have an extra disk on my Linux system, and I want it to mount during startup with the same permissions as '/home.' For example, my '/home' has these permissions: ...
Josué Suptitz's user avatar
0 votes
1 answer
112 views

Why SSSD Service override_homedir triggers creation of home directory with wrong permissions?

I have a vendor application installed in an Ubuntu Jammy server that relies on SSSD v2.6.3 configured for LDAP integration for the authentication and creation of the home directory of the user in the ...
Alejandro Arévalo's user avatar
0 votes
1 answer
47 views

why resets `desktop-file-edit` the permissions of a file?

let's say i have set the umask system-wide to 027 via a one-liner at /etc/profile.d/ on a multiuser-system. after some time resp. reboots i want to hide an existing desktop-file system-wide from the ...
DJCrashdummy's user avatar
0 votes
0 answers
71 views

Could not override the umask value for AWS Session Manager ssm-user

Currently when I connect to an EC2 instance through SSM from AWS console it connects with default user : ssm-user. The umask value for this user is 022. I am trying to update the default umask value ...
Rob Wilkinson's user avatar
0 votes
0 answers
41 views

Linux umask difference between root and non-root user

My system is : # uname -a Linux Ubuntu 6.2.0-26-generic #26~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Jul 13 16:27:29 UTC 2 x86_64 x86_64 x86_64 GNU/Linux When I sudo to root : $ sudo bash --norc # root ...
Philippe's user avatar
  • 1,475
0 votes
1 answer
114 views

What determines UMASK for Oracle Job using UTL_FILE?

A PL/SQL job foobar622 writes files to UNIX/LINUX server using the following Oracle file I/O commands: UTL_FILE.FILE_OPEN UTL_FILE.PUT_LINE UTL_FILE.FILE_CLOSE In the past the files had these ...
zundarz's user avatar
  • 363
0 votes
1 answer
2k views

Converting server to allow Apache write access to certain directories, does this solution look right?

I've been at this all day and think I finally figured it out, but want to make sure before I put it into production. I'm changing my server to allow the apache:apache user write permission on a few ...
Jeff's user avatar
  • 796
0 votes
2 answers
215 views

Umask set weird result for files when apply value 0666

umask shows the weird results when applying value: 0666 When apply any value for umask that works as aspected, but when apply 0666 then directory got correct permission value but file got weird value. ...
JavaScriptForEveryThing's user avatar
0 votes
0 answers
37 views

How to change the (u)mask in Linux to get a certain permission for a file? [duplicate]

What value of (u)mask should I use to give the permission -rwxr-xr-- for the files? I tried 012 and 022 and didn't work, how do I subtract 666-754?
Med talib's user avatar
5 votes
1 answer
1k views

cp overrides my default permissions settings, when copying files with: cp -r --no-preserve=all

My default umask is 077. When I create a directory, it has permissions 700: mkdir AA $ stat -c'%A %n' AA/ drwx------ AA/ now I want to set default permissions recursively to 750: ...
Martin Vegter's user avatar
0 votes
0 answers
33 views

How to set file permission to 777 using umask [duplicate]

It is true that i may not have understood how umask calculations work. This query is just for a test case (my learning). My intention is that my process should generate a file pdf file1.pdf with full ...
Ashar's user avatar
  • 511
0 votes
2 answers
1k views

modify umask of a running process

I have a program, which can be used by a group and thus the output should have group writing permission by default, thus umask 002. Of course each user could do (umask 002 && cmd). But since ...
Friedrich -- Слава Україні's user avatar
1 vote
1 answer
2k views

umask for new subdirectories

I am running transmission-remote and want all new torrent downloads to be created with g+w permissions. The transmission Downloads directory is symlinked to a Downloads directory on a second drive as ...
Stephen Boston's user avatar
0 votes
0 answers
990 views

Does Samba ignore ACLs and umask?

I have an ACL on /media/drv: sudo setfacl -dRm u::rwx,g::rwx,o::r-x /media/drv Likewise I set the special directory group id bit on /media/drv like this: sudo chmod g+s /media/drv When I make a ...
FlexMcMurphy's user avatar
0 votes
1 answer
56 views

Linux Bible 10th Edition: are permissions calculated right with umask?

I read "Linux Bible 10th Edition", chapter 4: Becoming a Linux Power User, at 109 page. Second paragraph: $ umask 0002 If you ignore the leading zero for the moment, the umask value masks ...
CoderDesu's user avatar
  • 145
2 votes
1 answer
82 views

LPIC 101-500 exam - umask

Today I took LPIC 101-500 exam and I passed but one question keeps bothering me. The question was: Given the following permissions -rw-r----- what umask should be applied to make all files have the ...
jedi's user avatar
  • 459
0 votes
1 answer
277 views

Can "umask" variable include a number greater than "7"?

I understand we use "umask" for setting different security levels: umask value Security level Effective permission (directory) 022 Permissive 755 026 Moderate 751 027 Moderate 750 077 ...
meallhour's user avatar
  • 181
0 votes
3 answers
145 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 ...
Mihail H.'s user avatar
  • 105
0 votes
0 answers
451 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 ...
Wakka's user avatar
  • 103
2 votes
1 answer
6k 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 ...
nd6654ssd's user avatar
0 votes
1 answer
441 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 ...
Hugobop's user avatar
  • 105
3 votes
0 answers
431 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 ...
MikelAlejoBR's user avatar
1 vote
1 answer
361 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:...
abendrot's user avatar
1 vote
1 answer
4k 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. ...
Borea Deitz's user avatar
0 votes
1 answer
9k 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 ...
golder3's user avatar
  • 1,074
2 votes
0 answers
317 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 ...
Philippe Ombredanne's user avatar
0 votes
0 answers
153 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 ...
thb's user avatar
  • 1,145
0 votes
1 answer
76 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?
OcR19's user avatar
  • 1
0 votes
1 answer
93 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.
dw1969's user avatar
  • 3
0 votes
1 answer
2k 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
user425140's user avatar
2 votes
2 answers
3k 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::--- ...
James Wright's user avatar
1 vote
0 answers
175 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 ...
trurl's user avatar
  • 111
1 vote
0 answers
804 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, ...
Mohammed Khawaja's user avatar
0 votes
1 answer
330 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-- ...
Lee's user avatar
  • 1
4 votes
3 answers
592 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".
Lassi's user avatar
  • 841
1 vote
0 answers
84 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 ...
A.K's user avatar
  • 55
3 votes
2 answers
956 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 ...
Cris's user avatar
  • 41
1 vote
1 answer
981 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 ...
dvonessen's user avatar
-1 votes
2 answers
279 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 ...
Rayleigh's user avatar
  • 855
0 votes
3 answers
231 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 ...
DJCrashdummy's user avatar
7 votes
1 answer
7k 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 ...
user3563894's user avatar
2 votes
1 answer
6k 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-...
Chloé's user avatar
  • 133
2 votes
2 answers
301 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/ ...
cueedee's user avatar
  • 267
0 votes
1 answer
153 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 ...
Kevin Lemaire's user avatar
0 votes
2 answers
947 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 ...
user avatar
0 votes
2 answers
10k 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)...
Forau's user avatar
  • 1