anonymous ftp problems /dev/zero: open failed.

anonymous ftp problems /dev/zero: open failed.

Post by Andrew Luon » Wed, 19 Jun 2002 10:15:00



Hi,

I have a problem with my anonymous ftp server which is puzzling me.  I have
recently setup anonymous ftp on one of our servers running solaris 2.6 with
2 network cards.  I followed the instructions as per the man page.
Everything worked fine until a couple of weeks ago when "ls" failed to work
when using the anonymous ftp.  The error return is
ld.so.1: /bin/ls:  fatal: /dev/zero: open failed: No such device or address

I have checked the major and minor number for /dev/zero in the anonymous ftp
directory and it all matches up with the system /dev/zero.  I also check the
directory and file permission and everything is correct.  I even tried
recreated the anonymous ftp with the script I initial used (which works on
other boxes) but without any success. Normal ftp works fine.

Any ideas on what could be causing the problem is much appreciated.

Thanks,
Andrew.

 
 
 

anonymous ftp problems /dev/zero: open failed.

Post by Andrew Luon » Wed, 19 Jun 2002 12:48:39




> #   Hi,
> #
> #   I have a problem with my anonymous ftp server which is puzzling me.  I
have
> #   recently setup anonymous ftp on one of our servers running solaris 2.6
with
> #   2 network cards.  I followed the instructions as per the man page.
> #   Everything worked fine until a couple of weeks ago when "ls" failed to
work
> #   when using the anonymous ftp.  The error return is
> #   ld.so.1: /bin/ls:  fatal: /dev/zero: open failed: No such device or
address
> #
> #   I have checked the major and minor number for /dev/zero in the
anonymous ftp
> #   directory and it all matches up with the system /dev/zero.  I also
check the
> #   directory and file permission and everything is correct.  I even tried
> #   recreated the anonymous ftp with the script I initial used (which
works on
> #   other boxes) but without any success. Normal ftp works fine.
> #
> #   Any ideas on what could be causing the problem is much appreciated.

> Put truss in the chroot area.

> boing:root 59> ldd /bin/truss
>         libc.so.1 =>     /usr/lib/libc.so.1
>         libdl.so.1 =>    /usr/lib/libdl.so.1
>         /usr/platform/SUNW,Ultra-1/lib/libc_psr.so.1

> Use the chroot command to run truss -aef ls

> See what there is to see.

> Can you cat (not under chroot) the ~ftp/dev/zero?

When I chroot and run truss I get the following error
ld.so1: /usr/bin/truss: fatal: /dev/zero: open failed: No such device or
address
Killed

When I try to cat ~ftp/dev/zero  I get
cat: cannot open zero

when I cat /dev/zero, no problems both are using the same major and minor
numbers.

 
 
 

anonymous ftp problems /dev/zero: open failed.

Post by Andrew Luon » Wed, 19 Jun 2002 14:15:51








> > > #   Hi,
> > > #
> > > #   I have a problem with my anonymous ftp server which is puzzling
me.  I
> > have
> > > #   recently setup anonymous ftp on one of our servers running solaris
2.6
> > with
> > > #   2 network cards.  I followed the instructions as per the man page.
> > > #   Everything worked fine until a couple of weeks ago when "ls"
failed to
> > work
> > > #   when using the anonymous ftp.  The error return is
> > > #   ld.so.1: /bin/ls:  fatal: /dev/zero: open failed: No such device
or
> > address
> > > #
> > > #   I have checked the major and minor number for /dev/zero in the
> > anonymous ftp
> > > #   directory and it all matches up with the system /dev/zero.  I also
> > check the
> > > #   directory and file permission and everything is correct.  I even
tried
> > > #   recreated the anonymous ftp with the script I initial used (which
> > works on
> > > #   other boxes) but without any success. Normal ftp works fine.
> > > #
> > > #   Any ideas on what could be causing the problem is much
appreciated.

> > > Put truss in the chroot area.

> > > boing:root 59> ldd /bin/truss
> > >         libc.so.1 =>     /usr/lib/libc.so.1
> > >         libdl.so.1 =>    /usr/lib/libdl.so.1
> > >         /usr/platform/SUNW,Ultra-1/lib/libc_psr.so.1

> > > Use the chroot command to run truss -aef ls

> > > See what there is to see.

> > > Can you cat (not under chroot) the ~ftp/dev/zero?

> > When I chroot and run truss I get the following error
> > ld.so1: /usr/bin/truss: fatal: /dev/zero: open failed: No such device or
> > address
> > Killed

> > When I try to cat ~ftp/dev/zero  I get
> > cat: cannot open zero

> > when I cat /dev/zero, no problems both are using the same major and
minor
> > numbers.

> There must be a file in the ftp directory hierarchy.  E.g. if your ftp
> root directory is /apps/ftp, then there must be a device file
> /apps/ftp/dev/zero which is identical to /dev/zero but with more
> restricted permissions and ownership.  This is discussed in the in.ftpd
> man page.  It's only used by the anonymous ftp user as they are
> restricted to the /apps/ftp directory tree.

> --
> DeeDee, don't press that button!  DeeDee!  NO!  Dee...

I don't think there is any problems with the anonymous ftp setup.
Everything has been setup as instructed in the ftpd man page.
So thing else is causing the problem, after some investigation I think it
could be filesystem related.
I notice that there is a problem with creating ftp directory on a specific
file system.  The ftp directory maps to seperate filesystem, /dev/md/dsk/d4,
different from the filesystem used by /.

The major and minor number of /dev/zero is 13 and 12.
crw-rw-rw-    1    root    sys    13, 12, May 8 2001  /dev/zero
When I try to create another character file with the same numbers on that
filesystem, using "mknod ~ftp/dev/zero c 13 12" I get the above error.
Hower when I create the file zero in another filesystem everything works
fine.
The file and directory permission are the same for both cases.

 
 
 

anonymous ftp problems /dev/zero: open failed.

Post by Thomas Tornblo » Wed, 19 Jun 2002 17:18:55



> I don't think there is any problems with the anonymous ftp setup.
> Everything has been setup as instructed in the ftpd man page.
> So thing else is causing the problem, after some investigation I think it
> could be filesystem related.
> I notice that there is a problem with creating ftp directory on a specific
> file system.  The ftp directory maps to seperate filesystem, /dev/md/dsk/d4,
> different from the filesystem used by /.

> The major and minor number of /dev/zero is 13 and 12.
> crw-rw-rw-    1    root    sys    13, 12, May 8 2001  /dev/zero
> When I try to create another character file with the same numbers on that
> filesystem, using "mknod ~ftp/dev/zero c 13 12" I get the above error.
> Hower when I create the file zero in another filesystem everything works
> fine.
> The file and directory permission are the same for both cases.

Make sure that ~ftp/dev/zero is not a symlink, or at least that it
points to something in the chrooted environment. The normal
"/dev/zero" is a symlink that points into /devices/pseudo, but that
directory is normally not present in the ftp area.

What does "ls -l ~ftp/dev" give?

Thomas

 
 
 

anonymous ftp problems /dev/zero: open failed.

Post by Casper H.S. Di » Wed, 19 Jun 2002 17:52:48



>when I cat /dev/zero, no problems both are using the same major and minor
>numbers.

Was the ~ftp/dev fielsystem mounted "nosuid"?

Casper
--
Expressed in this posting are my opinions.  They are in no way related
to opinions held by my employer, Sun Microsystems.
Statements on Sun products included here are not gospel and may
be fiction rather than truth.

 
 
 

anonymous ftp problems /dev/zero: open failed.

Post by Andrew Luon » Thu, 20 Jun 2002 09:09:39


Problem solved,

Someone changed the ~ftp/dev filesystem to be mounted with "nosuid"

Thanks,



> >when I cat /dev/zero, no problems both are using the same major and minor
> >numbers.

> Was the ~ftp/dev fielsystem mounted "nosuid"?

> Casper
> --
> Expressed in this posting are my opinions.  They are in no way related
> to opinions held by my employer, Sun Microsystems.
> Statements on Sun products included here are not gospel and may
> be fiction rather than truth.

 
 
 

1. dl_boot: open /dev/zero failed

I'm not sure what I've done, but I believe that somehow
my /dev files were changed such that only root can login.

If any user attempts to get into my system they get the error:

dl_boot: open /dev/zero failed!

Does anyone have a solution? My first attempt will be to reinstall
the base linux distribution with the hopes that whatever was changed
or corrupted will be fixed..but I'd like to know what caused this.

Thanks for any suggestions or help.

Dan DeSlover

2. PPP question

3. dl_boot: open /dev/zero failed !

4. Disk mirroring question

5. dl_boot: open /dev/zero failed!

6. Today's KLEZ Alert

7. Help: dl_boot: open /dev/zero failed! on login

8. HOWTO remove firewall?

9. RedHat 4.2 install problem: dl_boot: mmap of /dev/zero failed

10. wu-ftpd 2.4, /dev/zero,/dev/tcp problem

11. /dev/zero open versus stat system call sequence?

12. Can't open /dev/zero?

13. dl_boot: can not open /dev/zero ????