'umask' is a subtractive value, so files and directories are evaluated differently.
will have a octal value of 666 and,
will have an octal value of 777
You cannot set a 'umask' for files = '777'
Last edited by AlphaLexman; 05-02-2011 at 10:14 PM..
in this unix book that i have, it says:
the statement:
filedes = open(pathname, O_CREAT, mode);
is actually
filedes = open(pathname, O_CREAT, (~mask)&mode); /* ~ is the negation symbol */
like it's doing some type of masking.
for example,
fd =... (1 Reply)
I changed the umask in /etc/security/user to 027.
I changed the umask in /etc/profile to 027.
My current shell is ksh.
My .profile doesn't make any changes to umask or call other scripts that change umask.
Running AIX 5.3
I still get a umask of 022 instead of the expected 027. I have no... (1 Reply)
Hi,
I have a doubt on the umask values.
Why is the UMASK value is different from file and directory?
Suppose if the umask value is 0022. The file permissions for a newly created file is 644 and the file permissions for a newly created directory is 755.
My doubt is why can't it be the... (1 Reply)
how can I find cpu usage memory usage swap usage and
I want to know CPU usage above X% and contiue Y times and memory usage above X % and contiue Y times
my final destination is monitor process
logical volume usage above X % and number of Logical voluage above
can I not to... (3 Replies)
Hi,
I want to monitor the current cpu usage, monitor usage , disk I/o and network utlization for solaris using SNMP.
I want the oids for above tasks.
can you please tell me that
Thank you (2 Replies)
I need to set a umask of 022 for my ssh sessions, or within my profile.
I have set the umask in both bash_profile and bashrc.
and when i run umask i get 0022 but when i create a file i get,
# touch test.txt
# ls -l test.txt
-rw------- 1 root root 0 Apr 26 12:25 test.txt
it seems like... (1 Reply)
Hi all,
Can you please tell me the command, with which one can know the amount of space a specific directory has used.
df -k . ---> Displays, the amount of space allocated, and used for a directory.
du -k <dir name> - gives me the memory used of all the files inside <dir>
But i... (2 Replies)
Let's say i have 20 users logged on Server. How can I know how much memory percent used each of them is using with system time in each user? (2 Replies)
Discussion started by: roy1912
2 Replies
LEARN ABOUT HPUX
umask
umask(2) System Calls Manual umask(2)NAME
umask - set and get file creation mask
SYNOPSIS DESCRIPTION
sets the process's file mode creation mask to cmask and returns the previous value of the mask. Only the file access permission bits of
the masks are used.
The bits set in cmask specify which permission bits to turn off in the mode of the created file, and should be specified using the symbolic
values defined in stat(5).
EXAMPLES
The following creates a file named in the current directory with permissions so that the file can be written only by its owner, and can be
read or executed only by the owner or processes with group permission, even though group write permission and all permissions for others
are passed in to
RETURN VALUE
The previous value of the file mode creation mask is returned.
SEE ALSO mkdir(1), sh(1), mknod(1M), chmod(2), creat(2), mknod(2), open(2).
STANDARDS CONFORMANCE umask(2)