Subject: Longstanding upload problem

From: [email-masked] (Bob Hardy)
Date: Wed, 14 May 1997 12:01:18 -0700

Howdy, all!

I posted about this some time ago, but still have not found a
solution.  Let's start fresh, and see if anyone has any ideas that
haven't been tried yet.

The host is running SunOS 4.1.3.  The ftpd is "Version
wu-2.4.2-academ[BETA-13]".  This system was working fine until early
April sometime, when it stopped allowing anonymous uploads to
/incoming.  As far as I've been able to determine, nothing changed
regarding the filesystem at that time.

Here's the behavior that I see.  I login as anonymous, and cd to
/incoming.  I give a put command for a file (doesn't seem to matter
what kind of file), and I get:

   200 PORT command successful.
   550 fchown: Not owner.

The file is created, but it is zero bytes long.  It *does* have the
ownerships and mode specified in ftpaccess for /incoming: I can change
them in the file, send a HUP to inetd and repeat the exercise, and
they do reflect my changes.

I've tried changing modes on various directories including /incoming,
re-reading the FAQ, man pages and other documentation, and even tried
using 'trace' to follow the file operation.  Here's the result -
dorothy.jpg is the file I'm attempting to upload:

   read (0, "STOR dorothy.jpg\r\n", 4096) = 18
   setitimer (0, 0xeffff988, 0xeffff978) = 0
   gettimeofday (0xeffff0e8, 0) = 0
   stat ("dorothy.jpg", 0xeffff9b8) = -1 ENOENT (No such file or directory)
   stat ("./", 0xefffcf60) = 0
   stat ("/incoming", 0xefffcf20) = 0
   umask (0) = 02
   open ("dorothy.jpg", 07002, 0660) = 8
   umask (02) = 0
   getuid () = 0
   setreuid (-1, 0) = 0
   fchown (8, 31982, 30030) = -1 EPERM (Not owner)
   setreuid (-1, 31982) = 0
   write (1, "550 fchown: Not owner.\r\n", 24) = 24

This would be confounding enough, were it not for the fact that all of
this used to work fine.  This server has been functioning nicely for
years without major changes, but somehow it all went wrong, and has
stayed wrong for about 6 weeks now.

"Real" users can upload to their respective areas fine.  As myself, I
can even upload to /incoming without a glitch.  It would seem that the
problem lies with the ftp user, or the guest group, or some
combination, but I've yet to find the solution... and don't recall
making any changes just before the problem appeared.

Has anyone seen this before?  I'll try to provide any additional
information that I've forgotten here, just ask.

                                -- Bob

              Bob Hardy, System Administrator/Webmaster
             HAL Computer Systems Inc., A Fujitsu Company
                1315 Dell Avenue, Campbell, CA  95008
  Email: [email-masked],  Voice: (408) 341-5083,  FAX: (408) 341-5401
            WWW Home page: http://web.hal.com/users/bobh/