This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes Linux / UNIX and the fly likes How to set permissions for specified users Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "How to set permissions for specified users" Watch "How to set permissions for specified users" New topic
Author

How to set permissions for specified users

Minal Silimkar-Urankar
Ranch Hand

Joined: Nov 25, 2007
Posts: 136
I want to set some specific permissions for specified users only.
Like read permission for specified files for selected users only.

How I will do that?
[ March 17, 2008: Message edited by: minal silimkar ]

Minal Silimkar
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17148
    
  27

You can set up a special group, add the users to that group, then set the group ownership of the files and directories.

For even finer control, you can use Selinux, but that's too complicated to describe here.


An IDE is no substitute for an Intelligent Developer.
Anand Hariharan
Rancher

Joined: Aug 22, 2006
Posts: 272

Which OS, Minal?

In AIX, one has 'setfacl' that can be used to do exactly what you want. Solaris had something similar, but not so easy to use as AIX.

Tim is right, of course, but to create a group with specific users, one needs administrative privileges.

- Anand


"Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away." -- Antoine de Saint-Exupery
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to set permissions for specified users
 
jQuery in Action, 3rd edition