- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- How to get the file access permissions?
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-20-2004 09:44 PM
тАО04-20-2004 09:44 PM
How can I get the file access permissions, i.e. the number to use in the chmod to change the permissions on a certain file?
I mean 775, 777, and so on ...
Does it exist a command to read it for a file?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-20-2004 09:47 PM
тАО04-20-2004 09:47 PM
Re: How to get the file access permissions?
The first number is for the owner of the file, the second is for the group the owner belongs to, and the third is for all other users.
4 = read
2 = write
1 = execute.
4 + 2 = 6 = read and write etc.
man chmod should help if you need any more information.
Mark Syder (like the drink but spelt different)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-20-2004 09:49 PM
тАО04-20-2004 09:49 PM
Re: How to get the file access permissions?
ls -l FILENAME
Peace, R.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-20-2004 09:50 PM
тАО04-20-2004 09:50 PM
Re: How to get the file access permissions?
The transformation is the following :
r --> 4
w --> 2
x --> 1
for each level owner / group / other.
I don't know if there is any utilitie to do this automatically ?
Anyway, if you're more confortable with the letters, you can use this kind of syntax :
chmod o+x filename
to give execution permession to other on filename.
Cheere
Nicolas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-20-2004 09:52 PM
тАО04-20-2004 09:52 PM
Re: How to get the file access permissions?
getaccess -n file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-20-2004 09:55 PM
тАО04-20-2004 09:55 PM
Re: How to get the file access permissions?
i.e. chmod 777 filename
First bit is the permission of Owner i.e. 4+2+1 = 7 means r(4),w(2),x(1)
Second one is for the group
Thrid one is for others
There can be one more in the bigining and it is used for setuid , sticky and stuff like that.
i.e. chmod 1777 filename
Regds,
Kaps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-20-2004 10:10 PM
тАО04-20-2004 10:10 PM
Re: How to get the file access permissions?
You gave evry one 1 pts.
Is becaue it's not tricky technical stuff or because you were looking for another thing ?
Nicolas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-20-2004 10:13 PM
тАО04-20-2004 10:13 PM
Re: How to get the file access permissions?
what a shame to get 10pts for such a question ;-)
Peace, R.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-20-2004 10:15 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-20-2004 10:17 PM
тАО04-20-2004 10:17 PM
Re: How to get the file access permissions?
as far as I know a specific command doesn't exist to get permissions in number of a file (if I understand well your question).
Anyway 'man chmod' has all details for combinations of permissions: e.g.
0400 (= u=r) Read by owner 0200 (= u=w) Write by owner 0100 (= u=x) Execute (search in directory) by owner
0040 (= g=r) Read by group 0020 (= g=w) Write by group 0010 (= g=x) Execute/search by group
0004 (= o=r) Read by others 0002 (= o=w) Write by others 0001 (= o=x) Execute/search by others
and many more.
Also use
# umask
or
# umask -S
to see permissions set when creating a file.
Here too: for further details how to change it 'man umask'.
Hope this helps you and definitively satisfy your question.
Best regards,
Ettore