You are not logged in.
I have two users on my system. I want to share a folder in my homedirectory (/home/notimeforlove/storage) with another user, "johnmaddenscat."
I have done the following with no success (permission denied):
Created a group, recursively applied said group to all folders within the storage directory.
Changed permissions to 2770.
No dice. Permission denied.
Any help would be appreciated.
Offline
Welcome to Arch.
What file sharing protocol are you using? nfs? samba? ssh?
I use nfs: https://wiki.archlinux.org/index.php/Nfs
Some people prefer ssh: https://wiki.archlinux.org/index.php/Ssh
Unless one of the two machines is a windows machine, you don't need samba.
(edit) I think cfr is probably right. I misunderstood the original question.
Last edited by 2ManyDogs (2012-08-18 02:28:52)
Offline
I read the OP as wanting to share the directory between different users on the same machine. Perhaps the OP could clarify that?
Probably a dumb question but you don't mention it: did you add the users to the group?
What command elicits the error exactly?
What does ls -al ~/<directory-name> give?
Does the other user have appropriate permissions for you _home_ directory to be able to get to the sub-directory within it?
Last edited by cfr (2012-08-18 02:05:34)
CLI Paste | How To Ask Questions
Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L
Offline
Yeah, I meant same machine. I'm familiar with Linux, but not with this issue in particular.
Output of "ls -al ~/storage/"
drwxrwsr-x 7 notimeforlove shared 4096 Aug 17 17:08 .
drwx------ 10 notimeforlove users 4096 Aug 17 16:58 ..
drwxr-xr-x 32 notimeforlove shared 4096 Aug 17 18:07 .downloading
drwxrwsr-x 2 notimeforlove shared 4096 Aug 15 20:50 misc
drwxrwsr-x 6 notimeforlove shared 4096 Aug 16 23:35 movies
drwxrwsr-x 2 notimeforlove shared 4096 Aug 15 20:18 music
drwxrwsr-x 9 notimeforlove shared 4096 Aug 17 18:07 tvThe user I'm trying to share with constantly gets "Permission denied" when accessing the files. They can't even cd into the directory.
Does the other user have appropriate permissions for you _home_ directory to be able to get to the sub-directory within it?
What do you mean? Do I have to also change permissions for /home/notimeforlove? I just want the other user to access /home/notimeforlove/storage, not anything else below that.
Offline
drwx------ 10 notimeforlove users 4096 Aug 17 16:58 ..This is the problem, I think. The other user can't get to anything below your home directory. To be able to get to that directory, s/he needs to be able to access it from your home directory. I'm not explaining this right because I don't know the real technical explanation and tend to think of it in terms of following a path. If my house is on road B and the only way to get to road B is via road A, it doesn't do you any good if I give you access to road B but you are blocked from road A.
I think you would need to give read and execute permission for your home directory for this to work. Maybe there's another way around it but, if so, I'm not sure how. ACLs let you set finer grained controls but I don't think they avoid this basic requirement.
OS X had a set up a bit like this (in at least some versions). So users had a ~/Public which other users could read (not write). But OS X had r-x by default on home directories and I think that is necessary if you want this sort of set up.
If you don't want to give access to your home directory, why not put the storage directory somewhere else and then just symlink it from your home for convenience?
Last edited by cfr (2012-08-18 02:57:44)
CLI Paste | How To Ask Questions
Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L
Offline
drwx------ 10 notimeforlove users 4096 Aug 17 16:58 ..This is the problem, I think. The other user can't get to anything below your home directory. To be able to get to that directory, s/he needs to be able to access it from your home directory
--snip--
If you don't want to give access to your home directory, why not put the storage directory somewhere else and then just symlink it from your home for convenience?
Yeah, that makes sense. I'll give that a shot even though it kinda destroys privacy a bit (oh well.)
Could I put the storage folder somewhere and still utilize the same amount of space I have? Almost my entire harddrive is partitioned for /home. Where else could I put it?
Offline
/home/storage
I have a /home/shared
CLI Paste | How To Ask Questions
Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L
Offline
Hello,
A simple "chmod +x /home/notimeforlove" would be fine (mod 711), I encountered a similar problem when I wanted apache to read my "public_html" folder with mod_userdir. This way, one could only go throught your /home to access readable file, but no directory listing would be allowed.
Last edited by Smod (2012-08-18 15:26:30)
Offline
Hello,
A simple "chmod +x /home/notimeforlove" would be fine (mod 711), I encountered a similar problem when I wanted apache to read my "public_html" folder with mod_userdir. This way, one could only go throught your /home to access readable file, but no directory listing would be allowed.
Woohoo! It works!
Thanks for the help everyone.
Offline
Thanks, Smod. I didn't know you could do that.
CLI Paste | How To Ask Questions
Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L
Offline