How to change the ownership of a path to two or more users?

Hello group,

I know using chown command we can change the owndership of a directory or path to a user but what about a group of users who belong to "develoers" group in /etc/group?
let's say the path is /var/www/html/project1 and I want  users (developers) be able to read/write/execute files in this path. I did:
chown user1:developers  /var/www/html/project1
but how can I specify assign the ownership to both user1 and user2?

btw, is this a safe way to allow web developers to work with a project?

Thanks,
ak
 
akohanAsked:
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.

akohanAuthor Commented:

Or maybe I have to add those user to a group such as www or apache? any comments will be appreciated.

Regards,
ak
0
http:// thevpn.guruCommented:
Yes the easiest way is to add those users to a group assign permissions to that group and you are done.

A user  can be a member of more than one group using usermod and you have to use chown or chgrp to change the ownership of the files to be for that group.
0
ibu1System AdministratorCommented:
Do this
chown  :developers  /var/www/html/project1
It will add whatever users in the developers group
:)
0
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

ibu1System AdministratorCommented:
Sorry its,
chown -R :developers  /var/www/html/project1
0
akohanAuthor Commented:

I think there must be a misunderstanding. I already had added them to a group as "developers" now when I enter
chown -R :developers  /var/www/html/project1

none of the users can save a file!

Again, I can do this chown -R user1:developers  /var/www/html/project1 and user1 can do r/w/x but user2 can only read and unable to write. There should be a way to assign all memeber of a group to be able to write/read/exectue files of a specific directory!!!

What here you guys have sent me works only for one user which I had done it before. I need have both users to have permission on all three rights.

thanks

0
TintinCommented:
You just need to add group write permission to the files, eg:

chmod -R g+w /var/www/html/project1
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
akohanAuthor Commented:

Hi Tintin:
Yes, this was what I needed.l Thank you so much!

Regards,
ak
0
akohanAuthor Commented:
The best!
0
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.