Linux / UNIX Tech Support Forum
This is a discussion on user as chrooted enviorment within the Linux software forums, part of the Linux Getting Started category; HI sir, I want to setup two thing with linux normal user 1. how to make user as readonly --> ...
Register free or login to your account to remove all advertisements.
|
|||||||
| Linux software General questions and discussion about Redhat/Fedora Core/Cent OS, Debian and Ubuntu Linux related to softwares should go here. |
![]() |
|
|
Thread Tools | Display Modes |
|
|||
|
HI sir,
I want to setup two thing with linux normal user 1. how to make user as readonly --> i can set readonly as filesystem partition and also i can give file OR directory permission as readonly for any user, but still i have problem if i set permission on file like chmod 774 <path> then all users which belong to other having same permission Read only. or if i create group and make user as secondary member of that group having same issue. for example ls -ld /oracle drwxr_ _ r_ _ root grp1 .... ... ... /oracle for example clear that /oracle dir having group grp1, and useradd -G grp1 test for this command the test user is secondary group member of grp1 grup, and /oracle having read on grp1 , so test user having read only permission. ISSUE---->How to make user as read-only( without partition AS read only and file or directory as read only ) AND way to make user to restict access all file and directory apart from his HOME directory(user only access his home dir ) OR can i make user as chrooted enviorment in his home dir , so it will create and access only in his home directory ( not like ftp chrooted env), this is normal linux user. |
|
|||
|
You can use rbash i.e. restricted bash shell. A restricted shell is used to set up an environment more controlled than the standard shell. It behaves identically to bash with the exception that the following are disallowed or not performed:Changing directories with cdSetting or unsetting the values of SHELL, PATH, ENV, or BASH_ENVSpecifying command names containing /Specifying a file name containing a / as an argument to the . builtin commandSpecifying a filename containing a slash as an argument to the -p option to the hash builtin commandImporting function definitions from the shell environment at startupParsing the value of SHELLOPTS from the shell environment at startupRedirecting output using the >, >|, <>, >&, &>, and >> redirection operatorsUsing the exec builtin command to replace the shell with another commandAdding or deleting builtin commands with the -f and -d options to the enable builtin commandUsing the enable builtin command to enable disabled shell builtinsSpecifying the -p option to the command builtin commandTurning off restricted mode with set +r or set +o restricted.These restrictions are enforced after any startup files are read. When a command that is found to be a shell script is executed, rbash turns off any restrictions in the shellspawned to execute the script.Open /etc/passwd file and setup shell to /bin/rbash# vi /etc/passwdFor example here is a sample entry for user vivek:vivek
|
![]() |
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Add normal user / FTP user usein NORMAL user(non-root) | anilvrathod | Shell scripting | 0 | 7th December 2007 06:04 PM |
| how to enable a user and disabling a user | narasimha.reddygnv | Shell scripting | 1 | 31st March 2007 12:31 AM |