morphy_richards wrote:giotto-admin@giotto:~/athena/dannyh2013$ ls abbiee2011
ls: cannot access abbiee2011: Permission denied
This is actually quite a tricky problem. The individual students own those directories and files, so they are responsible for the final permissions. You could tell them to make sure you have access, but they could still get that wrong.
Also, in the simplistic UNIX permissions model, it is difficult for students to give you
access without also giving each other access to their work, which might not be desirable.
(You could give each student a group, such that only you are a member of all the groups. Or you could ask them to make the files world-readable but notch out the students group leaving permissions of 0604 = rw----r--. Or you could use file ACLs, or some kind of mandatory access control. But these are all advanced and unusual configurations, and further increase the chance of user error.)
I think you should accept that you probably need to be root. You can either use root to read the files, or you can use it to forcibly change all the permissions, most likely recursively. I think the first option may be safer, unless you are already familiar with setfacl(1).
Note that sshfs will not allow access outside the starting directory. So allowing root access to /home is a lot better than allowing root access to /. If at all possible, make the mount read-only on the client, so that the GUI tools you are using cannot write:
Code: Select all
sshfs -o ro firstname.lastname@example.org:/home ./athena
(If athena is running Linux, then it is also possible to allow a user such athena_admin read only access to all files, via capability CAP_DAC_READ_SEARCH. Again, that is an advanced topic.)