6

I have 3 users: admin with sudo, and two normal users - user1 and user2.

user2 is under user1 group.

There is a folder fold1 as /home/user1/fold1 which is under the group user1 with read and write permissions.

Now I want to create a symbolic link to this above folder at a location /home/user2/fold1 so that user2 can access and write the same folder.

All I have been trying is the following from the admin user:

su admin
sudo ln -s /home/user1/fold1 /home/user2/fold1
sudo chown user1:user1 /home/user2/fold1

I have also tried sudo chown user2:user1 /home/user2/fold1, but not working.

But anyway, user2 cannot access this folder. Only a cross overlay is showing on the link from user2 account.

What could be wrong here?

Thanks in advance.

1 Answer 1

3

Since it is a soft link, user2 will have to have access to the whole path of /home/user1/fold1 with at least execution right (x).

(you should do a chmod g+x /home/user1)

5
  • The commands that I have put above, worked one time after repeated trials. But for some reasons I removed the link. And again now the same commands seem not to work. And there are already such shared other folders working.
    – user62039
    May 28, 2018 at 14:23
  • can you past the result from ls -l /home/ | grep user, ls -l /home/user1/ | grep fold and ls -l /home/user2/ | grep fold ? May 28, 2018 at 14:33
  • from which account?
    – user62039
    May 28, 2018 at 14:43
  • from any who can access those folder, for example the admin account. May 28, 2018 at 14:48
  • Thanks a lot. That +x to the group is the crux of the solution. And these ls commands were actually failing due to absence of +x permission from user2 account.
    – user62039
    May 29, 2018 at 8:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .