enter image description hereI'm trying to ADD an owner to folder in MAC OS X.

I tried to use chown, but it does change owner, to another new user. I don't want to change it, I just want to ADD new owner.

Details:

I have folder "test" that owner is Admin user, I want to add owner Admin2 to that folder, without removing Admin user owner. How can I do it?

Thanks a lot.

I want the same effect, like adding Users: from UI +.

link|improve this question

75% accept rate
Is it even possible with the GUI? Screenshot of it? – Sn0opy Dec 27 '11 at 12:32
A file or directory can have only one owner. – Don Roby Dec 27 '11 at 12:34
Question is edited – User1234 Dec 27 '11 at 12:41
feedback

migrated from stackoverflow.com Dec 28 '11 at 8:03

This question came from our site for professional and enthusiast programmers.

2 Answers

up vote 1 down vote accepted

As noted a file can only have one owner. What you are looking for is how to set Access Control Lists (ACL) for file system entries. These grant or deny any of a set of specific users or group members any of a set of specific permissions to individual files or directories. See, for example, this article for a quick introduction to ACLs on OS X. Read the OS X chmod man page (man chmod) for the details on managing ACLs via the command line.

link|improve this answer
Thanks the article was very useful! – User1234 Dec 28 '11 at 9:00
feedback

You need to add both users to the same user group. Then chgrp of the test to this group. That way multiple users can "own" one file.

Then run

$ dscl . list /users
$ dscl . list /groups

to find which users belong to which groups.

link|improve this answer
Thanks, I updated my question, what I need is the same effect like in UI – User1234 Dec 27 '11 at 12:41
feedback

Your Answer

 
or
required, but never shown

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