- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: permission with chomd $ chown
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
тАО08-04-2009 03:21 AM
тАО08-04-2009 03:21 AM
permission with chomd $ chown
uid=1001(test1) gid=1(other)
$ ls -al /etc/data
-r-------- 1 root other 394 jan 25 18:28 /etc/data
$ cat /etc/data
cat:cannot open /etc/data
what all options i have to enable both root and test1 to read /etc/data
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-04-2009 03:27 AM
тАО08-04-2009 03:27 AM
Re: permission with chomd $ chown
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-04-2009 03:31 AM
тАО08-04-2009 03:31 AM
Re: permission with chomd $ chown
Currently only root has got the read permission, you can set chmod 444 if you want both test user also to have read permission
Thanks
Jitesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-04-2009 03:44 AM
тАО08-04-2009 03:44 AM
Re: permission with chomd $ chown
Presently only owner can read the file;ie root and the permission is 400.
Change it it to 444;
#chmod 444 /etc/data
Verify with,
#ll /etc/data
Regards,
LIJEESH N G
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-04-2009 04:15 AM
тАО08-04-2009 04:15 AM
Re: permission with chomd $ chown
Changing it to 444 will meet the requirement. But please not that all others can also read /etc/data.
#chmod 444 /etc/data
If you want ONLY root and test1 wants to see this then you need to do something else
Regards,
Sooraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-04-2009 04:54 AM
тАО08-04-2009 04:54 AM
Re: permission with chomd $ chown
chown test1 /etc/data
chmod 400 /etc/data
Result:
-r-------- 1 test1 other 394 jan 25 18:28 /etc/data
This would fulfill the requirement: test1 can read the file because he's the owner, and root can do anything with it because he's root.
Note that test1 can change the permissions of the file because he owns it.
------------
If the user test1 must not be able to change file permissions, then you must create a new group and to the group as its only member. (You don't need to change test1's primary group: the new group can be a secondary group)
# groupadd datagrp
# chown root:datagrp /etc/data
# chmod 640 /etc/data
# usermod -G datagrp test1
Result:
-rw-r----- 1 root datagrp 394 jan 25 18:28 /etc/data
$id
uid=1001(test1) gid=1(other) groups=NNN(datagrp)
Now test1 can read the file because of group membership, but cannot change its permissions because he isn't the owner of the file.
Root can still do anything: the rw permissions for root are just a reminder of this fact.
Advantages: if other users need to access /etc/data, just add them to the datagrp group. If test1 moves to other duties and will no longer need access to /etc/data, just remove the group membership.
MK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-04-2009 06:17 AM
тАО08-04-2009 06:17 AM
Re: permission with chomd $ chown
This would give read permissions to all (world).
To change only for the group use the command from Pete or 'chmod 440 /etc/data'!
This would create:
-r--r----- 1 root other 394 jan 25 18:28 /etc/data
HTH
Volkmar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-04-2009 06:20 AM
тАО08-04-2009 06:20 AM
Re: permission with chomd $ chown
Likely for the same reason some people just do 'chmod 777' to solve permission problems....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-04-2009 07:41 AM
тАО08-04-2009 07:41 AM
Re: permission with chomd $ chown
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-04-2009 07:49 AM
тАО08-04-2009 07:49 AM
Re: permission with chomd $ chown
>If you want ONLY root and test1 wants to
>see this then you need to do something else
Should he beg then for what he 'need to do'?
V.