EX200 Exam QuestionsBrowse all questions from this exam

EX200 Exam - Question 55


SIMULATION -

Who ever creates the files/directories on a data group owner should automatically be in the same group owner as data.

Show Answer
Correct Answer:

To ensure that files and directories created within a specific directory inherit the group ownership of that directory, you need to set the setgid (Set Group ID) bit on the directory. This can be accomplished by running the command 'chmod g+s /data'. Additionally, you can verify that the setgid bit is set by using the command 'ls -ld /data' and checking that the directory permissions reflect 'rws' for the group (indicated by the presence of the 's' in the group permissions section), like this: 'drwxrws--- 2 root sysadmin 4096 Mar 16 18:08 /data'. This configuration ensures that any new files and directories created within '/data' will automatically have the group ownership of '/data'.

Discussion

1 comment
Sign in to comment
cloudyhr
Jan 3, 2022

As per my understanding, files and folders created under /data should inherit the owner: group permission. we can achieve this by setting GUID. chmod 2770 /data 2 –setGUID 7 –Set users full perissions 7 –set group full permission 0 –set other no permissions

kitkat
Jun 22, 2022

It is not mentioned that group has 7 permission set. Simply 'chmod g+s /data' is enough it would automatically take care what current permissions are on the folder for group.