aspose file tools*
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 The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript 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
Ranch Hand

Joined: Nov 25, 2007
Posts: 133
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: 16019
    
  20

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.


Customer surveys are for companies who didn't pay proper attention to begin with.
Anand Hariharan
Rancher

Joined: Aug 22, 2006
Posts: 257

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
 
Consider Paul's rocket mass heater.
 
subject: How to set permissions for specified users