What are the command(s) to create a new user (not from su
), give him the ability to write to only one folder which is some directory owned by an already existing user (the one that created him)? Meaning that the folder is already under some existing user's FS. How can I create another user and only let him write to that folder?
I was told here:
Use useradd, adduser, or whatever utility your unix variant has to create a user. The easiest way to control access to the directory is to make it and its files (but nothing else) owned by a newly created group, and make the new user a member of that group (and no other group).
but I do not know which commands to use to do such thing. So how to do it?