Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
Join us in building a kind, collaborative learning community via our updated Code of Conduct.

Questions tagged [umask]

The tag has no usage guidance.

0
votes
1answer
20 views

linux/lighttpd: setting umask for webdav?

I'm running lighttpd on my linux server. I have set up webdav, and I want to set the umask to a specific value only for the webdav site, and not for any other sites running under my lighttpd server. ...
0
votes
0answers
9 views

Permission of files written by Word under Wine [migrated]

When I run Microsoft Office 2010 under Wine 3.0 (in Ubuntu Bionic), every .doc or .docx file written by Word gets executable permission. It does not matter if the file existed before or nor. My ...
0
votes
1answer
40 views

How to set umask for Apache on Amazon Linux 2 AMI

I want to set umask 0002 for Apache httpd so that certain files that it creates will be writable by other users. The traditional solutions don't seem to work on Amazon Linux 2 AMI.
0
votes
2answers
17 views

Different software saves files with different file permissions

I've got bizzare issue. There's a dir created by me with permissions 755. I'm working with a piece of software. After I'm done I save the output of my work to the same folder. Files get saved with ...
0
votes
0answers
54 views

DEBIAN SFTP change UMASK not working

I have a user let call him bob connecting via sftp with bob account. using for client ftp-kr in VSCODE(osx) and server debian 9, I would like to setup a umask like for ftp service. I tried adding ...
1
vote
1answer
47 views

set umask 000 on Windows?

Sorry if this sounds like a dumb question, but don't have a lot of experience with NFS and Windows together. I have a user on a Win10 ENT box, connected up to a FreeBSD server. And with the Macs, when ...
0
votes
1answer
165 views

How do I get a server side umask to be honored in scp -r when creating directories?

I am trying to setup an scp receiver that allows select users, based on ssh keys, to scp files to a specific server as a user different than themselves. This is to satisfy access restrictions by ...
0
votes
0answers
120 views

PHP error logs and files being created with different umask

I have the umask set up on my Apache2 server using umask 002. This is added to the end of /etc/apache2/envvars during the docker container build. I have the following script to test: // Create file ...
2
votes
1answer
251 views

debian internal-sftp -u 0002 umask does not work correctly - execute permission missing

I've been searching here and but I could not find similar question. I have set up SSH and sftp server on debian 7, the problem is that the umask is applied without execute permissions. Even if I ...
0
votes
1answer
265 views

NFS files and directories created with wrong permissions from MacOS client

I have a simple NFS share setup on CentOS 7 to allow my Mac to manage files in the /var/www/html directory: /var/www/html 192.168.1.107(all_squash,anonuid=1000,anongid=1001,rw,sync) Files and ...
1
vote
1answer
2k views

Which umask is more secure in Linux ( 022 or 027)?

Is there any security concerns if the umask is set to 027 for root (Basically I want to know if 027 is better in security than 022 ) ? As per my understanding 027 is a better one from security ...
1
vote
1answer
722 views

Set umask 0002 for apache user: www-data

I'm running ubuntu 14.04 and would like to have apaches www-data user to create files that are writable by all users within that same group www-data. So far I've tried to add umask 0002 or umask 002 ...
-1
votes
1answer
41 views

Why are newly-created files under /root not executable even though /root is and umask is 022? Is this the default on CentOS? [duplicate]

I am building a small set of utility bash functions and aliases that will live on a special /root partition. I've noticed that whenever I touch aFile or vim aFile, the result is aFile with the ...
0
votes
1answer
98 views

using umask to set default file settings [duplicate]

I am setting default umask of linux box for the first time. I log in as root user on a Centos 6 server. I want these default values: owner: read/execute/write (7) group: read/execute (5) other: ...
2
votes
0answers
217 views

nginx passenger, setting the umask

I was wondering how to set the umask for nginx or passenger or both processes. A search seems to only bring up Apache. Any help would be very much appreciated! (This is on Debian.)
1
vote
0answers
71 views

openssh sftp server file permissions not being set by umask (but folder perms are)

I am running the openssh sftp server like so: Subsystem sftp /usr/libexec/openssh/sftp-server -u 002 And the folders I upload via sftp get these permissions: drwxrwxr-x 12 developer staff ...
0
votes
1answer
537 views

internal-sftp -u 002 is ignored for copied files

I configured OpenSSH like this Subsystem sftp internal-sftp Match Group sftp ForceCommand internal-sftp -u 002 AuthorizedKeysFile /home/sftp/ssh/%u ChrootDirectory %h ...
1
vote
1answer
6k views

SFTP clients not respecting default UMASK permissions [duplicate]

Here's my situation: I'm setting up an Ubuntu 14.04 web server for a team to share. I'd like the team to have read/write access to everything inside var/www/html (same as CHMOD 775 on every file and ...
3
votes
1answer
308 views

Any way for openssl to generate private key with 400 (-r--------) permissions from the start?

I use openssl to generate private keys and CSRs in a script. The script needs to generate the key first, then call chmod 400 whatever.key to change the permissions of the private key to something ...
4
votes
2answers
1k views

Proper Way of Setting Umask For php-fpm on Debian/Ubuntu

I'd like to set umask to 002 for the php-fpm process. I'm reading here and here that on Ubuntu/Debian it is supposed to be done by modifying the init script. I'm having doubts however that this is ...
2
votes
1answer
72 views

Should usergroups be enabled?

All our users are managed with a central LDAP. When my predecessor in managing the infrastructure created the ldap he decided against creating usergroups (meaning groups of the same name and GID as ...
3
votes
1answer
2k views

SFTP-server uploaded files having wrong rights

I have been trying to figure out what is wrong with the file rights. When I am uploading files using FileZilla all the files get rights -rw-r--r--. I would want them to have -rwxr-xr-x. I have tried ...
11
votes
1answer
15k views

Does OpenSSH SFTP server use umask or preserve client side permissions after put command (chrooted environment)?

I know this question has been already discussed, but by reading the posts I could not figure the answers, because some said "yes umask can work", and others say "OpenSSH put command always preserve ...
2
votes
4answers
13k views

umask for www-data user running PHP on Ubuntu

Setting up a new webserver in Ubuntu 14.04 and trying to wrangle file permissions for PHP generated files. By default, all the directories and files in /var/www are owned/grouped to www-admin. ...
5
votes
3answers
6k views

How to set umask for php-fpm in Fedora

I cannot find where to set umask (to set proper permissions to files created by php scripts) in Fedora 19. (specifically, I want new files to have the permissions 664)
-1
votes
1answer
1k views

File base permissions are 666, why and is this a configurable value? [closed]

It is specified in various documentation on the net that linux/unix file base permissions are 666 with regards to how umask manipulates. This is also relevant with regards to the fact that default ...
0
votes
1answer
2k views

How to set umask for php5-fpm in ubuntu 13.10

I am currently running nginx with php5-fpm on my local development ubuntu 13.10 system with 3.12.0 linux kernel. Before update, to set umask to 0002 for php5-fpm I edited /etc/init.d/php5-fpm file ...
1
vote
1answer
416 views

Debian - File Permissions and umask

This might be a noob question, but here goes ^^: I've just set up a debian wheezy server, and Installed laravel on it. Anyway, I'm having some trouble both as to what the file permissions should be, ...
3
votes
3answers
2k views

rsync pull disregards my umask, why?

My umask is 0002. So when I rsync -r me@remote:new ., why aren't the results group-writable? drwxrwsr-x 10 root developers 4096 Aug 22 12:55 . drwxrwsr-x 12 root developers 4096 Jul 14 ...
-1
votes
2answers
2k views

Directory and files have 775/644 permissions but php says it is not writable?

I think this has something to do with ownership of the folders, but I have a php app that I am trying to get setup and I cannot install it because it tells me the permissions are not correct. I set ...
2
votes
1answer
1k views

Helping changing FTPD default umask

Default umask when logging in through FTP is 027 . I want to change this to 002 so a process with the same group can consume an uploaded file. Man 'ftpd' page says pass -u 002 to the ftpd command. ...
4
votes
2answers
6k views

Setting per-directory umask using ACLs

We want to mimic the behavior of a system-wide 002 umask on a certain directory foo, in order to ensure the following result: All sub-directories created underneath foo will have 775 permissions All ...
3
votes
2answers
9k views

Setting umask for all users

I'm trying to set the default umask to 002 for all users including root on my CentOS box. According to this and other answers, this can be achieved by editing /etc/profile. However the comments at ...
1
vote
1answer
224 views

Proper way to set default permissions

I have Debian Squeeze server with set of users. All users must be able to work with shared files. So what I did is to set to all of these users same main group (e.g. editors) Then put files into /...
1
vote
2answers
280 views

umask seems to vary by user

I've got a development Ubuntu system for which I have several users: myself (with full sudo) and about 5 other users. (I've set up the system so everything in this respect is still at its default ...
0
votes
1answer
909 views

create folder and files under User ownership in CakePHP

When CakePHP create a new Folder or File, its always owned by nobody and is set to 0755 or 0644 and for so i cant run php in SuPHP mode under the cPanel server to fix this i always run a Cron which ...
0
votes
1answer
706 views

umask in RHEL 6

How can one set the executable bit on files using umask? According to documentation, a umask of 000 should work, but in practice this only works on directories. Also open to other methods of ...
2
votes
1answer
3k views

NFSv3 + ACL: mask is gone on clients

I'm sharing a NFS folder among a user group. The default umask on the clients is 0700, and this is a problem because newly created files won't be readable/writable by another users. So, I'm using ...
-2
votes
2answers
1k views

Chmod wont stick [closed]

I'm using CentOS on a virtual dedicated server. When I go in as root, and change the chmod value of a folder it works. But, any files I place into that folder do not inherit the chmod I set. This is ...
1
vote
1answer
3k views

What is the best place to put umask setting for php-fpm in Centos 6?

For the following two places of php-fpm init configuration on Centos 6, which one do you think is the most suitable to put in, for example, umask = 077 ? /etc/init.d/php-fpm OR /etc/sysconfig/php-...
0
votes
1answer
690 views

umask is being ignored on Gentoo while creating new files

I have a server running Gentoo and hosting a drupal installation. Whenever a Drupal update is executed, the directory permissions of the updated module turn from 755 to 744 preventing the application ...
1
vote
0answers
773 views

CentOS 6 + OpenSSH 5.3 + umask are not working for me

I've been trying to set umask 002 to my sftp users, I already tried setting the umask in the following files: /etc/ssh/sshd_config: Subsystem sftp /usr/libexec/openssh/sftp-server #...
13
votes
2answers
27k views

How do I set default umask in Apache on Debian?

I need files created by apache2 to have umask 002, i.e. group rw, by default. I've tried putting umask 002 in /etc/apache2/envvars and although this script does get executed as part of apache start ...
2
votes
1answer
3k views

How to set default group permission in Ubuntu for www-data (apache's user)?

I have not been able to set a umask for www-data (apache's user). I tried to put umask 002, like in many other examples I found, in /etc/init.d/apache2 script, or in /etc/apache2/envvars.... Then I ...
0
votes
1answer
563 views

ubuntu change default files and folders permission

i have ubuntu 10.04 on my server. when i was create a file by ftp, php and ... files permission is 600 and folders is 700. how can i change default files permission into 644 and folders to 755? ...
1
vote
1answer
2k views

CentOS - Apache - Is it possible to add umask directive to httpd.conf or vhost.conf file?

Yesterday, I was finally able to get my apache process to write files to a directory by setting the umask to 002 in the /etc/sysconfig/httpd script, but I was wondering if it's possible to set this ...
9
votes
3answers
17k views

Can I override my umask using ACLs to make all files created in a given directory world readable?

Assume that my umask is 0077. I have a directory, foo, that I want to have special permissions applied to it. All files I create in foo should be world readable, and all directories should be world ...
4
votes
2answers
2k views

How can I change the umask for a user when he logs on to an alternate group?

I want the umask to be more permissive for users when they switch to a non-default group. Just to demonstrate what I mean: $ id uid=500(beamin) gid=500(beamin) groups=10(wheel) $ umask 0022 $ sg ...
1
vote
1answer
460 views

Modifying umask for all users not functioning

I have modified /etc/login.defs and set the umask to 002 but it fails to be changed when I exit or logout and log back in. My bashrc file does NOT contain any umask settings. from /etc/login.defs # ...
0
votes
2answers
935 views

Setting umask /etc/apache2/envvar not working Ubuntu 10.04

I am trying to set the default umask to umask 002. I tried adding it to: /etc/apache2/envvar /etc/profile But after restarting Apache it hasn't changed? Still 0022. Where do I have to put it? ...