CHROOT(8) System Manager's Manual CHROOT(8)NAME
chroot - change root directory
SYNOPSIS
chroot newroot [ command ]
DESCRIPTION
The chroot command changes its root directory to the supplied directory newroot and exec's command, if supplied, or an interactive copy of
your shell (as specified by the environmental variable SHELL) if not. /bin/sh is used if SHELL is not specified.
Note, command or the shell are run as your real-user-id.
SEE ALSO chdir(2), chroot(2), environ(7)4.3 Berkeley Distribution December 5, 1988 CHROOT(8)
Check Out this Related Man Page
CHROOT(8) BSD System Manager's Manual CHROOT(8)NAME
chroot -- change root directory
SYNOPSIS
chroot [-u -user] [-g -group] [-G -group,group,...] newroot [command]
DESCRIPTION
The chroot utility changes its current and root directories to the supplied directory newroot and then exec's command, if supplied, or an
interactive copy of the user's login shell.
If the -u, -g or -G options are given, the user, group and group list of the process are set to these values after the chroot has taken
place. See setgid(2), setgroups(2), setuid(2), getgrnam(3) and getpwnam(3).
Note, command or the shell are run as your real-user-id.
ENVIRONMENT
The following environment variable is referenced by :
SHELL If set, the string specified by SHELL is interpreted as the name of the shell to exec. If the variable SHELL is not set, /bin/sh is
used.
SEE ALSO chdir(2), chroot(2), environ(7), jail(8)HISTORY
The chroot utility first appeared in 4.4BSD.
SECURITY CONSIDERATIONS
chroot should never be installed setuid root, as it would then be possible to exploit the program to gain root privileges.
BSD January 24, 2002 BSD
Hi, I'm new to linux and unix, and i have couple of problems:
1) how can i limit the access for a user, for example, i created a user, and i want that this user will be able to be only in one directory, and will see only the files i want him to.
2) I have a domain name, and i want that every... (4 Replies)
restricted access...
Hi
I need to restrict users shell access to only $HOME under /home for each user. I don't want them getting out of their own directories. From what I understand chroot is something I could use, but I want to avoid this since it involves creating symbolic links to a number... (9 Replies)
I need to create a user that only has access to 1 directory (e.g. /vol/mita/test). The user needs to be able to rsh into that directory to run a script. The user should not be able to navigate to any other directories above /vol/mita/test. Any help would be appreciated! (4 Replies)
Hi all,
I am using RHEL 5.0
I need a user say test to have full access to two directories, say /tmp1 & /tmp2 only other than his home directory.
I do not want to change his login shell which is ksh or bash by default.
Moreover, he should not even have read access of other directories.
... (10 Replies)
specifically - I don't need to restrict a user to a single directory - but I want them to be "ROOTED" to their home directory.
so if my home directory is /home/onlyme
when I login - if I do a pwd - I want to see:
/
but in real life I will be in /home/onlyme - it just appears as root to... (10 Replies)
Hi all. I have installed openssh 5.3 and set up jailed root.
It works almost as I want it to I cant cd to any directory above my ch root.
my config :
entry in passwd:
test2:x:103:113::/users2/test2:/bin/false
sshd_conf:
Match User test2
ChrootDirectory /users2/%u
# ... (4 Replies)
Hi all,
I have a tar file that was done with tar -cvf <tar_file> /directory.
Is there any way that I can untar this, i.e. tar -xvf <tar_file> into a different directory?
So far Google said you can't do tar -xvf to a different directory.
Unfortunately, am not the one doing the tar -cvf... (9 Replies)
Firstly Hi everyone :)
I setup SFTP and SSH jail using this tutorial:
http://www.howtoforge.com/chrooted-ssh-sftp-tutorial-debian-lenny
SFTP jail works however now when I try to SSH it accepts my password and then just goes to a blank screen. Type any command and the shell session is... (11 Replies)
I have a simple sandbox program which runs a command as user "nobody" in a chroot jail. It sets resource limits with setrlimit, changes the user id with setuid, changes the root dir with chroot, and then calls exec to execute the command given as command line parameters. It is of course a... (8 Replies)
Hello, I installed 'vsftpd' and scrolled through the config file. I liked to change the chroot-setting. Now I can't connect to a subfolder anymore - it is a link to a subfolder to my mainfolder for the www-content ( /var/www/userxxx ). Is there a way to use chroot und use links to folders at... (4 Replies)
Hello,
I have a weird issue, I have RHEL 5.7 running with openssh5.2 where sftpgroup OS group is chroot. I see the difference difference in timestamp on files, when I login via ssh and SFTP, I see four hour difference, is something missing in my configuration.
#pwd... (8 Replies)
I needed to set up an sftp server for an external user to upload data for an internal developer.
What I did was created a chrooted user for the external guy, and then created an internal group with full permissions to that directory and then made the internal developer a member of that group so... (5 Replies)
I am really confused as to why a tool like fakechroot exists and what does it do.
Chroot is an ability only for root users, correct? Then a tool that allows to bypass that is clearly a security flaw, correct?
When and why would you need something like this?
Is there any relation between... (7 Replies)
The script works and creates a modified iso fine until I added the chrootbeg and chrootend functions and executed them. I'm sorry if I did something wrong this is my first post. I uploaded entire bash script for reference or in case you want to run it to debug it is called isoremast.txt.
... (5 Replies)