You are not logged in.

#1 2014-11-20 07:31:19

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,914
Website

Creating soft links under chroot

Trying to figure out how to create soft links under chroot, am currently getting 'file/directory not found' error. Wanted to know if it is possible or do I need to load a script to chroot root! then run that?


Mr Green

Offline

#2 2014-11-20 12:52:50

drcouzelis
Member
From: Connecticut, USA
Registered: 2009-11-09
Posts: 4,092
Website

Re: Creating soft links under chroot

I'm no expert, but an Internet search informs me that it is impossible:

symbolic links don't escape jail, hard links do

(http://www.unixwiz.net/techtips/chroot-practices.html)

One solution appears to involve mounting the directory you want access to to a handy directory before the chroot:

http://unix.stackexchange.com/questions … -within-it
http://serverfault.com/questions/440426 … -directory

...or, are you trying to use a symbolic link that points to another file INSIDE the chroot environment? That seems perfectly possible, since symbolic links simply point to a path and not a specific file / directory.

Last edited by drcouzelis (2014-11-20 12:53:44)

Offline

#3 2014-11-20 19:34:27

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,914
Website

Re: Creating soft links under chroot

Sorry I should have said I am linking to a directory inside of chroot, so far the only way I could get command to run was to add -f (not the best idea). Some things I have read suggest cd'ing to the directory before running ln


Mr Green

Offline

Board footer

Powered by FluxBB