Linux Collaborative Directories - ERROR

Setup a collaborative directory /sysops/data

sudo mkdir -p sysops/data

The directory should be group owned by the group sysops and the group should own the files inside the directory.

sudo chgrp -R sysops sysops/

The directory should be read/write/execute to the group owners, and others should not have any access.

sudo chmod 070 sysops/

I’m not sure where I’m going wrong. Any help/suggestions would be very helpful.

Hi jyoti

You need to apply the guid for the group it is a special permission that is set by chmod g+s
so that the groups automatically owns the files then you need to apply the other permissions as stated in the question
if you list you should see for the group rws
retry and you will be fine

Hi

Solved the question with these commands & it’s accepted.

sudo mkdir -p /dir/subdir
sudo chown root:group /dir/subdir
sudo chmod 770 /dir/subdir

I’m not sure if they have asked about the special group permission (chmod g+s or chmod 2770) how come this solution is working??

Hi,
ok that is fine
i see you gave ownership to the group and full rights to user and group if it works it works
but the files created are not automatically owned by the group
if this is asked in an exam like redhat or lfcs it is always special permissions
take care and happy learning
Iwab

1 Like