I'm trying to recreate the functionality available in the FTP gui on Shibby v105 AIO
I've got the SFTP server running for root user/passwd
ipkg install openssh-sftp-server
I've created a separate user for myself that isn't root with it's own /home using the "add your own users tutorial". This user can ssh and SFTP into it's home and access the routers filesystem and therefore all mounted drives.
I'd like to be able to add different users who have different privileges to files on a mounted drive. Furthermore I'd like to lock them into that mounted drive so they may not 'cd' into the routers file system.
I believe changing my /etc/passwd file like this will handle the user default login directory
alice:x:200:200:Alice A:/tmp/mnt/M/pictures:/bin/sh bob:x:201:200:Bob B:/tmp/mnt/M/:/bin/sh carol:x:202:150:Carol C:/tmp/mnt/M/:/bin/sh
I think this is how I would want my /etc/group file to look
root:x:0: nas:x:100: nobody:x:65534: alice:x:200: bob:x:200: carol:x:150: readwrite:x:150:carol readonly:x:200:alice,bob
I haven't been able to find a good way to make 2 user groups assigned to one folder… How can I give RW access to carol for the same folder bob only has R access? Furthermore, can I use chown to 'lock' these users to their default directories? Will it cause problems to use chown twice on the same folder with two different users? How can I effectively 'undo' a chown if I mess up?
Thanks for the help