aspose file tools*
The moose likes Linux / UNIX and the fly likes Unix Specific directory Access Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "Unix Specific directory Access " Watch "Unix Specific directory Access " New topic
Author

Unix Specific directory Access

Srinivas Palam
Ranch Hand

Joined: Oct 20, 2005
Posts: 51
Hi Everyone,

I have 3 directories on unix server. I want to give user's write permission to two directories only. How do I do that?
1. Can some explain with example?
2. Are the users has to part of unix group(plprod)?

Example:
Unix Server Name: prime
Unix Group: plprod

Directory Structure:
drwxrwx--- abc plprod /export/appl/plprod/Data1 <-- I want to give write access to this directory

drwxrwxr-x abc plprod /export/appl/plprod/source/Data2 <-- I want to give write access to this directory

drwxrwxr-x abc plprod /export/appl/plprod/Data3 <-- leave as is

Thanks
Srinivas


Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5843
    
    7

Who owns these files? Who is the owner and what is the group? If plprod is the group, then everyone in that group already has write privileges. You can remove the write privileges for the last directory by running:

chmod g-w /export/appl/plprod/Data3

If plprod is not the group, I would make plprod the group first.


JBoss In Action
Srinivas Palam
Ranch Hand

Joined: Oct 20, 2005
Posts: 51
These directories are owned by abc id and group is plprod. If the new user is part of plprod group he will get access to all the files and directories under plprod group, but I want the new users to have access to below directories only. How do I restrict the access?


drwxrwx--- abc plprod /export/appl/plprod/Data1 <-- I want to give write access to this directory

drwxrwxr-x abc plprod /export/appl/plprod/source/Data2 <-- I want to give write access to this directory

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Unix Specific directory Access