Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Tue May 18, 2004 8:00 pm 
Offline

Joined: Mon May 17, 2004 4:41 pm
Posts: 1
Website: http://philsown.com/
Location: Phoenix, AZ
Hello,

I have a folder set up called /web. In that I have /web/{user}, then domain names and various folders for each domain. In the /home directory for each user, I want a symlink called "web" that points to /web/{user}. So for example, for user "joe", there is

/web/joe/joes.org etc. and
/home/joe

and /home/joe/web points to /web/joe

This is all fine and good, but when joe logs in via ftp, she is put in her home directory, but the listing says she's in / (and not /home/joe). So if she trys to go to her symlink "web" pointing to /web/joe, the ftp client says it's "too many levels of symbolic links" since I think it's trying to use /web to get to /web/joe which obviously would be wrong.

Is proftpd server chrooting joe to her home dir? Can I change this behaviour in the config? Through webmin? I did some googling, but couldn't find anything helpful.

Thanks in advance,
Phillip


Top
   
 Post subject:
PostPosted: Tue May 18, 2004 8:14 pm 
Offline
Linode Staff
User avatar

Joined: Tue Apr 15, 2003 6:24 pm
Posts: 3090
Website: http://www.linode.com/
Location: Galloway, NJ
Instead of symlinks, you can bind-mount the /web/joe directory into their home dir:

Code:
# run these once
mkdir /home/joe/web
chown joe: /home/joe/web

# run this at boot, or mabye fstab entry ??
mount -o bind /web/joe /home/joe/web


Kind of odd, but this is what I found while googling..

http://proftpd.linux.co.uk/localsite/Us ... links.html

-Chris


Top
   
 Post subject:
PostPosted: Tue May 18, 2004 8:49 pm 
Offline
Senior Member
User avatar

Joined: Tue Apr 13, 2004 6:54 pm
Posts: 833
caker wrote:
Instead of symlinks, you can bind-mount the /web/joe directory into their home dir:

Just a general warning to anyone doing bind mounts (probably not a problem in this case, but...); they can not be done read-only. I wanted to chroot my web server but allow CGI scripts (perl, shell), thus requiring /lib and stuff. So I was going to bind-mount /lib into the chrooted area, so any patches applied to the system would automatically appear in the chroot area. Unfortunately the "ro" option is ignored. I definitely don't want my real /lib to be rw in the chroot area!

So... bind mounts good for rw access; bad for ro access.

_________________
Rgds
Stephen
(Linux user since kernel version 0.11)


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group