12-16-2016
Just to make it explicitly clear (although implicitly alluded above):
umask defines a MASK to be inverted & ANDed with the permissions supplied: the bits set in it will be turned OFF when a file is freshly created.
man umask:
Quote:
Specifically, permissions in the umask are turned off from the mode argument to open(2) and mkdir(2).
These 2 Users Gave Thanks to RudiC For This Post:
10 More Discussions You Might Find Interesting
1. AIX
hello every body
AIX 4.3.3, i want to set a write permission to files created by other users from windwos explorer or other AIX box in nfs files systems.
how can i do this
any helps will be appreciated (0 Replies)
Discussion started by: bousseta_rachid
0 Replies
2. UNIX for Advanced & Expert Users
Hi!
My question is this:
Is it possible to change the default permissions in UNIX (666 for files and 777 for directories)?.
I am not talking about using the command "umask".
I mean, with the command "umask" you can modify permissions from a default permissions x. Is it possible to make... (4 Replies)
Discussion started by: chicoGuapo
4 Replies
3. Shell Programming and Scripting
Hello people
I need to find a way to generate a file that contains the names of all *.jpg files that were generated after a specific date
The search should start in my current folder and recursively search inner folders
It would be best to list the file names one below the other in the output... (3 Replies)
Discussion started by: jasongr
3 Replies
4. UNIX for Dummies Questions & Answers
I have a file with permisson 711; but when an other user run the program, it can't open. This is the message:
/sbin/sh: ./myprogram: cannot open
Can any1 tell me why please?
Thanks! (6 Replies)
Discussion started by: bobo
6 Replies
5. Shell Programming and Scripting
Hi expert,
I would like to know how to generate file and folder ( including nested subfolder and files) permissions under oracle directory ? (8 Replies)
Discussion started by: skully
8 Replies
6. Solaris
Hi guys
I really want to know about the consequence of giving following command, on solaris 10 (sparc.)
What would be effect of this on whole system and services running on system and what commands will be required exactly to get back the original perms .
I recently tried above command... (3 Replies)
Discussion started by: upengan78
3 Replies
7. Shell Programming and Scripting
I'm getting to grips with this concept of the umask.
What I thought was, setting umask uga+rwx would result in creating files with all permissions for everyone. Seems not to be the case though. Read and write bits get set, but not the execute bit.
Is there some gap in my understanding, or is... (2 Replies)
Discussion started by: tphyahoo
2 Replies
8. Shell Programming and Scripting
I've got a number of people sending files to me in different directory structures, and users on many different groups who need access to these incoming paths.
My problem is that umask assumes a default of 666 for files. No execute bit, meaning that my users can't even see the incoming folders.... (2 Replies)
Discussion started by: Karunamon
2 Replies
9. UNIX for Dummies Questions & Answers
I want to create a GROUP with rwx permission. Also, I want to create a GROUP with root privileges, so that next time i create a user, I just need to add it to any of the groups and privileges automatically applied.
please help.
Thanks,
Shouvanik (4 Replies)
Discussion started by: shouvanik
4 Replies
10. Shell Programming and Scripting
Dear Gents,
Please I need your help... I need small script :) to do the following.
I have a thousand of files in a folder produced daily.
I need first to merge all files called. txt (0009.txt, 0010.txt, 0011.txt) and and to output a resume of all information on 2 separate files in csv... (14 Replies)
Discussion started by: jiam912
14 Replies
LEARN ABOUT DEBIAN
dpns-setacl
DPNS-SETACL(1) DPNS User Commands DPNS-SETACL(1)
NAME
dpns-setacl - set DPNS directory/file access control lists
SYNOPSIS
dpns-setacl [-d] [-m] [-s] acl_entries path...
DESCRIPTION
dpns-setacl sets the Access Control List associated with a DPNS directory/file.
acl_entries is a comma separated list of entries. Each entry has colon separated fields: ACL type, id (uid or gid), permission. Only direc-
tories can have default ACL entries.
The entries look like:
user::perm
user:uid:perm
group::perm
group:gid:perm
mask:perm
other:perm
default:user::perm
default:user:uid:perm
default:group::perm
default:group:gid:perm
default:mask:perm
default:other:perm
The ACL type can be abbreviated to the first letter. The first "user" entry gives the permissions granted to the owner of the file. The
following "user" entries show the permissions granted to specific users, they are sorted in ascending order of uid. The first "group"
entry gives the permissions granted to the group owner of the file. The following "group" entries show the permissions granted to specific
groups, they are sorted in ascending order of gid. The "mask" entry is the maximum permission granted to specific users or groups. It
does not affect the "owner" and "other" permissions. The "mask" entry must be present if there are specific "user" or "group" entries.
"default" entries associated with a directory are inherited as access ACL by the files or sub-directories created in that directory. The
umask is not used. Sub-directories also inherit the default ACL as default ACL. As soon as there is one default ACL entry, the 3 default
ACL base entries (default user, default group, default other) must be present.
The entry processing conforms to the Posix 1003.1e draft standard 17.
The effective user ID of the process must match the owner of the file or the caller must have ADMIN privilege in the Cupv database.
path specifies the DPNS pathname. If path does not start with /, it is prefixed by the content of the DPNS_HOME environment variable.
uid can be given as the username or the corresponding numeric id.
gid can be given as the groupname or the corresponding numeric id.
perm can be expressed as a combination of characters rwx- or as a value between 0 and 7.
OPTIONS
-d remove ACL entries. The "perm" field is ignored.
-m modify existing ACL entries or add new entries.
-s set the ACL entries. The complete set of ACL entries is replaced.
EXAMPLES
Let's create a directory:
dpns-mkdir /dpm/dteam/test/file.log/d6
and add write permission for user bcouturi:
dpns-setacl -m u:bcouturi:rwx,m:rwx /dpm/dteam/test/file.log/d6
Let's create a directory:
dpns-mkdir /dpm/dteam/test/file.log/d7
and add default ACLs to it:
dpns-setacl -m d:u::7,d:g::7,d:o:5 /dpm/dteam/test/file.log/d7
Let's check the resulting ACLs:
dpns-getacl /dpm/dteam/test/file.log/d7
# file: /dpm/dteam/test/file.log/d7
# owner: baud
# group: c3
user::rwx
group::r-x #effective:r-x
other::r-x
default:user::rwx
default:group::rwx
default:other::r-x
Let's create a sub-directory and check the resulting ACLs:
dpns-mkdir /dpm/dteam/test/file.log/d7/d2
dpns-getacl /dpm/dteam/test/file.log/d7/d2
# file: /dpm/dteam/test/file.log/d7/d2
# owner: baud
# group: c3
user::rwx
group::rwx #effective:rwx
other::r-x
default:user::rwx
default:group::rwx
default:other::r-x
Let's create a file in the same directory and check the resulting ACLs:
dpns-touch /dpm/dteam/test/file.log/d7/f2
dpns-getacl /dpm/dteam/test/file.log/d7/f2
# file: /dpm/dteam/test/file.log/d7/f2
# owner: baud
# group: c3
user::rw-
group::rw- #effective:rw-
other::r--
EXIT STATUS
This program returns 0 if the operation was successful or >0 if the operation failed.
SEE ALSO
Castor_limits(4), dpns_chmod(3), dpns_chown(3), Cupvlist(1)
AUTHOR
LCG Grid Deployment Team
DPNS
$Date: 2003/08/26 06:21:13 $ DPNS-SETACL(1)