- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: To restrict a directory to a specific user
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
тАО02-28-2011 10:40 AM
тАО02-28-2011 10:40 AM
To restrict a directory to a specific user
I have a directory which all the users [diferents groups] have full access, but how can I restrict that directory to a specific user?
Do I have to modify the passwd file?
My OS is HPUX 3.11
Thanks in advanced.
[DASM]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-28-2011 10:58 AM
тАО02-28-2011 10:58 AM
Re: To restrict a directory to a specific user
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-28-2011 11:00 AM
тАО02-28-2011 11:00 AM
Re: To restrict a directory to a specific user
Lets say I have a directory called
/data
owned by an app user.
group is appuser
if all full access users have the group appuser and the permissions on the directory are at least group read the members of the appuser group will have access and users that are not members of the group will not.
chmod 750 /data
for example.
Basically, prevent users outside the group from access and configure those users you want to keep out not to have the group.
No change in /etc/passwd, some changes in /etc/group and permissions on the directory.
Hope this helps.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-28-2011 11:12 AM
тАО02-28-2011 11:12 AM
Re: To restrict a directory to a specific user
I have 4 users:
user1 [group appuser1]
user2 [group appuser2]
user3 [group appuser3]
user4 [group appuser4]
The directory data has the following permissions:
drwxrwxrwx 4 user1 appuser2 8192 Nov 25 19:58 data
How can I restrict this directory to user4?
I can not change the group to the users.
Thanks in advanced.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-28-2011 11:23 AM
тАО02-28-2011 11:23 AM
Re: To restrict a directory to a specific user
>How can I restrict this directory to user4?
chown user4 data
chmod go-w data
If you don't want then to even see the files you can remove rx.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-28-2011 11:26 AM
тАО02-28-2011 11:26 AM
Re: To restrict a directory to a specific user
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-28-2011 11:26 AM
тАО02-28-2011 11:26 AM
Re: To restrict a directory to a specific user
The problem is everybody need to access this directory, except user4.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-28-2011 12:09 PM
тАО02-28-2011 12:09 PM
Re: To restrict a directory to a specific user
(Then "restrict" was probably the wrong word, exclude would have been better.)
You could use ACLs to only allow user1 ... user3 or their groups. If there is more to "everybody", just add them one by one.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-01-2011 12:36 AM
тАО03-01-2011 12:36 AM
Re: To restrict a directory to a specific user
you can add user1 to user3 to a new group (additional to the existing one).
Then assign the dir to this new group, then exclude other users to access the dir.
chgrp
chmod 770 data
If you want this rights also for subdir or files use the option -R.
HTH
V.