3
votes
1answer
158 views

How to make a cifs/smb mount ignore umask?

I have a cifs mount that is mounted from /etc/fstab. But I would quite like creation of files/dirs on that share to ignore my umask. Is that possible? It seems that cifs does not support the umask=000 ...
0
votes
2answers
139 views

Why can't my python script change umask?

This is my script #!/usr/bin/python import os print "hello world from python" os.system("echo 'hello world from bash'") os.system("umask 055") os.system("ls -alh > test") If I run this code ...
2
votes
1answer
88 views

How to set umask so that directories to be `r-x` and files to be `---`

I want to set the default permissions for newly created directories to have r-x for others and those of newly created files (non-directory files) to have ---. If I set the umask to 2, directory ...
2
votes
1answer
107 views

setting default umask and user:group on directory

I have a directory data and I need to set default umask and ownership for all directories/files (both existing and future files). I want all files in data to have ownership root:martin ans ...
2
votes
2answers
112 views

set umask (permissions) similarly as setgid on a directory

I know how to use setgid on directories, to enforce that whole directory structure has uniform user:group ownership. Is there a similar way to set the umask for a directory, so that the whole ...
0
votes
1answer
49 views

Doesn't umask apply to files?

I have set the umask to 0. So: $umask 0000 I do echo 'test' > test.txt And test.txt is created. If I do: ls -l test.txt I see: $ls -l test.txt -rw-rw-rw- 1 jim None 5 Jun 30 22:50 ...
1
vote
1answer
287 views

Base permissions on a fat32 usb drive

On linux, the base permissions for directories is 777 and for files, it is 666. Thus, with umask=022, new files are 644 and new directories are 755. But when I mount a usb drive with fat32 ...
2
votes
1answer
187 views

umask base permissions on usb drive [duplicate]

On linux, the base permission for a file is 666 and for directories, it is 777. With a umask=022, new files and directories have permissions 644 and 755 respectively. When I mount a usb drive with ...
1
vote
1answer
545 views

Properly Setting Red Hat Daemon Umask

I've been trying to figure out the proper location to set daemon umasks in RedHat 5. All my searches lead to setting it in /etc/init.d/functions or /etc/sysconfig/init. What are the pros/cons of ...
1
vote
0answers
246 views

Apache created files and its permissions for CentOS 6.x

In short, I have an authenticated HTTP-POST that: posts a jpg image (created as 666 apache:www) into /directory1 (777 ftpuser:www) creates /directory2 (created as 666 apache:www) in a 777 ...
0
votes
3answers
1k views

Why is umask setting a different permission for a directory and file I have created?

Consider: [user@server1 ~]$ umask 0770 [user@server1 ~]$ mkdir TEST2; touch TEST2.txt; [user@server1 ~]$ ls -l d------rwx 2 user group_name 4096 Mar 5 05:16 TEST2 -------rw- 1 user group_name 0 ...
2
votes
1answer
243 views

How are default permissions determined (on OS X)?

My (limited) understanding of basic Unix is that any files that are created will be created based on the permissions of the creating user. In particular, the group assigned will be the creating user's ...
3
votes
1answer
124 views

How to display the permissions of a new file in the status line of the Vim editor?

With the following piece of code I get the permissions for an existing file: augroup Get_file_perm autocmd! autocmd BufWinEnter,FileChangedShell * let w:file_perm=getfperm(expand('%:p')) augroup ...
0
votes
4answers
1k views

umask is not working for directories

I have an odd problem with umask. My current setting is: $ umask 0022 $ umask -S u=rwx,g=rx,o=rx This only works for files though and not directories: $ touch abc $ ll abc 0 -rw-rw-rw- 1 user1 ...
2
votes
2answers
440 views

Pre-defined umask under a given path [duplicate]

Possible Duplicate: How to set default file permissions for all folders/files in a directory? Say I have default umask, umask1. I would like all files/folders that I create/modify under a ...
3
votes
2answers
211 views

What is the proper solution to a web server trying to write to a directory?

So, I have a box with a "deploy" user. This deploy user owns a code repository and wordpress is running on this box... When wordpress attempts to do something like upload a plugin, it is using the ...
2
votes
4answers
2k views

Why is the default umask value for useradd in openSuSE set to 022?

I recently built a very simple test environment with oepnSuSE. As I tried to configure a shared directory, wihtout using ACLs, but with SetGID on that directory instead for some reason, I noticed ...
1
vote
1answer
123 views

Why are directories created with permissions 2070 and files with 060 in a directory with setgid bit?

I have the following directory: $ ll -d neptune drwxrws---+ 5 beamin psych 4096 Mar 7 16:18 neptune $ getfacl neptune # file: neptune # owner: beamin # group: psych # flags: -s- user::rwx ...
2
votes
1answer
166 views

Permissions UMASK for New Directories

I have a directory "dir1" who's owner is "owner1" and it has 775 permissions. Another user in the same group as "owner1" is called "owner2" Whenever a file is written to "dir1" by "owner2" I need ...
4
votes
2answers
2k views

Using umask to set group permissions

A long time ago an old friend showed me a way to use an octal or hex umask with a group I think using /etc/profile. I'm not sure. I'm trying to create group on Debian so that every member of that ...
5
votes
4answers
3k views

Downsides of umask 077?

What are the cons, for having a restrictive umask of 077? A lot of distros (I believe all, except Red Hat? ) have a default umask of 022, configured in /etc/profile. This seems way too insecure for a ...