Solved

linux - permission

Posted on 2013-05-14
4
365 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
ID: 39166815
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
ID: 39166915
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
ID: 39167079
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
ID: 39169801
@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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Regular patching is part of a system administrator's tasks. However, many patches require that the system be in single-user mode before they can be installed. A cluster patch in particular can take quite a while to apply if the machine…
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
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.

867 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

20 Experts available now in Live!

Get 1:1 Help Now