Subject: [509] Re: [500] ls works, dir doesn't

From: [email-masked] (Seth Osher)
Date: Mon, 03 Oct 1994 12:11:51 +0000 (GMT)

>      I've just installed wu-ftpd on SunOs 4.1.1 and all appears OK, except 
>      as the subject states - ls works and dir doesn't, at least not for an 
>      anonymous user (its ok for a real user). This is true for both the 
>      standard ls and GNU ls.
>      
>      My guess it has something to do with shared libraries but copying the 
>      whole of /lib into ~ftp/lib didn't fix the problem.
>      
Make sure you have ~ftp/dev/zero

# mknod ~ftp/dev/zero c 3 12

I'm not sure why this is a problem for ls -l, in fact I can't think of
any good reason for ls to read any file other than the directory,
but it needs it.

   Seth D. Osher     SE/I Department Computer Analysis
   Internet: [email-masked]
   Tel. (703) 883-8573   Fax. (703) 883-8788
   PRC Inc., Mail Stop TM 431, 1505 PRC Drive, McLean, VA 22102
//////////////////////////////////////////////////////////////////////
///////      //      ///     ////////////////////////////////////////
//////   /   /   /   /   /   ////   // // ///  /////////////////////
/////   /   /   /   /   ///////// ///  / // // ////////////////////
////   /   /   /   /   ///////// /// /  // ///////////////////////
///   /////   //   /      ////   // // ///   // /////////////////
////////////////////////////////////////////////////////////////

---

From: [email-masked] (Tim Morley)
Date: Mon, 03 Oct 1994 14:24 -0300 (BST)

> any good reason for ls to read any file other than the directory,

Well ls is a seperate program, and as part of the program startup
sequence, /dev/zero is used. If I rememebr rightly mmaping /dev/zero
is a quick way to get a large chunk of memeory filled with zeros, and
it then uses that to load the shared libs into. So basically you need
/dev/zero to run _ANY_ program, and ~ftp/dev/zero for wuftpd to run
any prgram.

Tim M

---

From: Howard Chu <[email-masked]>
Date: Mon, 03 Oct 1994 11:34:29 -0700

ls isn't reading it, but the dynamic loader requires /dev/zero to be present
in order to obtain fresh pages of virtual memory for loading.

Howard Chu, Sr. Systems Engineer               Lloyd Internetworking
[email-masked]                               3031 Alhambra Drive
(916) 676-1147 - voice                         Suite 102
(916) 676-3442 - fax                           Cameron Park, CA  95682