Exam EX200 All QuestionsBrowse all questions from this exam
Question 3

SIMULATION -

Create a catalog under /home named admins. Its respective group is requested to be the admin group. The group users could read and write, while other users are not allowed to access it. The files created by users from the same group should also be the admin group.

    Correct Answer:

    To accomplish the required tasks, the following commands should be executed: 1. First, create the directory under /home named admins: `mkdir /home/admins`. 2. Assign the directory to the admin group: `chown :admin /home/admins`. 3. Set the permissions so that admin group users can read and write, and set the sticky bit to ensure that files created inside the directory have the admin group by default: `chmod 2770 /home/admins`. Explanation: The `mkdir` command is used to create the directory. The `chown :admin` command assigns the directory to the admin group. The `chmod 2770` command sets the permissions: 2 ensures the sticky bit is set so that files created within inherit the group's ownership (sbit), 7 allows read, write, and execute permissions for the owner, 7 allows read, write, and execute permissions for the group, and 0 denies all permissions for other users. This setup conforms to the requirement that the group users should have read and write access while others are denied access, and that new files inherit the admin group.

Discussion
Moram

If the group should only have read and write shouldn't the command be: chmod 760 /admins

kitkat

Permissions on the folder works different to that of files. Permissions needed are 2770 with 2760 users member of admin group will not be able to enter the folder.

Mari685

Hi can you give me some details about redhat

Joeytechn9t

#mkdir /home/admins #groupadd admin #chown root:admin /admins #chmod 770 /admins #chmod g+s

Rahul95

#mkdir -p /home/admins #chgrp admin /home/admins #chmod 770 /home/admins - 7 is for max permission for dir and 6 is for files #chmod g+s /home/admins #su - harry #touch /home/admins/testfile #ls-ltr /home/admins/ - to verify

RHEL

The right answer is chmod 770 because you need to have execution permission on the directory to have access to its content, so you can perform write and read process.

golem1987

2770 should be to allow also inheritance for group permissions

AbidBajwa

mkdir admins groupadd admin chown :admin /home/admins chmod g+rw /home/admins chmod o-rwx /home/admins chmod g+s /homeadmins

cloudyhr

Did implemented practically and 770 is the correct answer chmod 2770 /home/admin same as above 3 chmod commands

stoobie

@cloudyhr Why do you have 2770 instead of just 770? And why is g+s necessary?

stoobie

I figured out the answer to my second question about g+s. The "s" (special permissions) is necessary so that files _created_ by users from the `admin` group are also _owned_ by the `admin` group.

kitkat

your first question's answer is same. 2 is equivalent of g+s

adolfoale

For all of the above to work, the user must have the admin group as an additional group. Do the test.

RedQuasar

mkdir /home/admins chown :admin /home/admins chmod u=rw,o=--- /home/admins chmod g+s /home/admins

yajala

I passed the RHSCA exam last week. This dump was useful but needs update for questions on writing simple shell scripts, container, Stratis and VDO. Thanks. Also, I think Redhat has increased the number of questions from 20 - 24. Mine were 24 questions on the exam. Thanks. https://medium.com/@darekhale91/latest-redhat-ex200-exam-dumps-2023-acd1c1922729

Rich102

They shut the medium link down. Under investigation. Can you provide another exam dump please ?

sugisho

which is correct permission /home/admin 760 or 770 ?

AluBhorta

2770 to be precise. it's because without exec permission, even group users won't be able to enter the dir (i.e. cd requires rx permission).

Mari685

can you help me in redhat need some details about it if possible dm me on instagram lvukhan123

M_May87

# Create the directory mkdir /home/admins # Change the owner of the directory to root sudo chown root: /home/admins # Change the group of the directory to admin sudo chgrp admin /home/admins # Set the permissions so that the owner and the group can read and write, # but others cannot access it sudo chmod 770 /home/admins # Set the group ID on the directory so that files created within it # inherit the group of the directory (admin) rather than the group of the user that created the file sudo chmod g+s /home/admins

techzideas

mkdir -p /home/admins chown -R :admin /home/admins chmod 2070 /home/admins touch /home/admins/office.txt ll /home/admins Please Give me your views on this...

radwan_maazon

/home actualy exist so that you don't neet put -p

syed2020

Without granting x permissions, group users will not be able to access the folder so it should be chmod 770 /home/admins

Nhan

2=Write 4 = read therefore r+w=6, Moran has the correct answer for setting chmod

Darion81

Depends. For directories - r - list files, w - add/del files, x - cd to that directory If yser should be able to enter it this dir should have x