1

Does anyone understand why the nobody user is having trouble stat-ing the foo directory, when it definitely has execute permissions? It seems like there are some permissions I'm unaware of at this point. I’ve chmod 777’ed the folder at this point, but even then nobody cannot stat it.

Showing that foo is 777 and owned by nobody:

$ sudo ls -l                                                                                                                                                                                          [sudo] password for hamiltont:
total 12
drwxr-xr-x 2 nobody nogroup 4096 Feb 17 23:05 completed
drwxr-xr-x 3 nobody nogroup 4096 Feb 17 23:05 config
drwxrwxrwx 1 nobody nogroup 4096 Feb 17 19:55 foo

Showing that nobody cannot stat foo:

$ sudo su nobody                                                                                                                                                                                      nobody@ht-media:/lxc/sonarr$ ls -l
ls: cannot access foo: Permission denied
total 8
drwxr-xr-x 2 nobody nogroup 4096 Feb 17 23:05 completed
drwxr-xr-x 3 nobody nogroup 4096 Feb 17 23:05 config
d????????? ? ?      ?          ?            ? foo

The mount command is nothing special, just mount remote folder ~ from machine foo into /folder/foo as uid=nobody and gid=nogroup

sshfs -o uid=$(id -u nobody) -o gid=$(getent group nogroup | cut -d: -f3) foo:~ /folder/foo
  • Small thing, but you state, “Showing that nobody cannot stat foo” but then the example shows “ls: cannot access feral: Permission denied” – JakeGould Feb 18 '15 at 6:49
  • @JakeGould You caught me cleaning up the directory names ;-) Fixed now – Hamy Feb 18 '15 at 16:40
  • You missed one: d????????? ? ? ? ? ? feral – JakeGould Feb 18 '15 at 19:26
0

As per this answer on the Unix & Linux Stack Exchange site, it seems like you should use the allow_other option when initially mounting with SSHFS. So your command which looks like this now:

sshfs -o uid=$(id -u nobody) -o gid=$(getent group nogroup | cut -d: -f3) foo:~ /folder/foo

Should be changed to:

sshfs -o allow_other uid=$(id -u nobody) -o gid=$(getent group nogroup | cut -d: -f3) foo:~ /folder/foo
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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