In this lab, you will create a collaborative directory for pre-existing users.
Outcomes
A directory accessible by all members of the ateam group and a file created by Andy that can be modified by Alice.
Reset your serverX system.
Log into the GNOME desktop on serverX as student with a password of student.
Open a window with a Bash prompt.
Select → → .
Become the root user at the shell prompt.
[student@serverX ~]$su -Password:redhat
Run lab permissions setup which will create a shared group, ateam, with two new users, andy and alice. The password for these accounts is password
[root@serverX ~]#lab permissions setup
Create a directory in /home called ateam-text.
[root@serverX ~]#mkdir /home/ateam-text
Change the group ownership of the ateam-text directory to ateam.
[root@serverX ~]#chown :ateam /home/ateam-text
Ensure the permissions of ateam-text allows group members to create and delete files.
[root@serverX ~]#chmod g+w /home/ateam-text
Ensure the permissions of ateam-text forbids others from accessing its files.
[root@serverX ~]#chmod 770 /home/ateam-text[root@serverX ~]$ls -ld /home/ateam-textdrwxrwx---. 2 root ateam 6 Jan 23 12:50 /home/ateam-text
Exit the root shell and switch to the user andy with a password of password.
[root@serverX ~]#exit[student@serverX ~]$su - andyPassword:password
Navigate to the /home/ateam-text folder (remember to open a terminal window first).
[andy@serverX ~]$cd /home/ateam-text
Create an empty file called andyfile3.
[andy@serverX ateam-text]$touch andyfile3
Record the default user and group ownership of the new file and its permissions.
[andy@serverX ateam-text]$ls -l andyfile3-rw-rw-r--. 1 andy andy 0 Jan 23 12:59 andyfile3
Change the group ownership of the new file to ateam and record the new ownership and permissions.
[andy@serverX ateam-text]$chown :ateam andyfile3[andy@serverX ateam-text]$ls -l andyfile3-rw-rw-r--. 1 andy ateam 0 Jan 23 12:59 andyfile3
Exit the shell and switch to the user alice with a password of password.
[andy@serverX ateam-text]$exit[student@serverX ~]$su - alicePassword:password
Navigate to the /home/ateam-text folder.
[alice@serverX ~]$cd /home/ateam-text
Determine alice's privileges to access and/or modify andyfile3.
[alice@serverX ateam-text]$echo "text" >> andyfile3[alice@serverX ateam-text]$cat andyfile3text