Giving specific permissions to a group of users [closed]

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
-1
down vote

favorite












I'd like to give a certain groups permissions to edit on a folder and every subfolder that would be created under it in the future, is there a way to do that?
Can I also give them permission to use apt and install things without having to have root?










share|improve this question















closed as too broad by G-Man, n.st, RalfFriedl, JigglyNaga, Stephen Harris Dec 5 at 11:38


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. If this question can be reworded to fit the rules in the help center, please edit the question.










  • 1




    Hi and welcome to Unix & Linux! To make this question more searchable for others who might have the same issue later, please split separate topics (like directory permissions v. apt permissions here) into separate questions. You can edit your question to focus on one topic and ask a new question for the other one. There's also our tour and the How to Ask page with more info on how to get the best possible answers. Don't hesitate to ask if anything is unclear! :)
    – n.st
    Dec 4 at 21:48














up vote
-1
down vote

favorite












I'd like to give a certain groups permissions to edit on a folder and every subfolder that would be created under it in the future, is there a way to do that?
Can I also give them permission to use apt and install things without having to have root?










share|improve this question















closed as too broad by G-Man, n.st, RalfFriedl, JigglyNaga, Stephen Harris Dec 5 at 11:38


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. If this question can be reworded to fit the rules in the help center, please edit the question.










  • 1




    Hi and welcome to Unix & Linux! To make this question more searchable for others who might have the same issue later, please split separate topics (like directory permissions v. apt permissions here) into separate questions. You can edit your question to focus on one topic and ask a new question for the other one. There's also our tour and the How to Ask page with more info on how to get the best possible answers. Don't hesitate to ask if anything is unclear! :)
    – n.st
    Dec 4 at 21:48












up vote
-1
down vote

favorite









up vote
-1
down vote

favorite











I'd like to give a certain groups permissions to edit on a folder and every subfolder that would be created under it in the future, is there a way to do that?
Can I also give them permission to use apt and install things without having to have root?










share|improve this question















I'd like to give a certain groups permissions to edit on a folder and every subfolder that would be created under it in the future, is there a way to do that?
Can I also give them permission to use apt and install things without having to have root?







linux






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Dec 4 at 22:19









Rui F Ribeiro

38.5k1479128




38.5k1479128










asked Dec 4 at 21:32









Hi There

1




1




closed as too broad by G-Man, n.st, RalfFriedl, JigglyNaga, Stephen Harris Dec 5 at 11:38


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. If this question can be reworded to fit the rules in the help center, please edit the question.






closed as too broad by G-Man, n.st, RalfFriedl, JigglyNaga, Stephen Harris Dec 5 at 11:38


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. If this question can be reworded to fit the rules in the help center, please edit the question.









  • 1




    Hi and welcome to Unix & Linux! To make this question more searchable for others who might have the same issue later, please split separate topics (like directory permissions v. apt permissions here) into separate questions. You can edit your question to focus on one topic and ask a new question for the other one. There's also our tour and the How to Ask page with more info on how to get the best possible answers. Don't hesitate to ask if anything is unclear! :)
    – n.st
    Dec 4 at 21:48












  • 1




    Hi and welcome to Unix & Linux! To make this question more searchable for others who might have the same issue later, please split separate topics (like directory permissions v. apt permissions here) into separate questions. You can edit your question to focus on one topic and ask a new question for the other one. There's also our tour and the How to Ask page with more info on how to get the best possible answers. Don't hesitate to ask if anything is unclear! :)
    – n.st
    Dec 4 at 21:48







1




1




Hi and welcome to Unix & Linux! To make this question more searchable for others who might have the same issue later, please split separate topics (like directory permissions v. apt permissions here) into separate questions. You can edit your question to focus on one topic and ask a new question for the other one. There's also our tour and the How to Ask page with more info on how to get the best possible answers. Don't hesitate to ask if anything is unclear! :)
– n.st
Dec 4 at 21:48




Hi and welcome to Unix & Linux! To make this question more searchable for others who might have the same issue later, please split separate topics (like directory permissions v. apt permissions here) into separate questions. You can edit your question to focus on one topic and ask a new question for the other one. There's also our tour and the How to Ask page with more info on how to get the best possible answers. Don't hesitate to ask if anything is unclear! :)
– n.st
Dec 4 at 21:48










1 Answer
1






active

oldest

votes

















up vote
0
down vote













To give a group permissions to edit a certain folder, make that the group owner of said folder, e.g.:



# chgrp -R engineers /shared/project/folder/


To make this group the owner of every file and folder in the group, the -R ("recursive") option was used.

To make this group the owner of all future files and folders which still have to be created, set the SGID bit on the folder:



# chmod g+s /shared/project/folder/



To give permissions for apt you can add a sudoers rule using visudo:



%engineers ALL = ( ALL ) /usr/bin/apt


Now all users in the engineers group can run sudo apt to execute apt with root privileges (after entering their own password).






share|improve this answer






















  • Hi Tom, glad to welcome you on Unix & Linux and thanks for your answer! To ensure searchability, it's usually better to wait until a multi-topic question has been clarified or split before answering (so you won't cover multiple topics in one answer and muddle things together). Here, the best thing (for future readers) will be to wait until @HiThere has split the question and then edit your answer to match.
    – n.st
    Dec 4 at 21:59






  • 1




    On topic (well, one of the topics): sudo expects fully qualified paths in its sudoers files, to prevent accidentally running a different program when something in $PATH (or rather Defaults secure_path in the sudoers file) changes. You'll have to use /usr/bin/apt for the sudoers file to be valid. Importantly, do not modify /etc/sudoers directly: if you create a syntax error (like the apt in your example), you will lock yourself out of sudo and thus your way to fix the syntax error. You may have to boot into a rescue system to fix this.
    – n.st
    Dec 4 at 22:03










  • I would edit my answer to have /usr/bin/apt but given @n.st's comment, I won't bother.
    – Tom
    Dec 4 at 22:04











  • Comments aren't meant to be a permanent part of the answer (the official stance is that they can be deleted at any time), so it's always a good idea to integrate their information into the answer. Go ahead, you can edit and improve as often as you like! :)
    – n.st
    Dec 4 at 22:06










  • Meh. And then having to edit my own answer again after the OP deciced to whack one of his two questions?
    – Tom
    Dec 4 at 22:07

















1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
0
down vote













To give a group permissions to edit a certain folder, make that the group owner of said folder, e.g.:



# chgrp -R engineers /shared/project/folder/


To make this group the owner of every file and folder in the group, the -R ("recursive") option was used.

To make this group the owner of all future files and folders which still have to be created, set the SGID bit on the folder:



# chmod g+s /shared/project/folder/



To give permissions for apt you can add a sudoers rule using visudo:



%engineers ALL = ( ALL ) /usr/bin/apt


Now all users in the engineers group can run sudo apt to execute apt with root privileges (after entering their own password).






share|improve this answer






















  • Hi Tom, glad to welcome you on Unix & Linux and thanks for your answer! To ensure searchability, it's usually better to wait until a multi-topic question has been clarified or split before answering (so you won't cover multiple topics in one answer and muddle things together). Here, the best thing (for future readers) will be to wait until @HiThere has split the question and then edit your answer to match.
    – n.st
    Dec 4 at 21:59






  • 1




    On topic (well, one of the topics): sudo expects fully qualified paths in its sudoers files, to prevent accidentally running a different program when something in $PATH (or rather Defaults secure_path in the sudoers file) changes. You'll have to use /usr/bin/apt for the sudoers file to be valid. Importantly, do not modify /etc/sudoers directly: if you create a syntax error (like the apt in your example), you will lock yourself out of sudo and thus your way to fix the syntax error. You may have to boot into a rescue system to fix this.
    – n.st
    Dec 4 at 22:03










  • I would edit my answer to have /usr/bin/apt but given @n.st's comment, I won't bother.
    – Tom
    Dec 4 at 22:04











  • Comments aren't meant to be a permanent part of the answer (the official stance is that they can be deleted at any time), so it's always a good idea to integrate their information into the answer. Go ahead, you can edit and improve as often as you like! :)
    – n.st
    Dec 4 at 22:06










  • Meh. And then having to edit my own answer again after the OP deciced to whack one of his two questions?
    – Tom
    Dec 4 at 22:07














up vote
0
down vote













To give a group permissions to edit a certain folder, make that the group owner of said folder, e.g.:



# chgrp -R engineers /shared/project/folder/


To make this group the owner of every file and folder in the group, the -R ("recursive") option was used.

To make this group the owner of all future files and folders which still have to be created, set the SGID bit on the folder:



# chmod g+s /shared/project/folder/



To give permissions for apt you can add a sudoers rule using visudo:



%engineers ALL = ( ALL ) /usr/bin/apt


Now all users in the engineers group can run sudo apt to execute apt with root privileges (after entering their own password).






share|improve this answer






















  • Hi Tom, glad to welcome you on Unix & Linux and thanks for your answer! To ensure searchability, it's usually better to wait until a multi-topic question has been clarified or split before answering (so you won't cover multiple topics in one answer and muddle things together). Here, the best thing (for future readers) will be to wait until @HiThere has split the question and then edit your answer to match.
    – n.st
    Dec 4 at 21:59






  • 1




    On topic (well, one of the topics): sudo expects fully qualified paths in its sudoers files, to prevent accidentally running a different program when something in $PATH (or rather Defaults secure_path in the sudoers file) changes. You'll have to use /usr/bin/apt for the sudoers file to be valid. Importantly, do not modify /etc/sudoers directly: if you create a syntax error (like the apt in your example), you will lock yourself out of sudo and thus your way to fix the syntax error. You may have to boot into a rescue system to fix this.
    – n.st
    Dec 4 at 22:03










  • I would edit my answer to have /usr/bin/apt but given @n.st's comment, I won't bother.
    – Tom
    Dec 4 at 22:04











  • Comments aren't meant to be a permanent part of the answer (the official stance is that they can be deleted at any time), so it's always a good idea to integrate their information into the answer. Go ahead, you can edit and improve as often as you like! :)
    – n.st
    Dec 4 at 22:06










  • Meh. And then having to edit my own answer again after the OP deciced to whack one of his two questions?
    – Tom
    Dec 4 at 22:07












up vote
0
down vote










up vote
0
down vote









To give a group permissions to edit a certain folder, make that the group owner of said folder, e.g.:



# chgrp -R engineers /shared/project/folder/


To make this group the owner of every file and folder in the group, the -R ("recursive") option was used.

To make this group the owner of all future files and folders which still have to be created, set the SGID bit on the folder:



# chmod g+s /shared/project/folder/



To give permissions for apt you can add a sudoers rule using visudo:



%engineers ALL = ( ALL ) /usr/bin/apt


Now all users in the engineers group can run sudo apt to execute apt with root privileges (after entering their own password).






share|improve this answer














To give a group permissions to edit a certain folder, make that the group owner of said folder, e.g.:



# chgrp -R engineers /shared/project/folder/


To make this group the owner of every file and folder in the group, the -R ("recursive") option was used.

To make this group the owner of all future files and folders which still have to be created, set the SGID bit on the folder:



# chmod g+s /shared/project/folder/



To give permissions for apt you can add a sudoers rule using visudo:



%engineers ALL = ( ALL ) /usr/bin/apt


Now all users in the engineers group can run sudo apt to execute apt with root privileges (after entering their own password).







share|improve this answer














share|improve this answer



share|improve this answer








edited Dec 4 at 22:14









n.st

5,22611843




5,22611843










answered Dec 4 at 21:49









Tom

1217




1217











  • Hi Tom, glad to welcome you on Unix & Linux and thanks for your answer! To ensure searchability, it's usually better to wait until a multi-topic question has been clarified or split before answering (so you won't cover multiple topics in one answer and muddle things together). Here, the best thing (for future readers) will be to wait until @HiThere has split the question and then edit your answer to match.
    – n.st
    Dec 4 at 21:59






  • 1




    On topic (well, one of the topics): sudo expects fully qualified paths in its sudoers files, to prevent accidentally running a different program when something in $PATH (or rather Defaults secure_path in the sudoers file) changes. You'll have to use /usr/bin/apt for the sudoers file to be valid. Importantly, do not modify /etc/sudoers directly: if you create a syntax error (like the apt in your example), you will lock yourself out of sudo and thus your way to fix the syntax error. You may have to boot into a rescue system to fix this.
    – n.st
    Dec 4 at 22:03










  • I would edit my answer to have /usr/bin/apt but given @n.st's comment, I won't bother.
    – Tom
    Dec 4 at 22:04











  • Comments aren't meant to be a permanent part of the answer (the official stance is that they can be deleted at any time), so it's always a good idea to integrate their information into the answer. Go ahead, you can edit and improve as often as you like! :)
    – n.st
    Dec 4 at 22:06










  • Meh. And then having to edit my own answer again after the OP deciced to whack one of his two questions?
    – Tom
    Dec 4 at 22:07
















  • Hi Tom, glad to welcome you on Unix & Linux and thanks for your answer! To ensure searchability, it's usually better to wait until a multi-topic question has been clarified or split before answering (so you won't cover multiple topics in one answer and muddle things together). Here, the best thing (for future readers) will be to wait until @HiThere has split the question and then edit your answer to match.
    – n.st
    Dec 4 at 21:59






  • 1




    On topic (well, one of the topics): sudo expects fully qualified paths in its sudoers files, to prevent accidentally running a different program when something in $PATH (or rather Defaults secure_path in the sudoers file) changes. You'll have to use /usr/bin/apt for the sudoers file to be valid. Importantly, do not modify /etc/sudoers directly: if you create a syntax error (like the apt in your example), you will lock yourself out of sudo and thus your way to fix the syntax error. You may have to boot into a rescue system to fix this.
    – n.st
    Dec 4 at 22:03










  • I would edit my answer to have /usr/bin/apt but given @n.st's comment, I won't bother.
    – Tom
    Dec 4 at 22:04











  • Comments aren't meant to be a permanent part of the answer (the official stance is that they can be deleted at any time), so it's always a good idea to integrate their information into the answer. Go ahead, you can edit and improve as often as you like! :)
    – n.st
    Dec 4 at 22:06










  • Meh. And then having to edit my own answer again after the OP deciced to whack one of his two questions?
    – Tom
    Dec 4 at 22:07















Hi Tom, glad to welcome you on Unix & Linux and thanks for your answer! To ensure searchability, it's usually better to wait until a multi-topic question has been clarified or split before answering (so you won't cover multiple topics in one answer and muddle things together). Here, the best thing (for future readers) will be to wait until @HiThere has split the question and then edit your answer to match.
– n.st
Dec 4 at 21:59




Hi Tom, glad to welcome you on Unix & Linux and thanks for your answer! To ensure searchability, it's usually better to wait until a multi-topic question has been clarified or split before answering (so you won't cover multiple topics in one answer and muddle things together). Here, the best thing (for future readers) will be to wait until @HiThere has split the question and then edit your answer to match.
– n.st
Dec 4 at 21:59




1




1




On topic (well, one of the topics): sudo expects fully qualified paths in its sudoers files, to prevent accidentally running a different program when something in $PATH (or rather Defaults secure_path in the sudoers file) changes. You'll have to use /usr/bin/apt for the sudoers file to be valid. Importantly, do not modify /etc/sudoers directly: if you create a syntax error (like the apt in your example), you will lock yourself out of sudo and thus your way to fix the syntax error. You may have to boot into a rescue system to fix this.
– n.st
Dec 4 at 22:03




On topic (well, one of the topics): sudo expects fully qualified paths in its sudoers files, to prevent accidentally running a different program when something in $PATH (or rather Defaults secure_path in the sudoers file) changes. You'll have to use /usr/bin/apt for the sudoers file to be valid. Importantly, do not modify /etc/sudoers directly: if you create a syntax error (like the apt in your example), you will lock yourself out of sudo and thus your way to fix the syntax error. You may have to boot into a rescue system to fix this.
– n.st
Dec 4 at 22:03












I would edit my answer to have /usr/bin/apt but given @n.st's comment, I won't bother.
– Tom
Dec 4 at 22:04





I would edit my answer to have /usr/bin/apt but given @n.st's comment, I won't bother.
– Tom
Dec 4 at 22:04













Comments aren't meant to be a permanent part of the answer (the official stance is that they can be deleted at any time), so it's always a good idea to integrate their information into the answer. Go ahead, you can edit and improve as often as you like! :)
– n.st
Dec 4 at 22:06




Comments aren't meant to be a permanent part of the answer (the official stance is that they can be deleted at any time), so it's always a good idea to integrate their information into the answer. Go ahead, you can edit and improve as often as you like! :)
– n.st
Dec 4 at 22:06












Meh. And then having to edit my own answer again after the OP deciced to whack one of his two questions?
– Tom
Dec 4 at 22:07




Meh. And then having to edit my own answer again after the OP deciced to whack one of his two questions?
– Tom
Dec 4 at 22:07


Popular posts from this blog

How to check contact read email or not when send email to Individual?

Bahrain

Postfix configuration issue with fips on centos 7; mailgun relay