Solved

linux - permission

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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

Suggested Solutions

Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consol…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

777 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