restrict user to home directory at logon
Hi
Can we restrict user to his home directory only in (redhat linux7.2) .So that user can browse only files in his directory. |
Remove read, write and execute permissions for generic users from everywhere else:
chmod o-rwx <everything else> Particularly, make sure no folders have execute permissions - this will present users browsing them. You can then set group permissions and add users to groups as appropriate. --Rounan |
i want that the particular user cannot even browse the /tmp folder (where the permission by default are 1777)
More so (Remove read, write and execute permissions for generic users from everywhere else: chmod o-rwx <everything else>) doing this will make my many other process unworthy |
Well, as roundabout as it seems, so far as I know, permissions are positive-based and not negative-based. I'm a relative newbie and might be entirely wrong, but I don't know of a way to remove permissions from one specific user other than removing them, entirely, and then granting them to users you DO want to have them.
Quote:
Quote:
I agree that it seems like a pretty inelegant workaround jsut to lock out one user, but it will work and it will result in a more secure system overall. --Rounan |
You have to create a chroot environment(jail) for the user. There is a tutorial which you can find here: http://tjw.org/chroot-login-HOWTO/
|
Quote:
For example, when you type the command "ls", it looks at the directories in your PATH variable for an executable file called ls, then executes it. If you don't have execute permission on the directory that contains ls, you can't see it so you can't run the command. In fact, if you do chmod o-rwx you won't even be able to log on as that user. Creating a chroot environment has the same effect, but you get round this problem by providing local copies of commands you want the user to be able to run, as well as local versions of configuration files they need (e.g. /etc/passwd). |
...true. Hadn't thought of that. ;)
Thanks for clearing that up. Yarrrrr.... I'm not a sysadmin. ;) --Rounan |
All times are GMT -5. The time now is 08:01 AM. |