I need to give access to 2 users one with read access and other with write access to a particular folder(/folder). Both the users are supposed to be in the same group(sftp)
user with read access: readsftp user with write access: writesftp
I have done
useradd -G sftp readsftp
useradd -G sftp writesftp
Now the user writesftp should be able to write files to /folder and user readsftp should be able to only read files in the folder /folder
The vipw files read
36 sftp:x:47173:47173::/data:/bin/sh
37 ft:x:1002:1002::/home/ft:/bin/bash
38 readsftp:x:47176:47173::/data:/bin/sh
39 writeuser:x:47177:47173::/data:/bin/sh
Have I changed it rightly? (Please observe the ID's)
Could you please help me do this by using sticky bit, and umask and chmod? In the /folder folder I have previously changed files and folder permissions using chmod and I am unable to get through the right understanding on how to do it wrt users.
Thanks in advance.