How to add a second owner of a folder using terminal on Mac?

Clash Royale CLAN TAG#URR8PPP
up vote
4
down vote
favorite
On Mac using terminal and "chown" command I can set owner for a folder like this:
sudo chown -R _www somefolder
However this replaces me with _www.
I.e. I'm not in the list of owners anymore.

I then have to open folder properties in Finder, add myself as a second owner and set permissions using the GUI.

And this is what the ACL looks like:

Is there a way to add TWO owners using terminal?
In other words how to add a second owner to a folder using terminal?
Not necessarily chown.
PS: Just in case.. on the screenshots users "_www" and "Oleg (ï)" have permissions "Read and write".
permissions terminal osx chown
add a comment |Â
up vote
4
down vote
favorite
On Mac using terminal and "chown" command I can set owner for a folder like this:
sudo chown -R _www somefolder
However this replaces me with _www.
I.e. I'm not in the list of owners anymore.

I then have to open folder properties in Finder, add myself as a second owner and set permissions using the GUI.

And this is what the ACL looks like:

Is there a way to add TWO owners using terminal?
In other words how to add a second owner to a folder using terminal?
Not necessarily chown.
PS: Just in case.. on the screenshots users "_www" and "Oleg (ï)" have permissions "Read and write".
permissions terminal osx chown
1
How do the permissions of the file with two owners look like in terminal. I doubt the Mac does this via POSIX file attributes, but via some ACL stuff.
â Philippos
Feb 9 at 14:01
You can't add a second owner. You may check for ACLs, if ordinary group-based security permission is not enough. You may also consider to own the file by a third user (root, nobody, or any neutral third account), and giving the access to both of users by group-based rules or by acls.
â peterh
Feb 9 at 14:25
add a comment |Â
up vote
4
down vote
favorite
up vote
4
down vote
favorite
On Mac using terminal and "chown" command I can set owner for a folder like this:
sudo chown -R _www somefolder
However this replaces me with _www.
I.e. I'm not in the list of owners anymore.

I then have to open folder properties in Finder, add myself as a second owner and set permissions using the GUI.

And this is what the ACL looks like:

Is there a way to add TWO owners using terminal?
In other words how to add a second owner to a folder using terminal?
Not necessarily chown.
PS: Just in case.. on the screenshots users "_www" and "Oleg (ï)" have permissions "Read and write".
permissions terminal osx chown
On Mac using terminal and "chown" command I can set owner for a folder like this:
sudo chown -R _www somefolder
However this replaces me with _www.
I.e. I'm not in the list of owners anymore.

I then have to open folder properties in Finder, add myself as a second owner and set permissions using the GUI.

And this is what the ACL looks like:

Is there a way to add TWO owners using terminal?
In other words how to add a second owner to a folder using terminal?
Not necessarily chown.
PS: Just in case.. on the screenshots users "_www" and "Oleg (ï)" have permissions "Read and write".
permissions terminal osx chown
edited Feb 9 at 14:29
asked Feb 9 at 13:53
Oleg
315
315
1
How do the permissions of the file with two owners look like in terminal. I doubt the Mac does this via POSIX file attributes, but via some ACL stuff.
â Philippos
Feb 9 at 14:01
You can't add a second owner. You may check for ACLs, if ordinary group-based security permission is not enough. You may also consider to own the file by a third user (root, nobody, or any neutral third account), and giving the access to both of users by group-based rules or by acls.
â peterh
Feb 9 at 14:25
add a comment |Â
1
How do the permissions of the file with two owners look like in terminal. I doubt the Mac does this via POSIX file attributes, but via some ACL stuff.
â Philippos
Feb 9 at 14:01
You can't add a second owner. You may check for ACLs, if ordinary group-based security permission is not enough. You may also consider to own the file by a third user (root, nobody, or any neutral third account), and giving the access to both of users by group-based rules or by acls.
â peterh
Feb 9 at 14:25
1
1
How do the permissions of the file with two owners look like in terminal. I doubt the Mac does this via POSIX file attributes, but via some ACL stuff.
â Philippos
Feb 9 at 14:01
How do the permissions of the file with two owners look like in terminal. I doubt the Mac does this via POSIX file attributes, but via some ACL stuff.
â Philippos
Feb 9 at 14:01
You can't add a second owner. You may check for ACLs, if ordinary group-based security permission is not enough. You may also consider to own the file by a third user (root, nobody, or any neutral third account), and giving the access to both of users by group-based rules or by acls.
â peterh
Feb 9 at 14:25
You can't add a second owner. You may check for ACLs, if ordinary group-based security permission is not enough. You may also consider to own the file by a third user (root, nobody, or any neutral third account), and giving the access to both of users by group-based rules or by acls.
â peterh
Feb 9 at 14:25
add a comment |Â
3 Answers
3
active
oldest
votes
up vote
1
down vote
This is not possible because a Unix file have one owner, try to use a group instead.
Side note: surprising, but in Unix, the Owner and the Group are both a single integer, and nothing forbids for multiple users to have the same user-id. Thus, in the view of the kernel permission checking, there is no essential difference between uid and gid.
â peterh
Feb 9 at 14:23
@peterh "two users" with the same uid are not "two users" but one user with two names. The uid is what defines a user, not the name. Also, "there is no essential difference between uid and gid" is just nonsense - were you drunk when you wrote that?
â cas
Feb 10 at 1:59
add a comment |Â
up vote
1
down vote
this is a xy-problem
X:problem, how can two user access same file, with same right ?
solution I use multiple chown => Y:problem
Solution for X problem
according to http://aplawrence.com/MacOSX/acl.html
you can use
chmod +a "allow Oleg list,search,add_file,add_subdirectory,delete_child,readattr,writeattr,readextattr,writeextattr,readsecurity,writesecurity,chown"
chmod +a "allow _www list,search,add_file,add_subdirectory,delete_child,readattr,writeattr,readextattr,writeextattr,readsecurity,writesecurity,chown"
I can't test it right now, I don't have mac OS 10.5 available.
You might replace the long string above with the result of ls -e
Y:solution: I try to use multiple chown.
This is not possible:
Unix/Linux/OS X's file have only one owner at a time.
add a comment |Â
up vote
1
down vote
accepted
Found the answer (type this in Terminal):
sudo chmod +a 'Oleg allow list,add_file,search,add_subdirectory,delete_child,readattr,writeattr,readextattr,writeextattr,readsecurity' somefolder
Where 'Oleg' is a user name and 'somefolder' is a folder name in question.
The permissions inside single quotes after the 'allow' keyword are just copied from the output of ls -le
Now both users '_www' and 'Oleg' can read, write files and subdirectories, etc.
That was the intention.
Strictly speaking yes, you can not add a second "owner" in POSIX attributes sense, e.g. via Chown.
However in Mac you can give owner-like permissions to numerous users via ACL like Philippos commented (thanks for hinting).
add a comment |Â
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
This is not possible because a Unix file have one owner, try to use a group instead.
Side note: surprising, but in Unix, the Owner and the Group are both a single integer, and nothing forbids for multiple users to have the same user-id. Thus, in the view of the kernel permission checking, there is no essential difference between uid and gid.
â peterh
Feb 9 at 14:23
@peterh "two users" with the same uid are not "two users" but one user with two names. The uid is what defines a user, not the name. Also, "there is no essential difference between uid and gid" is just nonsense - were you drunk when you wrote that?
â cas
Feb 10 at 1:59
add a comment |Â
up vote
1
down vote
This is not possible because a Unix file have one owner, try to use a group instead.
Side note: surprising, but in Unix, the Owner and the Group are both a single integer, and nothing forbids for multiple users to have the same user-id. Thus, in the view of the kernel permission checking, there is no essential difference between uid and gid.
â peterh
Feb 9 at 14:23
@peterh "two users" with the same uid are not "two users" but one user with two names. The uid is what defines a user, not the name. Also, "there is no essential difference between uid and gid" is just nonsense - were you drunk when you wrote that?
â cas
Feb 10 at 1:59
add a comment |Â
up vote
1
down vote
up vote
1
down vote
This is not possible because a Unix file have one owner, try to use a group instead.
This is not possible because a Unix file have one owner, try to use a group instead.
answered Feb 9 at 14:00
Lionel Bino
1192
1192
Side note: surprising, but in Unix, the Owner and the Group are both a single integer, and nothing forbids for multiple users to have the same user-id. Thus, in the view of the kernel permission checking, there is no essential difference between uid and gid.
â peterh
Feb 9 at 14:23
@peterh "two users" with the same uid are not "two users" but one user with two names. The uid is what defines a user, not the name. Also, "there is no essential difference between uid and gid" is just nonsense - were you drunk when you wrote that?
â cas
Feb 10 at 1:59
add a comment |Â
Side note: surprising, but in Unix, the Owner and the Group are both a single integer, and nothing forbids for multiple users to have the same user-id. Thus, in the view of the kernel permission checking, there is no essential difference between uid and gid.
â peterh
Feb 9 at 14:23
@peterh "two users" with the same uid are not "two users" but one user with two names. The uid is what defines a user, not the name. Also, "there is no essential difference between uid and gid" is just nonsense - were you drunk when you wrote that?
â cas
Feb 10 at 1:59
Side note: surprising, but in Unix, the Owner and the Group are both a single integer, and nothing forbids for multiple users to have the same user-id. Thus, in the view of the kernel permission checking, there is no essential difference between uid and gid.
â peterh
Feb 9 at 14:23
Side note: surprising, but in Unix, the Owner and the Group are both a single integer, and nothing forbids for multiple users to have the same user-id. Thus, in the view of the kernel permission checking, there is no essential difference between uid and gid.
â peterh
Feb 9 at 14:23
@peterh "two users" with the same uid are not "two users" but one user with two names. The uid is what defines a user, not the name. Also, "there is no essential difference between uid and gid" is just nonsense - were you drunk when you wrote that?
â cas
Feb 10 at 1:59
@peterh "two users" with the same uid are not "two users" but one user with two names. The uid is what defines a user, not the name. Also, "there is no essential difference between uid and gid" is just nonsense - were you drunk when you wrote that?
â cas
Feb 10 at 1:59
add a comment |Â
up vote
1
down vote
this is a xy-problem
X:problem, how can two user access same file, with same right ?
solution I use multiple chown => Y:problem
Solution for X problem
according to http://aplawrence.com/MacOSX/acl.html
you can use
chmod +a "allow Oleg list,search,add_file,add_subdirectory,delete_child,readattr,writeattr,readextattr,writeextattr,readsecurity,writesecurity,chown"
chmod +a "allow _www list,search,add_file,add_subdirectory,delete_child,readattr,writeattr,readextattr,writeextattr,readsecurity,writesecurity,chown"
I can't test it right now, I don't have mac OS 10.5 available.
You might replace the long string above with the result of ls -e
Y:solution: I try to use multiple chown.
This is not possible:
Unix/Linux/OS X's file have only one owner at a time.
add a comment |Â
up vote
1
down vote
this is a xy-problem
X:problem, how can two user access same file, with same right ?
solution I use multiple chown => Y:problem
Solution for X problem
according to http://aplawrence.com/MacOSX/acl.html
you can use
chmod +a "allow Oleg list,search,add_file,add_subdirectory,delete_child,readattr,writeattr,readextattr,writeextattr,readsecurity,writesecurity,chown"
chmod +a "allow _www list,search,add_file,add_subdirectory,delete_child,readattr,writeattr,readextattr,writeextattr,readsecurity,writesecurity,chown"
I can't test it right now, I don't have mac OS 10.5 available.
You might replace the long string above with the result of ls -e
Y:solution: I try to use multiple chown.
This is not possible:
Unix/Linux/OS X's file have only one owner at a time.
add a comment |Â
up vote
1
down vote
up vote
1
down vote
this is a xy-problem
X:problem, how can two user access same file, with same right ?
solution I use multiple chown => Y:problem
Solution for X problem
according to http://aplawrence.com/MacOSX/acl.html
you can use
chmod +a "allow Oleg list,search,add_file,add_subdirectory,delete_child,readattr,writeattr,readextattr,writeextattr,readsecurity,writesecurity,chown"
chmod +a "allow _www list,search,add_file,add_subdirectory,delete_child,readattr,writeattr,readextattr,writeextattr,readsecurity,writesecurity,chown"
I can't test it right now, I don't have mac OS 10.5 available.
You might replace the long string above with the result of ls -e
Y:solution: I try to use multiple chown.
This is not possible:
Unix/Linux/OS X's file have only one owner at a time.
this is a xy-problem
X:problem, how can two user access same file, with same right ?
solution I use multiple chown => Y:problem
Solution for X problem
according to http://aplawrence.com/MacOSX/acl.html
you can use
chmod +a "allow Oleg list,search,add_file,add_subdirectory,delete_child,readattr,writeattr,readextattr,writeextattr,readsecurity,writesecurity,chown"
chmod +a "allow _www list,search,add_file,add_subdirectory,delete_child,readattr,writeattr,readextattr,writeextattr,readsecurity,writesecurity,chown"
I can't test it right now, I don't have mac OS 10.5 available.
You might replace the long string above with the result of ls -e
Y:solution: I try to use multiple chown.
This is not possible:
Unix/Linux/OS X's file have only one owner at a time.
answered Feb 9 at 14:55
Archemar
19k93366
19k93366
add a comment |Â
add a comment |Â
up vote
1
down vote
accepted
Found the answer (type this in Terminal):
sudo chmod +a 'Oleg allow list,add_file,search,add_subdirectory,delete_child,readattr,writeattr,readextattr,writeextattr,readsecurity' somefolder
Where 'Oleg' is a user name and 'somefolder' is a folder name in question.
The permissions inside single quotes after the 'allow' keyword are just copied from the output of ls -le
Now both users '_www' and 'Oleg' can read, write files and subdirectories, etc.
That was the intention.
Strictly speaking yes, you can not add a second "owner" in POSIX attributes sense, e.g. via Chown.
However in Mac you can give owner-like permissions to numerous users via ACL like Philippos commented (thanks for hinting).
add a comment |Â
up vote
1
down vote
accepted
Found the answer (type this in Terminal):
sudo chmod +a 'Oleg allow list,add_file,search,add_subdirectory,delete_child,readattr,writeattr,readextattr,writeextattr,readsecurity' somefolder
Where 'Oleg' is a user name and 'somefolder' is a folder name in question.
The permissions inside single quotes after the 'allow' keyword are just copied from the output of ls -le
Now both users '_www' and 'Oleg' can read, write files and subdirectories, etc.
That was the intention.
Strictly speaking yes, you can not add a second "owner" in POSIX attributes sense, e.g. via Chown.
However in Mac you can give owner-like permissions to numerous users via ACL like Philippos commented (thanks for hinting).
add a comment |Â
up vote
1
down vote
accepted
up vote
1
down vote
accepted
Found the answer (type this in Terminal):
sudo chmod +a 'Oleg allow list,add_file,search,add_subdirectory,delete_child,readattr,writeattr,readextattr,writeextattr,readsecurity' somefolder
Where 'Oleg' is a user name and 'somefolder' is a folder name in question.
The permissions inside single quotes after the 'allow' keyword are just copied from the output of ls -le
Now both users '_www' and 'Oleg' can read, write files and subdirectories, etc.
That was the intention.
Strictly speaking yes, you can not add a second "owner" in POSIX attributes sense, e.g. via Chown.
However in Mac you can give owner-like permissions to numerous users via ACL like Philippos commented (thanks for hinting).
Found the answer (type this in Terminal):
sudo chmod +a 'Oleg allow list,add_file,search,add_subdirectory,delete_child,readattr,writeattr,readextattr,writeextattr,readsecurity' somefolder
Where 'Oleg' is a user name and 'somefolder' is a folder name in question.
The permissions inside single quotes after the 'allow' keyword are just copied from the output of ls -le
Now both users '_www' and 'Oleg' can read, write files and subdirectories, etc.
That was the intention.
Strictly speaking yes, you can not add a second "owner" in POSIX attributes sense, e.g. via Chown.
However in Mac you can give owner-like permissions to numerous users via ACL like Philippos commented (thanks for hinting).
answered Feb 9 at 14:59
Oleg
315
315
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f423048%2fhow-to-add-a-second-owner-of-a-folder-using-terminal-on-mac%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
1
How do the permissions of the file with two owners look like in terminal. I doubt the Mac does this via POSIX file attributes, but via some ACL stuff.
â Philippos
Feb 9 at 14:01
You can't add a second owner. You may check for ACLs, if ordinary group-based security permission is not enough. You may also consider to own the file by a third user (root, nobody, or any neutral third account), and giving the access to both of users by group-based rules or by acls.
â peterh
Feb 9 at 14:25