3

This question already has an answer here:

I am completely new to Ubuntu.

There are 4 user groups in my Ubuntu 13.04 (32bit).

In user group ceo, there is only one user chief.

There is a folder in Home (default Personal folder) which is named ITSM Lab1.

There are subfolders with files inside ITSM Lab1.

I want to give user chief or group ceo Full permissions for the folder ITSM Lab1 and everything inside it (and Full permissions will also be given to future subfolders and files).

What is the command to do these?

marked as duplicate by muru command-line Oct 17 '17 at 5:31

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. – Yaron Oct 17 '17 at 5:15
  • i edited the question body – kaly Oct 17 '17 at 5:17
1

You have several options:

  1. You can set the group of the folder ITSM Lab1 to be ceo and give full access to the group for this folder and its subfolders.

Recursively change group for the folder and its subfolders:

chgrp -R ceo ITSM Lab1

Recursively change permission for a group:

chmod g+rwx ceo ITSM Lab1
  1. You can set the owner of the folder ITSM Lab1 to be chief and give full access to that user for this folder and its subfolders.

Recursively change owner for the folder and its subfolders:

chown -R chief ITSM Lab1

Recursively change permission for a group:

chmod u+rwx chief ITSM Lab1

The below links to the man page will provide more info about the command used above:

  • what does this do: chgrp -R ceo ITSM Lab1 ? – kaly Oct 17 '17 at 5:26
  • @kaly - it will set the group of the folder ITSM LAB1 and its sub-folders to the group ceo. – Yaron Oct 17 '17 at 5:29
  • Can I give full permission to more than one groups for a certain folder (and everything inside) ? – kaly Oct 17 '17 at 5:31
  • @kali - see full answer in the duplicate question kindly found for you by muru – Yaron Oct 17 '17 at 5:32
  • with this command 'chgrp -R ceo ITSM_Lab1' , i cannot set two groups for a folder. Only one group can be set. That's a problem :( – kaly Oct 17 '17 at 6:08

Not the answer you're looking for? Browse other questions tagged or ask your own question.