[prev in list] [next in list] [prev in thread] [next in thread] 

List:       proftpd-users
Subject:    Re: [Proftpd-user] chroot and symlinks
From:       Patrick Muldoon <doon.bulk () inoc ! net>
Date:       2008-12-16 4:20:04
Message-ID: F0A54213-D37E-47B5-9563-7ABFEECA76E0 () inoc ! net
[Download RAW message or body]


On Dec 15, 2008, at 6:41 PM, nix4me wrote:

>
>  Ok, so that worked.  I made a symlink to folder in same dir and it
> works using relative path.
>
> What I really want to do is create the link in the root dir of the
> chroot, to a folder 2 levels below it.  Such as:
>
> /
> Linktotest
> folder
> folder
> folder/folder/test
>
> Not having any luck doing this.



Works for me.

have you tried creating the link like below?

[doon@qix:link] touch foo/bar/baz
[doon@qix:link] ln -s ./foo/bar/baz baz
[doon@qix:link] ls -l
total 4
lrwxrwxrwx  1 doon  admins    13 Dec 16 03:43 baz@ -> ./foo/bar/baz
drwxr-xr-x  3 doon  admins  4096 Dec 16 03:43 foo/
[doon@qix:link]


Then ftp'd in.

ftp> cd link
250 CWD command successful
ftp> ls
227 Entering Passive Mode (64,22,32,144,254,36).
150 Opening ASCII mode data connection for file list
drwxr-xr-x   3 doon     inoc         4096 Dec 16 03:43 .
drwxr-xr-x   5 doon     inoc         4096 Dec 16 03:42 ..
lrwxrwxrwx   1 doon     inoc           13 Dec 16 03:43 baz -> ./foo/ 
bar/baz
drwxr-xr-x   3 doon     inoc         4096 Dec 16 03:43 foo
226 Transfer complete
ftp> get baz
local: baz remote: baz
227 Entering Passive Mode (64,22,32,144,193,5).
150 Opening BINARY mode data connection for baz
     0       0.00 KB/s
226 Transfer complete
ftp>

That is running chroot to ~ (we do everything in sql, so we force the  
groupname to be different.. :) )

-Patrick
--
Patrick Muldoon
Network/Software Engineer
INOC (http://www.inoc.net)
PGPKEY (http://www.inoc.net/~doon)
Key ID: 0x370D752C

Me no internet, only janitor, me just wax floors.


------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
ProFTPD Users List   <proftpd-users@proftpd.org>
Unsubscribe problems?
http://www.proftpd.org/list-unsub.html
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic