Linux

How do I give read write access for a folder to a second group?
Jack_son_Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Kent WSr. Network / Systems AdminCommented:
Add the second group to your first, or create a new group that contains both.
0
Jack_son_Author Commented:
okay, so there is no way I guess to give a second group just those 2 permissions?
0
Jack_son_Author Commented:
I meant to add, the first group has more permissions than this second one will have
0
Hey MSSPs! What's your total cost of ownership?

WEBINAR: Managed security service providers often deploy & manage products from a variety of solution vendors. But is this really the best approach when it comes to saving time AND money? Join us on Aug. 15th to learn how you can improve your total cost of ownership today!

Zephyr ICTCloud ArchitectCommented:
There is, using setfacl

Set the first group default like normal then use setfacl to give the second group the necessary rights.
Take a look at the examples, let me know if something is not clear.
0
Jack_son_Author Commented:
okay thanks, can you post the format?
0
Jack_son_Author Commented:
sorry I see the example, for group 2 would it be

setfacl -r groupname foldername
0
Zephyr ICTCloud ArchitectCommented:
It would be something like this:

setfacl -m g:groupname:rwx foldername
0
Zephyr ICTCloud ArchitectCommented:
You can add -R to apply it recursive ...

Check your changes with "getfacl foldername"
0
Jack_son_Author Commented:
thanks, i am getting the error unrecognized char found in the mode field
0
Zephyr ICTCloud ArchitectCommented:
Can you post your command?
0
Jack_son_Author Commented:
here is the command, typed it incorrect before:

setfacl -m g:groupname:r foldername
0
Zephyr ICTCloud ArchitectCommented:
is that a folder or a file?
So did your setfacl command work or is that where you go the error?

Post your setfacl if that is where the error is happening.
0
Zephyr ICTCloud ArchitectCommented:
ah ok .. Try

setfacl -m g:groupname:r-- foldername
0
Jack_son_Author Commented:
setfacl -m g:groupname:r foldername

here is where I got that error
0
Zephyr ICTCloud ArchitectCommented:
If you want this setting to be default put a d in front of it like this

setfacl -m d:g:groupname:r foldername
0
Jack_son_Author Commented:
no dont necessarily need it as default; i think the issue is with the :r, should I use a number?
0
Zephyr ICTCloud ArchitectCommented:
Did you try with the dashes like I showed?

setfacl -m g:groupname:r-- foldername

or with numbers should work I think

setfacl -m g:groupname:600 foldername
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.