Linux Collaborative Directories

Ticker

6/recent/ticker-posts

Linux Collaborative Directories

 Question : The Nautilus team doesn't want its data to be accessed by any of the other groups/teams due to security reasons and want their data to be strictly accessed by the devops group of the team.

Setup a collaborative directory /devops/data on Nautilus App 1 server in Stratos Datacenter.

The directory should be group owned by the group devops and the group should own the files inside the directory. The directory should be read/write/execute to the group owners, and others should not have any access.

Please Note :-  Perform the below commands based on your question  server,  user name & other details might differ . 
So please read task carefully before executing. 
All the Best 👍

Solution:  

1. Login on   App server as per the task

thor@jump_host /$ ssh tony@stapp01

The authenticity of host 'stapp01 (172.16.238.10)' can't be established.

ECDSA key fingerprint is SHA256:RIRt2SqEVQ3yKDQ+cX5QLPw7mJNJhXUcT5Dpsy4GU1U.

ECDSA key fingerprint is MD5:bd:f7:14:9e:c0:fd:41:0d:2d:e4:30:47:8a:34:35:ae.

Are you sure you want to continue connecting (yes/no)? yes

Warning: Permanently added 'stapp01,172.16.238.10' (ECDSA) to the list of known hosts.

tony@stapp01's password:

[tony@stapp01 ~]$ sudo su -

 We trust you have received the usual lecture from the local System

Administrator. It usually boils down to these three things:

     #1) Respect the privacy of others.

    #2) Think before you type.

    #3) With great power comes great responsibility.

 [sudo] password for tony:

[root@stapp01 ~]#

2. Create folder according to the task & list to confirm

[root@stapp01 ~]# mkdir -p /devops/data  

[root@stapp01 ~]#

[root@stapp01 ~]# ll -lsd /devops/data/

4 drwxr-xr-x 2 root root 4096 Jun 19 04:54 /devops/data/

[root@stapp01 ~]#

3. Change group of the directory from root to mentioned group in task

chgrp = changing primary group for the directory.

-R = recursive . changes will reflect all sub-directories and files below.

[root@stapp01 ~]# chgrp -R devops /devops/data

[root@stapp01 ~]#

[root@stapp01 ~]# ll -lsd /devops/data/

4 drwxr-xr-x 2 root devops 4096 Jun 19 04:54 /devops/data/

[root@stapp01 ~]#

4. Change group of the directory from root to mentioned group in task

chmod - modifying permission for sharedgrp.

2770  - Giving full permission to user (root) & group users and zero permmision for other users.

           2 - Special Permission. set group id.

           7 -  4+2+1 = 7 (4= read, 2 = write, 1 = execute).User (root) Permission

           7 -  4+2+1 = 7 (4= read, 2 = write, 1 = execute). Group Permission

           0 - Other users.(zero permission).

[root@stapp01 ~]# chmod -R 2770 /devops/data

[root@stapp01 ~]#

[root@stapp01 ~]# ll -lsd /devops/data/

4 drwxrws--- 2 root devops 4096 Jun 19 04:54 /devops/data/

5. Click on Finish & Confirm to complete the task successful

Happy Learning!!!!


Apart from this if you need more clarity,  I have made a  tutorial video on this , 

please go through and share your comments. Like and share the knowledge



Post a Comment

0 Comments

Latest Posts

KodeKloud Kubernetes Security CKS  Lab Challenge 4 |  Audit-policy | Install & configure falco utility | Inspect the API server audit logs and identify the user