Benjamin_Loison commented on issue Benjamin_Loison/linux#60 2025-02-22 12:52:48 +01:00
How to make a user able without root to share a folder with given other user(s)

DuckDuckGo search Linux give access to a user to a folder without giving access to parent folder.

Benjamin_Loison commented on issue Benjamin_Loison/linux#60 2025-02-22 12:51:36 +01:00
How to make a user able without root to share a folder with given other user(s)
getfacl .
Output:
# file: .
# owner: user_0
# group: user_0
user::rwx
user:user_1:rwx
group::---
mask::rwx
other::---
Benjamin_Loison commented on issue Benjamin_Loison/linux#60 2025-02-22 12:50:56 +01:00
How to make a user able without root to share a folder with given other user(s)

DuckDuckGo search Linux list ACL.

Benjamin_Loison commented on issue Benjamin_Loison/linux#60 2025-02-22 12:50:43 +01:00
How to make a user able without root to share a folder with given other user(s)

As user_0:

ls /home/user_0/
ls: cannot open directory '/home/user_0/': Permission denied

so this is not perfect but it is a good start.

How can we figure out…

Benjamin_Loison commented on issue Benjamin_Loison/linux#60 2025-02-22 12:47:12 +01:00
How to make a user able without root to share a folder with given other user(s)

As user_1:

ls /home/user_0/
folder_to_share_with_user_0_and_1
Benjamin_Loison commented on issue Benjamin_Loison/linux#60 2025-02-22 12:46:22 +01:00
How to make a user able without root to share a folder with given other user(s)
ls /home/
benjamin_loison  user_0  user_1  user_2
Benjamin_Loison commented on issue Benjamin_Loison/linux#60 2025-02-22 12:45:50 +01:00
How to make a user able without root to share a folder with given other user(s)

On user_1 still face:

ls /home/user_0/folder_to_share_with_user_0_and_1/
ls: cannot access '/home/user_0/folder_to_share_with_user_0_and_1/': Permission denied
Benjamin_Loison commented on issue Benjamin_Loison/linux#60 2025-02-22 12:44:28 +01:00
How to make a user able without root to share a folder with given other user(s)
ls -lha
Output:
total 36K
drwx------  3 user_0 user_0 4.0K Feb 22 12:29 .
drwxr-xr-x  6 root   root   4.0K Feb 22 12:28 ..
-rw-------  1…
Benjamin_Loison commented on issue Benjamin_Loison/linux#60 2025-02-22 12:43:51 +01:00
How to make a user able without root to share a folder with given other user(s)

As user_0:

setfacl -R -m u:user_1:rwx folder_to_share_with_user_0_and_1/

does not return anything.

Benjamin_Loison commented on issue Benjamin_Loison/linux#60 2025-02-22 12:42:33 +01:00
How to make a user able without root to share a folder with given other user(s)
ls /home/user_0/folder_to_share_with_user_0_and_1/
ls: cannot access '/home/user_0/folder_to_share_with_user_0_and_1/': Permission denied
Benjamin_Loison commented on issue Benjamin_Loison/linux#60 2025-02-22 12:42:16 +01:00
How to make a user able without root to share a folder with given other user(s)

So the aim is not to have access to /home/user_0/ but just the mentioned subfolder.

Benjamin_Loison commented on issue Benjamin_Loison/linux#60 2025-02-22 12:41:54 +01:00
How to make a user able without root to share a folder with given other user(s)

From user_1:

ls /home/user_0/
ls: cannot open directory '/home/user_0/': Permission denied

on Debian 12 GNOME.

Benjamin_Loison commented on issue Benjamin_Loison/linux#60 2025-02-22 12:33:12 +01:00
How to make a user able without root to share a folder with given other user(s)
FOLDER=~/folder_to_share_with_user_0_and_1/sub_folder_to_share_with_user_0_and_1
mkdir $FOLDER/
echo secret > $FOLDER/file_to_share_with_user_0_and_1.txt
Benjamin_Loison commented on issue Benjamin_Loison/linux#60 2025-02-22 12:32:38 +01:00
How to make a user able without root to share a folder with given other user(s)

I like recursivity so let us look for recursive approach.

Having to run again the permission grant on new recursive folder is fine in my opinion for the moment.

Benjamin_Loison commented on issue Benjamin_Loison/linux#60 2025-02-22 12:30:29 +01:00
How to make a user able without root to share a folder with given other user(s)

In theory can leverage the chown other user group to have both users having access, but let us consider the cleaner more general case.

Benjamin_Loison commented on issue Benjamin_Loison/linux#60 2025-02-22 12:29:51 +01:00
How to make a user able without root to share a folder with given other user(s)
mkdir ~/folder_to_share_with_user_0_and_1/
Benjamin_Loison commented on issue Benjamin_Loison/linux#60 2025-02-22 12:11:22 +01:00
How to make a user able without root to share a folder with given other user(s)

DuckDuckGo search Linux give access to a user to a folder.

Benjamin_Loison commented on issue Benjamin_Loison/linux#60 2025-02-22 12:11:01 +01:00
How to make a user able without root to share a folder with given other user(s)

So the aim is not to create a group for all (used) combinations of user permission access.

Benjamin_Loison commented on issue Benjamin_Loison/linux#60 2025-02-22 12:10:16 +01:00
How to make a user able without root to share a folder with given other user(s)
The persons:
-----BEGIN PGP MESSAGE-----

hF4DTQa9Wom5MBgSAQdAbVD1Fr1s/4JfZDgkHO2hSZ3jzxkp7l3r9YF4N3mMuWIw
xdDO5OF3iP+/e0hr77lftNy1wbPhK7j7fqlyaFZSHduTiHlFa…