rocket mass heater kickstarter
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 Elasticsearch in Action this week in the Big Data 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

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: 16473

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

Joined: Aug 22, 2006
Posts: 258

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
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: How to set permissions for specified users