I would like to ask, is there a way to find out the list of users or scripts that executed a umask command for a given time? Our server has been having issues about files being written with 000 access, and we need to find out if it's because someone or some code is playing around with umask.
The method proposed by "thegeek" will not work for "umask" unless it is called as /usr/bin/umask. The "umask" command is built into all the main shells on HP-UX.
Have you checked the kernel parameters? Particularly any to do with maximum number of open files or maximum number of file locks. I have seen files on HP-UX with permissions 000 after a program died silently due to exceeding a kernel parameter.
Some key kernel parameters visible in "sar" (look for figures in the ov=overflow columns), but HP "glance" is better.
I would add:
What makes you think it has something to do with umask and not chmod? (Ive seen developers do so with chmod...)
I thought that was so, because for all instances of the 000 access (there have been four within 2 months), it happened exactly after the file was written, disabling all other future reads to it. The process that writes those files are completely automatic, so I am doubtful that someone had perfect timing to execute chmod just exactly when the file was written.
Quote:
Originally Posted by methyl
The method proposed by "thegeek" will not work for "umask" unless it is called as /usr/bin/umask. The "umask" command is built into all the main shells on HP-UX.
Have you checked the kernel parameters? Particularly any to do with maximum number of open files or maximum number of file locks. I have seen files on HP-UX with permissions 000 after a program died silently due to exceeding a kernel parameter.
Some key kernel parameters visible in "sar" (look for figures in the ov=overflow columns), but HP "glance" is better.
Code:
sar -v
Thanks, I will look more into the sar command, as it is my first time to hear about it. Do you mean that you saw a 000 file after a program died after exceeding a kernel parameter, and that program was writing the file? Or could it possibly be another program that died, and affected the writing of another program?
Hi guys,
I want all new files and directories created, or copy file give this permisson "rwxrwx---", with chmod i do this with octal value "770". If i execute "umask 770" the permissons is not the same with new or copy file. How can i configure this command? I do not understand the "man... (1 Reply)
I have an expect script that interrogates several hundred unix servers for both access and directories therein using "ssh user@host ls -l /path". The combination of host/path are unique but the host may be interrogated multiple times if there are multiple paths to test.
The expect script is run... (2 Replies)
Hi,
Please, let me know how the umask is working? As per my understanding is aprt from subtracting from 666/777, logical gate operation is performing.
Ex: If I set uname 011, it gave the permission like 666 for file. Request you to explain which gate's operation performed.
$uname 011... (4 Replies)
Due to urgent requirement to resolve some permission issues , I wish
to set solaris 8 server so that any file written is on 777 .
I guess need to set umask , how to set it ?? (7 Replies)
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)
hai guys ,
i am having problem in getting the knowledge about umask.
actually when i am putting command as umask some value is coming like 0022 by defalut.
we can change its value also.
but the main thing is thye file permisiion actually depends upon umask.how is it depends upon umask i want to... (6 Replies)
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)