4
  • I have a lab of computers used by a dozen students.
  • Each computer mounts a specific NFS share with a few directories in it, visible to all students.
  • Some of the students need a place on the network to save their Project's data, so it becomes available on all of the lab computers.
  • For security and privacy reasons, I'd like to hide the list of directories inside the shared workspace, in such a way that if a certain student executes the ls command, he/she can see only their own directory, thinking it is the only one there.
  • I remember back in the days when I used to work for an ISP using Sparcs running Unix, if a user were to try to list the contents of the /home directory, they'd see only their own (those were the times we used to give them shell accounts to access their mail using the Pine command)...

Anyone can tell me what's the appropriate chmod command syntax for this?

4

Say the personal folders are in /external/nfs/server/share, so that user alexp has their own folder /external/nfs/server/share/alexp, owned by them with mode bits 0750 (rwxr-x---).

Make the parent folder /external/nfs/server/share to be owned by some administrative account and group, with mode bits 0751 (rwxr-x--x). In this way, students can traverse the directory to get to their personal home on the network, but cannot list its contents. See "Execute vs Read bit. How do directory permissions in Linux work?" on Unix & Linux SE.

| 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.