Subject: Continuing problem with linked dirs in ftp file structure

From: Jack Lampley <[email-masked]>
Date: Wed, 14 Jul 1999 10:49:55 -0700

I wrote the following message earlier about problems with linked directories in ftp
file structure:

I have been running the following version of ftp on a sparc 20 running Solaris 5.6.

FTP server (Version wu-2.4.2-academ[BETA-14]

I have added 2 new 34 gig disks to give more disk space. The disks were added
under /data/anon-ftp as links to the new partitions. When I ftp in and try to
cd to the new partitions I get the following error:

ftp> cd 2mass
550 2mass: Number of symbolic links encountered during path name traversal exceeds MAXSYMLINKS.

Can someone tell me if it is possible to use symbolic links within the ftp file
structure as I need to do. Is it just a matter of adding a line like MAXSYMLINKS =
1 or 2 into the ftpaccess file or somewhere?

I got rid of that problem by moving the links down a level and now when I try to cd within
ftp to one of them I get:

No such file or directory

Any suggestions?

Thanks,

Jack Lampley, System Administrator
Infrared Processing and Analysis Center (IPAC)
California Institute of Technology (CalTech)
MS 100/22, Pasadena, CA 91125

Telephone : 818-397-9551
Internet  : [email-masked]

---

From: Gregory A Lundberg <[email-masked]>
Date: Wed, 14 Jul 1999 14:31:04 -0400

> FTP server (Version wu-2.4.2-academ[BETA-14]

you need to upgrade to version 2.5.0 .. it won't help with your problem but
it will prevent your system being broken into using the currently-active
exploits against your OS and the version of the daemon you are running.

> I have added 2 new 34 gig disks to give more disk space. The disks were
> added under /data/anon-ftp as links to the new partitions. When I ftp in
> and try to cd to the new partitions I get the following error:
> 
> ftp> cd 2mass
> I got rid of that problem by moving the links down a level and now when I
> try to cd within ftp to one of them I get:
> 

Just that?  On the client side?  No numbers in front of it?  Then it's a
client-side error and has nothing to do with the server.

If there are numbers in front of the message, it came from the daemon.
Check the symlinks to be sure they are correct FROM THE POINT OF VIEW OF
THE ANONYMOUS USER.  'ls' won't do.  You need to chroot THEN do an 'ls'.

  su
  cd ~ftp
  chroot ~ftp /bin/ls -alR

or something similar.  bet you see a link which points to somewhere which
does not exist FROM THE POINT OF VIEW OF THE ANONYMOUS FTP USER.  For
instance:

  su
  cd ~ftp
  ln -s /tmp tmp

will produce a symlink which is fine for shell users but points to a
non-existent file/directory when viewed using FTP.

-- 

Gregory A Lundberg              WU-FTPD Development Group
1441 Elmdale Drive              [email-masked]
Kettering, OH 45409-1615 USA    1-800-809-2195