I have a /home/shared_space/ directory containing symlinks to all user /home/<user>/Projects/ directories.


/home/shared_space/johnny -> /home/johnny/Projects/
/home/shared_space/jenny -> /home/jenny/Projects/

All users are assigned to the data group. The data group has read permissions and execute permissions for the /home/<user>/Projects/ directories.

I've a problem with only one specific user, as for all other users it works. This one user area seems to be the problem, whereas other user areas are accessible by all users belonging to the data group.

If I am logged in as root or as the specific user who owns the /home/<user>/Projects/ directory I can navigate to /home/shared_space. However any of the other users can't access the other users /home/shared_space/<user> directory.

The listing shows the symlink in red, even though the symlink is not dangling.

How can I solve it?

  • Does data group have read/execute permissions on all /home/<user>/ directories? – danzel Jun 3 '19 at 10:58
  • what is the permissions of the home dir of the problematic user? does it gives x permission to everyone? (what is the result of ls -ld /home/user) – Yaron Jun 3 '19 at 10:58
  • 1
    Dont abuse /home for this. You will royally screw up your system at some point. Use a dedicated partition for this. – Rinzwind Jun 3 '19 at 11:13

In order to access a directory, you must have all needed permission for all directories above that directory.

i.e. if one wants to access /home/johnny/Projects/ it should be able to access also: /home/ and /home/johnny/ folders.

For that you should grant group data all needed permissions to the sub-directories and its parents - or atleast allow x (execute/change-directory) on every parent directory.

Note: as mentioned by @Rinzwind - From privacy/security POV it is better to have a dedicated partition to store those projects, this will make sure that no sensitive private data will be accessed by mistake.

e.g. for such structure: dedicated partition: /opt/project and under this partition you'll have folder per student (/opt/project/johnny/ , /opt/project/dave/) where /opt/project/ will be accessed to everyone in the data group, and if needed all students folders under /opt/project will also allows read/execute access to their project folder

You might want to reverse the link, so every student will have a sym-link from his home account to the project which will be located on a dedicated partition.

/home/johnny/Projects/ -> /opt/project/johnny/
/home/jenny/Projects/  -> /opt/project/jenny/
  • How do you see this working from /home? – Rinzwind Jun 3 '19 at 11:14
  • Thanks @Rinzwind for your comment. Do you agree with my updated answer? – Yaron Jun 3 '19 at 12:36

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.