Shared sub-directory between multiple users [duplicate]
This question already has an answer here:
Execute vs Read bit. How do directory permissions in Linux work?
7 answers
I have two users with home directories:
/home/user1/
/home/user2/
I would like to share a folder between the two users:
/home/user1/some/path/to/folder
but would only like user2 to have access to /home/user1/some/path/to/folder and not any of the parent directories. I tried to chmod 777 /home/user1/some/path/to/folder, but that didn't work.
permissions users
marked as duplicate by DarkHeart, Stephen Harris, Shadur, Mr Shunz, Michael Homer Dec 21 '18 at 3:32
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
add a comment |
This question already has an answer here:
Execute vs Read bit. How do directory permissions in Linux work?
7 answers
I have two users with home directories:
/home/user1/
/home/user2/
I would like to share a folder between the two users:
/home/user1/some/path/to/folder
but would only like user2 to have access to /home/user1/some/path/to/folder and not any of the parent directories. I tried to chmod 777 /home/user1/some/path/to/folder, but that didn't work.
permissions users
marked as duplicate by DarkHeart, Stephen Harris, Shadur, Mr Shunz, Michael Homer Dec 21 '18 at 3:32
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
You may try to usesshfs
to create a "virtual" directory accessible by both users.
– porton
Dec 19 '18 at 22:28
wiki.archlinux.org/index.php/File_permissions_and_attributes
– DarkHeart
Dec 19 '18 at 22:33
add a comment |
This question already has an answer here:
Execute vs Read bit. How do directory permissions in Linux work?
7 answers
I have two users with home directories:
/home/user1/
/home/user2/
I would like to share a folder between the two users:
/home/user1/some/path/to/folder
but would only like user2 to have access to /home/user1/some/path/to/folder and not any of the parent directories. I tried to chmod 777 /home/user1/some/path/to/folder, but that didn't work.
permissions users
This question already has an answer here:
Execute vs Read bit. How do directory permissions in Linux work?
7 answers
I have two users with home directories:
/home/user1/
/home/user2/
I would like to share a folder between the two users:
/home/user1/some/path/to/folder
but would only like user2 to have access to /home/user1/some/path/to/folder and not any of the parent directories. I tried to chmod 777 /home/user1/some/path/to/folder, but that didn't work.
This question already has an answer here:
Execute vs Read bit. How do directory permissions in Linux work?
7 answers
permissions users
permissions users
edited Dec 19 '18 at 22:28
DarkHeart
3,43422140
3,43422140
asked Dec 19 '18 at 22:20
user1763510
104
104
marked as duplicate by DarkHeart, Stephen Harris, Shadur, Mr Shunz, Michael Homer Dec 21 '18 at 3:32
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
marked as duplicate by DarkHeart, Stephen Harris, Shadur, Mr Shunz, Michael Homer Dec 21 '18 at 3:32
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
You may try to usesshfs
to create a "virtual" directory accessible by both users.
– porton
Dec 19 '18 at 22:28
wiki.archlinux.org/index.php/File_permissions_and_attributes
– DarkHeart
Dec 19 '18 at 22:33
add a comment |
You may try to usesshfs
to create a "virtual" directory accessible by both users.
– porton
Dec 19 '18 at 22:28
wiki.archlinux.org/index.php/File_permissions_and_attributes
– DarkHeart
Dec 19 '18 at 22:33
You may try to use
sshfs
to create a "virtual" directory accessible by both users.– porton
Dec 19 '18 at 22:28
You may try to use
sshfs
to create a "virtual" directory accessible by both users.– porton
Dec 19 '18 at 22:28
wiki.archlinux.org/index.php/File_permissions_and_attributes
– DarkHeart
Dec 19 '18 at 22:33
wiki.archlinux.org/index.php/File_permissions_and_attributes
– DarkHeart
Dec 19 '18 at 22:33
add a comment |
1 Answer
1
active
oldest
votes
The /home
directory has the execute permission set for everyone so that users can move into their homes inside but each user's home only has permissions for the user (unless configured otherwise for some reason).
The only way to get exactly what you want is by creating a group containing user2
and giving it execute permissions for home of user1
and the directories above the one that you want to share to make them traversable by user2
and then set the full permissions on the full directory. I would not recommend doing this as user2
would be able to ls specific files and subdirectories inside of the home of user1
which is a bad idea. You don't want to give another user permissions to someone else's home.
A better way to accomplish this would be to either make a directory in /
and create a group containing the users and give them permissions to it or to create an nfs export with permissions for the two users only and mount it on the machine. Once again, do not give another user access to someone else's home.
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
The /home
directory has the execute permission set for everyone so that users can move into their homes inside but each user's home only has permissions for the user (unless configured otherwise for some reason).
The only way to get exactly what you want is by creating a group containing user2
and giving it execute permissions for home of user1
and the directories above the one that you want to share to make them traversable by user2
and then set the full permissions on the full directory. I would not recommend doing this as user2
would be able to ls specific files and subdirectories inside of the home of user1
which is a bad idea. You don't want to give another user permissions to someone else's home.
A better way to accomplish this would be to either make a directory in /
and create a group containing the users and give them permissions to it or to create an nfs export with permissions for the two users only and mount it on the machine. Once again, do not give another user access to someone else's home.
add a comment |
The /home
directory has the execute permission set for everyone so that users can move into their homes inside but each user's home only has permissions for the user (unless configured otherwise for some reason).
The only way to get exactly what you want is by creating a group containing user2
and giving it execute permissions for home of user1
and the directories above the one that you want to share to make them traversable by user2
and then set the full permissions on the full directory. I would not recommend doing this as user2
would be able to ls specific files and subdirectories inside of the home of user1
which is a bad idea. You don't want to give another user permissions to someone else's home.
A better way to accomplish this would be to either make a directory in /
and create a group containing the users and give them permissions to it or to create an nfs export with permissions for the two users only and mount it on the machine. Once again, do not give another user access to someone else's home.
add a comment |
The /home
directory has the execute permission set for everyone so that users can move into their homes inside but each user's home only has permissions for the user (unless configured otherwise for some reason).
The only way to get exactly what you want is by creating a group containing user2
and giving it execute permissions for home of user1
and the directories above the one that you want to share to make them traversable by user2
and then set the full permissions on the full directory. I would not recommend doing this as user2
would be able to ls specific files and subdirectories inside of the home of user1
which is a bad idea. You don't want to give another user permissions to someone else's home.
A better way to accomplish this would be to either make a directory in /
and create a group containing the users and give them permissions to it or to create an nfs export with permissions for the two users only and mount it on the machine. Once again, do not give another user access to someone else's home.
The /home
directory has the execute permission set for everyone so that users can move into their homes inside but each user's home only has permissions for the user (unless configured otherwise for some reason).
The only way to get exactly what you want is by creating a group containing user2
and giving it execute permissions for home of user1
and the directories above the one that you want to share to make them traversable by user2
and then set the full permissions on the full directory. I would not recommend doing this as user2
would be able to ls specific files and subdirectories inside of the home of user1
which is a bad idea. You don't want to give another user permissions to someone else's home.
A better way to accomplish this would be to either make a directory in /
and create a group containing the users and give them permissions to it or to create an nfs export with permissions for the two users only and mount it on the machine. Once again, do not give another user access to someone else's home.
answered Dec 19 '18 at 22:58
Nasir Riley
2,306239
2,306239
add a comment |
add a comment |
You may try to use
sshfs
to create a "virtual" directory accessible by both users.– porton
Dec 19 '18 at 22:28
wiki.archlinux.org/index.php/File_permissions_and_attributes
– DarkHeart
Dec 19 '18 at 22:33