Sharing files between users with stickybit and setgid

SpongeB0B

Member
Joined
Feb 11, 2022
Messages
30
Reaction score
7
Credits
270
Hi everyone,

I would like to share files between users ( /home/tester )

I would like that only members of the group tester have access to that folder and can only delete their files

I've tried the following

Bash:
su

groupadd tester
useradd -m -c "John Doe" John
passwd John

usermod -aG tester John
usermod -aG tester Marie

mkdir /home/tester
cd /home/tester

chown :tester .
chmod +t .
chmod -R g+s .
setfacl -Rm g:tester:rwx,d:g:tester;rwx .



so John and Marie have access to /home/tester they can create files, read the files of the others, but can't edit files from others.. any ideas ?

Bash:
su

getfacl /home/tester/by_john.txt

# file: home/tester/by_John.txt
# owner: John
# group: tester
user::rw-
group::r-x            #effective:r--
group:tester:rwx        #effective:rw-
mask::rw-
other::---
 
Last edited:


OP
SpongeB0B

SpongeB0B

Member
Joined
Feb 11, 2022
Messages
30
Reaction score
7
Credits
270
ooh I think I see what going on, The sticky bit prevent everyone else than the owner of the file to delete it, so therefor edit it too
 

Staff online

Members online


Latest posts

Top