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.

4 votes
1 answer
63 views

What are the rules that determine file permissions of b after I do cp /path/to/a /p/t/b, depending on file permissions of /path/to/a and all dirs?

In Classic Shell Scripting from O'Reilly, Arnold Robbins and Nelson H.F. Beebe write the follwing example: $ umask 023 $ rm -f foo $ cp /bin/pwd foo $ ls -l /bin/pwd foo -rwxr-xr-x 1 root root ...
Enlico's user avatar
  • 2,179
1 vote
1 answer
27 views

umask value leaked when logging in into a different account

[user@localhost ~]$ umask 027 $ sudo su - [root@localhost ~]# umask 0027 [root@localhost ~]# exit [user@localhost ~]$ umask 0022 [user@localhost ~]$ umask 0022 $ sudo su - [root@localhost ~]# umask ...
AvidSeeker's user avatar
2 votes
1 answer
376 views

Default umask for NFS user nobody

I have an nfs mount created on a Linux server, and a process that is creating directories and files dynamically as it runs. As expected, the directories have an owner:group of nobody:nogroup. The ...
Mark Stewart's user avatar
1 vote
0 answers
413 views

Changing default umask in an ubuntu 20 docker image/container

I'm trying to make an ubuntu-based docker image that does a bunch of stuff and also creates files and directories on the host from time to time (in a bind-mounted folder). I'd like to set the umask ...
WiringHarness's user avatar
0 votes
0 answers
111 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 ...
ancoling67's user avatar
2 votes
1 answer
82 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
59 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
64 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
  • 327
0 votes
0 answers
28 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
210 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
56 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
1 answer
166 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
  • 393
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
  • 836
0 votes
2 answers
297 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

15 30 50 per page
1
2 3 4 5
13