- https://github.com/Benjamin-Loison
- Joined on
2022-10-16
Block a user
How to make a user able without
root
to share a folder with given other user(s)
See the message:
-----BEGIN PGP MESSAGE-----
hF4DTQa9Wom5MBgSAQdAnqhq/RFtklAZ9dEWBjGKpxjR0fMaiLvG9oTa7Slp+l0w
VvXPJiZ2+hJqUpcZfl1OYUFT1ivhJZcQdcLKnmtT5JhUy…
How to make a user able without
root
to share a folder with given other user(s)
I verified the metadata leak issue from a fresh environment.
How to make a user able without
root
to share a folder with given other user(s)
The Super User answer 792908 seems to show how to leak metadata of files in parent folders only to the given user.
How to make a user able without
root
to share a folder with given other user(s)
DuckDuckGo search Linux allow traversing directory.
How to make a user able without
root
to share a folder with given other user(s)
As user_2
:
ls -lh /home/user_0/
ls: cannot open directory '/home/user_0/': Permission denied
ls -lh /home/user_0/test.sh
-rwxr-xr-x 1 user_0…
How to make a user able without
root
to share a folder with given other user(s)
/home/user_0/test.sh
:
#!/bin/bash
echo test
How to make a user able without
root
to share a folder with given other user(s)
mkdir new_folder/
ls -lh
Output:
total 52K
drwxr-xr-x 2 benjamin_loison benjamin_loison 4.0K Feb 22 13:17 new_folder
...
…
How to make a user able without
root
to share a folder with given other user(s)
chmod a+x .
does not return anything.
ls -lah .
Output:
ls -lah .
total 40K
drwx--x--x 4 user_0 user_0 4.0K Feb 22 12:44…
How to make a user able without
root
to share a folder with given other user(s)
setfacl -R -b .
does not return anything.
ls -lah
Output:
total 40K
drwx------ 4 user_0 user_0 4.0K Feb 22 12:44…
How to make a user able without
root
to share a folder with given other user(s)
ls -lah
Output:
total 40K
drwxrwx---+ 4 user_0 user_0 4.0K Feb 22 12:44 .
drwxr-xr-x 6 root root 4.0K Feb 22 12:28 ..
-rw-rwx---+ 1…
How to make a user able without
root
to share a folder with given other user(s)
setfacl --help
Output:
setfacl 2.3.1 -- set file access control lists
Usage: setfacl [-bkndRLP] { -m
How to make a user able without
root
to share a folder with given other user(s)
DuckDuckGo search Linux remove ACL.
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.
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::---
How to make a user able without
root
to share a folder with given other user(s)
DuckDuckGo search Linux list ACL.
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…
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
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
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
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…