You are not logged in.
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
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 ?
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 by SpongeBOB (2022-04-19 11:59:48)
Linux noob, plz be kind
Offline
Brianna Ghey — Rest In Power
Offline
Thanks HOAS, I don't understand I beleive my commands cover whats in that link..
btw Marie & John are both in the tester group
cat /etc/group | grep tester
tester:x:1001:John,marie
and the file created by John has it GID as tester
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::---
and we can see --> group:tester:rwx
So why marie that part of tester can't delete/modify it ?
Additionnaly ls -l on the /home/tester give:
drwxrws--T+ 2 root tester 4.0K Apr 18 11:17 tester
As it should be, right ?
Last edited by SpongeBOB (2022-04-19 11:25:05)
Linux noob, plz be kind
Offline
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
Linux noob, plz be kind
Offline
Here's how the file should look:
$ getfacl /home/test/empty
getfacl: Removing leading '/' from absolute path names
# file: home/test/empty
# owner: empty
# group: test
user::rw-
group::r--
other::r--
$
^ That was after following the linked guide and any user in the test group can delete (but not modify) /home/test/empty. The sequence you have posted does not match the content of my provided link.
Brianna Ghey — Rest In Power
Offline