Subject: Q: Using symbolic links in wu-ftpd-2.4 on Digital Unix V4.0d

From: [email-masked]
Date: Tue, 01 Sep 1998 09:29 -0700 (PDT)

Greetings All,
     
   I'm running Digital Unix V4.0d and TruCluster V1.5 with C2 security.  I'm 
   also using wu-ftpd v2.4 with the patches for C2 security.
     
   I am having some trouble getting anonymous ftp to work correctly.  Real 
   accounts work a-ok.
     
   The ftp account has as it's home directory: /usr/users/ftp. In this 
   directory I have the etc and bin directories appropriately permissioned and 
   with the correct files in them.  I also have my public directory, pub, as a 
   symbolic link to /ftpsvc/pub.
     
   Here's what it all looks like:
     
   # /usr/users/ftp >ls -l
   total 16
   d--x--x--x   2 root     system      8192 Aug 18 14:39 bin
   d--x--x--x   3 root     system      8192 Aug 31 09:55 etc
   lrwxrwxrwx   1 ftp      ftponly       11 Sep  1 08:55 pub -> /ftpsvc/pub
     
   And /ftpsvc
     
   sd800b /usr/users/ftp >ls -l /ftpsvc
   total 40
   <snip>
   drwxrwxrwx   2 ftp      ftponly     8192 Sep  1 08:53 pub
     
   Yet when I ftp with anonymous I get:
     
   Connected to SD800B.DMZ.LPL.COM.
   Name (SD800B.DMZ.LPL.COM:larryc): anonymous
   331 Guest login ok, send your complete e-mail address as password.
   Password:
   230 Guest login ok, access restrictions apply.
   FTP> ls -l
   200 PORT command successful.
   150 Opening ASCII mode data connection for /bin/ls.
   total 16
   d--x--x--x   2 0        0           8192 Aug 18 13:39 bin
   d--x--x--x   3 0        0           8192 Aug 31 08:55 etc
   lrwxrwxrwx   1 201      200           11 Sep  1 07:55 pub -> /ftpsvc/pub
      
   226 Transfer complete.
   202 bytes received in 00:00:00.07 seconds (2.81 Kbytes/s)
   FTP> cd pub
   550 pub: No such file or directory.
   FTP> cd bin
   250 CWD command successful.
   FTP> ls
   200 PORT command successful.
   550 No files found.
   %FTP-E-NOSUCHFILE, No such file (* or directory)
   FTP> cd ..
   250 CWD command successful.
   FTP> ls
   200 PORT command successful.
   150 Opening ASCII mode data connection for file list.
   pub
   bin
   etc
    
   226 Transfer complete.
   15 bytes received in 00:00:00.00 seconds (14.64 Kbytes/s)
   FTP>
   
   Is there some problem or issue I'm overlooking with regard to symbolic 
   links?  This anonymous ftp service will be for 'public' use.  It is also a 
   TruCluster service meaning if its primary node is down it will failover to 
   the other node.  The /ftpsvc is a TruCluster disk service, e.g. shared media 
   and is where I need to keep all the 'public' files for downloading.
   
   Any hints or advice would be greatly appreciated.  Thank you.
   
   Larry Clegg
   Systems Manager
   LPL Financial Services
   San Diego, California
   [email-masked]

---

From: Gregory A Lundberg <[email-masked]>
Date: Tue, 1 Sep 1998 12:42:09 -0400 (EDT)

>    lrwxrwxrwx   1 ftp      ftponly       11 Sep  1 08:55 pub -> /ftpsvc/pub

When you ftp in as anonymous (or guest) you get chroot'd.  Symlinks
outside the chroot'd directory won't work.  Period.  You could switch them
arround, but that's just putting of the agony.

rm -f /usr/users/ftp/pub
mv /ftpsvc/pub /usr/users/ftp/pub
ln -s /usr/users/ftp/pub /ftpsvc/pub

if you REALLY need access to the pub from telnet/shell.

----

Gregory A Lundberg		Senior Partner, VRnet Company
1441 Elmdale Drive              [email-masked]
Kettering, OH 45409-1615 USA    1-800-809-2195