Solved

linux - permission

Posted on 2013-05-14
4
359 Views
Last Modified: 2013-05-31
How one can give permission based on this scenario

Lets say this is the directory structure

/a/b/c/d

1. You should not change any existing permission
2. in the d directory i need to give r/w access
3. root level only root has r access, group and others have no permission.
4. ACL is not allowed
0
Comment
Question by:ittechlab
  • 2
4 Comments
 
LVL 21

Expert Comment

by:Mazdajai
Comment Utility
Not sure what you mean? What are you trying t accomplish?
0
 
LVL 34

Assisted Solution

by:Duncan Roe
Duncan Roe earned 300 total points
Comment Utility
Any user entitled to access "d" must have at least execute access to "a", "b" & "c".
You can set the sticky bit on "d" (chmod o+t /a/b/c/d) to assure that only the user that created a file can delete it (same as /tmp). Also users need write access to the "d" directory if they are to create files.

I am ignoring your point 1: you cannot give permission without changing permissions.
0
 
LVL 6

Expert Comment

by:Vijay Pratap Singh
Comment Utility
As per your scenerio :

chmod r+w /a/b/c/d

chmod r /a
0
 
LVL 34

Accepted Solution

by:
Duncan Roe earned 300 total points
Comment Utility
@rickyzen: that doesn't work
07:45:28# chmod r+w /a/b/c/d
chmod: invalid mode: 'r+w'
Try 'chmod --help' for more information.

Open in new window

I suspect you may have meant something like
07:50:28# chmod a+rw /a/b/c/d
07:51:28# 
07:51:42# chmod -R a+x /a

Open in new window

a+r is not strictly necessary for /a/b/c/d, but without it ls is not available.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Python Assistance 7 31
unix example issues 18 44
How to Insert a File Using Text Editor 9 50
BASH script to modify crontab? 3 19
Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now