ssh - user access to another users files

ladydi711

Well-Known Member
Sep 4, 2001
140
6
318
I'm wanting to grant access for a user to access another users files on my server. So far I've done:

Created a new account for the second user
usermod -G user1 user2

When I ssh into the second account, I try to ch /home/user1
ls -la gives me:
ls: .: Permission denied

When i type groups, i see
group1 group2

What am I missing? This should be possible, right?

Both users have normal shells

Thanks in Advance!
Diane
 

chirpy

Well-Known Member
Verifed Vendor
Jun 15, 2002
13,437
33
473
Go on, have a guess
That's fine for file ownership, but you have to configure permissions appropriately. If you want all users to share access then you'll need to grant 777 access to dirs and 666 to files on the shared data. If you only want it between two users, then you'll need to create a new unix group and add both user accounts to that same group and then enable group access to the files you want to share, instead of world access.