How give the permission to access subfolders in /root?
Solution 1
The user needs the x
permission to every folder in the hierarchy. Usually, the /root
directory does not allow any user other than root
to enter it, so start there and work your way down.
I suggest you move this somewhere else though, if possible. If you're not careful, data belonging to root might become public accidentally.
Solution 2
you will need to check the permission chain,
idea:
Can mike access /
Can mike access /root
Can mike access /root/Products
...
Can mike access /root/Products/Metadata/ApplicationServers/Port8080/Marker/mike
read is not necessary, but execute to traverse folder is minimum.
idea: chmod 711
to each folder on the tree
Related videos on Youtube
Valter Silva
Updated on September 18, 2022Comments
-
Valter Silva over 1 year
I need give the permission to
read/write
in this folder, which are subfolder of/root
directory tomike.jackson
(for some reason someone crete this folder inside /root) :/root/Products/Metadata/ApplicationServers/Port8080/Marker/
Given
ls -la
this are the permission:total 12 drwxrwxrwx 3 webproject_deployer users 4096 Sep 1 2010 . drwxrwxrwx 3 webproject_deployer users 4096 Aug 4 2010 .. drwxrwxrwx 6 webproject_deployer users 4096 Mar 15 2011 xml
So I add
mike.jackson
to theusers
groupusers:x:100:mike.jackson
Still, he can't access the folder.
This is the
owner
settings:webproject_deployer:x:1071:100::/home/webproject_deployer:/bin/bash
The user are authenticate by
LDAP
, so doesmike.jackson
. What should I do here ? I don't want to addmike.jackson
into sudoers 'cause if I did, I can't guarantee that he won't execute a malicious command assudo
inside this folder.