How can I give another user read/write access to a specific sub folder and the ability to ls the tree but only for the folder they have access to?
0
votes
1
answer
737
views
I have a user
user1
that has a bunch of folders in their home directory, including /home/user1/data/special/files
.
I have another user user2
.
I want:
- user2
to be able to read/write files/folders in /home/user1/data/special/files
- user2
to be able to ls
:
- /
and see /home
- /home
and see /home/user1
- /home/user1
and see /home/user1/data
but not other files/folders in /home/user1
- /home/user1/data
and see /home/user1/data/special
but not other files/folders in /home/user1/data
- /home/user1/data/special
and see /home/user1/data/special/files
but not other files/folders in /home/user1/data/special
I used setfacl
to set permissions to /home/user1/data/special/files
but it does not let them browse the path.
sudo setfacl -Rm d:u:user1:rwx,u:user1:rwx /home/user1/data/special/files
`
I do not want to hange the user/group owner of any of these folders because they ultimately should belong to user1
.
If it helps, here are more specific details.
I'm using a web app/service running on this box. The web app/service is running as user2
. In the web app/service, I have to browse/navigate to a folder with the files I want to see. So I have to go to:
1. /
then
2. /home
then
3. /home/user1
then
4. /home/user1/data
then
5. /home/user1/data/special
then
5. /home/user1/data/special/files
I cannot just enter /home/user1/data/special/files
.
Is this possible?
Asked by IMTheNachoMan
(433 rep)
Jul 14, 2023, 03:17 AM
Last activity: Jul 14, 2023, 04:53 AM
Last activity: Jul 14, 2023, 04:53 AM