I have a "downloads" folder inside "tempuser" home folder ("/home/tempuser/downloads") which I want to allow "rwx" permission for a different user say "testuser". The testuser should not have any permission to anyother files or folders inside /home/tempuser other than the "downloads" folder.
How can I do it ?
to traverse a folder, one needs the execute permission. Execute will give access to "execute" (ie. traverse) the folder without having any access to read the files in it.
So, imagine you have the following tree of directories in your home folder:
You can give anybody access to the "asm" folder without giving them access to anything else by setting the execute permission to everybody on the complete hierarchy, and then the write permission on the asm folder:
Following the same logic, you can put "testuser" and "tempuser" in a separate group "testgroup" and give access to "tempgroup" only
Add
tempuser
andtestuser
into a group and make/home/tempuser/downloads
can be writable by this group: