Solved

linux - permission

Posted on 2013-05-14
4
372 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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

Using 'screen' for session sharing, The Simple Edition Step 1: user starts session with command: screen Step 2: other user (logged in with same user account) connects with command: screen -x Done. Both users are connected to the same CLI sessio…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
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.:
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

749 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