New answers tagged chroot-jail
There are multiple ways to setup chroot jails. Personally I've seen over 50 different scripts for that. All jails are similar, but have smaller or bigger differences, so there is no generic way to do anything inside them. The most common usage of chroot jails regarding installing software, is installing everything from source. Sometimes chroot jails are ...
Finally I've checked again the permissions and I had them wrong I just chown root:root and chmod 755 all the path to /var/www/domain.com and now it's working great
The directory that you set as your chroot must be owned by root and have 755 permissions. This is what I use for my setup Match user sftpuser ChrootDirectory /home/sftpuser AllowTCPForwarding no X11Forwarding no ForceCommand internal-sftp in /home drwxr-xr-x 5 root users 4096 Jan 29 10:31 sftpuser in /home/sftpuser drwx------ 2 ...
The combination of fakeroot / fakechroot gives a simulacre of chroot for simple needs such as producing tar archives where files appear to be owned by root. Fakechroot manpage is http://linux.die.net/man/1/fakechroot. You don't get any new permission though, but if you own a directory (e.g. fake-distro) before invoking fakechroot fakeroot chroot ...
Top 50 recent answers are included