Questions tagged [umask]
85 questions
37
votes
10 answers
How to setup ssh's umask for all type of connections
I've been searching for a way to setup OpenSSH's umask to 0027 in a consistent way across all connection types.
By connection types I'm referring to:
sftp
scp
ssh hostname
ssh hostname program
The difference between 3. and 4. is that the former…
Unode
- 483
- 1
- 6
- 11
16
votes
4 answers
Specify default group and permissions for new files in a certain directory
I have a certain directory in which there is a project shared by multiple users. These users use SSH to gain access to this directory and modify/create files.
This project should only be writeable to a certain group of users: lets call it "mygroup".…
mislav
- 263
- 1
- 3
- 7
16
votes
2 answers
How do I set default permissions for SFTP for an Ubuntu Server?
We have an Ubuntu 10.04 server. How can I set it so that new files created (or copied) over SFTP or SSH have g+rw and g+rwx permissions (where appropriate)?
I'm also using setgid (chmod g+s) so that they inherit the proper group owner.
wag2639
- 2,115
- 6
- 24
- 32
15
votes
2 answers
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 readable and executable.
Currently, if I create a…
stickmangumby
- 526
- 2
- 5
- 11
15
votes
2 answers
Default owner/permissions of created files via VSFTPD
How do I set the default values of directories and files created to be 775 ? My understanding is that I need to modify the umask on VSFTPD, but how do I know what to change it to?
Ben
- 3,630
- 17
- 62
- 93
14
votes
3 answers
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 up (apache2ctl graceful) the umask has no effect.…
artfulrobot
- 2,627
- 11
- 30
- 56
13
votes
1 answer
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 permissions"
Before all just to precise:
I use…
drkmkzs
- 191
- 1
- 1
- 7
12
votes
4 answers
How to get full control of umask/PAM/permissions?
// Updated Feb 8 - Outstanding issues in brief:
How to umask directories differently from files?
How to umask on Nautilus copy/paste?
How to set umask for SSHFS?
OUR SITUATION
Several people from our company log in to a server and upload files.…
user60129
8
votes
3 answers
Ways to set umask on Ubuntu for daemon processes
I have an http daemon server process (yaws) that I would like to have server write any new files with a umask of 002, so that another user in the same group can modify, move, or delete files created by the daemon process. This is on Ubuntu…
mp3foley
- 608
- 1
- 5
- 10
6
votes
3 answers
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)
leonbloy
- 2,028
- 17
- 23
6
votes
2 answers
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 files created underneath foo and subdirectories…
Yarin
- 1,316
- 8
- 19
- 31
5
votes
1 answer
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 more secure.
Is there any way to eliminate the…
thomasrutter
- 2,437
- 1
- 25
- 34
5
votes
3 answers
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 the proper way. Just thinking about the case…
Attila Fulop
- 193
- 1
- 10
5
votes
4 answers
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. Directory permissions are rwxrwsr-x and file permissions…
HorusKol
- 741
- 5
- 12
- 31
4
votes
1 answer
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 using umask to fix the rights but something is…
Firze
- 335
- 6
- 16