![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| To give the "unzip" permissions & "create" file permissions | Mike1234 | HP-UX | 3 | 03-02-2008 02:34 PM |
| help with file permissions | bbbngowc | Security | 3 | 12-21-2007 10:34 AM |
| File permissions | beginner1 | UNIX for Dummies Questions & Answers | 5 | 04-12-2006 09:56 AM |
| file permissions | mohanprabu | Shell Programming and Scripting | 4 | 05-31-2005 06:19 AM |
| File and Dir permissions | thomas.jones | UNIX for Dummies Questions & Answers | 11 | 04-19-2002 06:35 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hi all,
My UNIX box is HP UX - 11.11. I have got a basic doubt. What are the global permissions for a file and directory? I set the mask as 111 in my .profile. When I create a new file, it gets created withe -rw-rw-rw- permissions. A directory is created with drw-rw-rw- permissions. So, i thought the global permissions were 777 for both file and directory. I changed the mask to 002. Now the file got created with -rw-rw-r-- permission and the directory with drwxrwxr-x. Does this mean the file has global permissions of 666 and directory - 777 and setting umask as 111 is not going to alter the global permissions of files being created. It would be helpful if someone could throw some light on this. Thanka, Ranjith |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
#3
|
|||
|
|||
|
that was very useful
Thanks for the link, Perderabo. It was very useful. But one doubt I still have in my case is that even after setting 'umask 022'; I am getting a file with -rw-rw-rw- permissions. I thought I should get -rwxr-xr-x.
AM I saying something wrong??? |
|
#4
|
||||
|
||||
|
You still have it wrong. Reread that article. You should not get what say you expect nor what you say that you get. I get the expected result:
Code:
# # uname -svr HP-UX B.11.11 U # rm testfile rm: testfile non-existent # umask 0 # touch testfile # ls -l testfile -rw-rw-rw- 1 root sys 0 Nov 15 11:28 testfile # rm testfile # umask 022 # touch testfile # ls -l testfile -rw-r--r-- 1 root sys 0 Nov 15 11:29 testfile # |
|
#5
|
|||
|
|||
|
mistake done
Sorry Perderabo, I posted it wrong and didnt even check that. Well I get the same permissions.
One last question. From what I could interpret, setting - umask 111 will give 666 permissions to all files created. Setting umask 000 will also give 666 permission to all files created. I hope that is correct. Pls correct me if I have got it wrong. Thanks a lot for your patience. |
|
#6
|
||||
|
||||
|
You still have it wrong. That link represented my best effort to explain the permissions. I put a lot of time into that and since it is not working for you I must give up.
|
|
#7
|
|||
|
|||
|
From Perderabo's handy permissions thread:
Quote:
|
|||
| Google The UNIX and Linux Forums |