Subject: upload denied after wu-ftpd upgrade - but config says permitted - confused

From: [email-masked]
Date: Tue, 4 May 1999 16:49:09 +1000 (EST)

Hi,

I'm new to this list.  I've already checked the list archive, the FAQ and 
all docs in the source.  Hopefully that means I've rtfm'd enough before 
asking :)

Having upgraded wu-ftpd to 2.4.2-vr16 on a Solaris 2.5.1 system, I've found 
that the following no longer work:
	* anonymous upload to pub/incoming 
	* display unwelcome.msg file at login
	* display .message file when changing directory

These are controlled by the ftpaccess file.  The obvious solution is 
"you don't have an ftpaccess file" --- but I do and it's in the right place.
My ftpaccess file hasn't changed and (if the FAQ, docs and web pages are to 
be believed) the format for the file hasn't changed either.  Just to be sure, 
I diff'd it with the example file in the docs directory - same format.

I've since upgraded to 2.4.2-vr17 and have the same problem.

With the vr17 upgrade, I started with a new ~ftp and followed all documented 
instructions, including those in the upload.configuration.HOWTO file.

The problem persists.

I've checked:

	* ftpaccess file exists and is where ftpd looks for it
-rw-r--r--    root     other       /opt/local/etc/ftpaccess

	* directives for displaying messages on login and cd are present
		message /unwelcome.msg          LOGIN
		message .message                CWD=*

	* format for these directives hasn't changed.  ie checked
		- README and INSTALL files
		- man pages in wu-ftpd-2.4.2-vr16/doc/ 
		- example files in wu-ftpd-2.4.2-vr16/doc/examples 
		- FAQ and all web sites listed in README file
		- list archive

	* message files required by display directives (above) exist 
	  in the expected location and are non-empty
-r--r--r--    root     sys         710 /export/home/ftp/unwelcome.msg
-r--r--r--    ftpadmin ftpadmin    398 /export/home/ftp/pub/incoming/.message

	* upload directive gives permission to write to /pub/incoming 
	  and the directory exists and has appropriate permissions
upload  /home/ftp  *             no
upload  /home/ftp  /pub/incoming yes ftpadmin ftpadmin 3773 nodirs

	* format for the upload directive hasn't changed.  checklist as above

	* /var/log/syslog logs everything from debug level up but doesn't list
	  any errors.

What the user sees: 

ftp> cd /pub/incoming
250 CWD command successful.
ftp> put filename
227 Entering Passive Mode (X,X,X,X,227,229)
553 filename: Permission denied. (Upload)
ftp> quit
221-You have transferred 0 bytes in 0 files.
221-Total traffic for this session was 548 bytes in 0 transfers.

(X,X,X,X replaces IP address of ftp server)

/var/log/syslog and /var/adm/messages aren't showing any errors.

Has anyone else seen this behaviour?  Any suggestions?

Thanks,

	Catherine.

---

From: Gregory A Lundberg <[email-masked]>
Date: Tue, 4 May 1999 08:56:23 -0400 (EDT)

> upload /home/ftp /pub/incoming yes ftpadmin ftpadmin 3773 nodirs

upload /home/ftp * no
upload /home/ftp /home/ftp/pub/incoming yes ftpadmin ftpadmin 3773 nodirs

-or--

upload relative /home/ftp * no
upload relative /home/ftp /pub/incoming yes ftpadmin ftpadmin 3773 nodirs

This should have been covered in upload.configuration.HOWTO

-- 

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

---

From: Bob Luckin <[email-masked]>
Date: Tue, 04 May 1999 14:24:47 CDT

> 	* display .message file when changing directory

What version have you upgraded from ?  The older versions of wu-ftpd used
the ftpaccess file by default, but this changed a while back, so that now
you have to specify the "-a" option on the command line in inetd.conf which
starts it.  If you don't have this option it might explain some of the
problems you're seeing.

For the passive mode problem, check the permissions on the files under the
~ftp/dev directory.  Under Solaris, tcp (and possibly others) need to be
open to the world for writing in order for passive mode to work correctly.
Check the settings on the copies of these files in real /dev directory and
make sure your copies under the FTP root match.  Here are mine (although
your values may vary depending on which version of the OS you are using) :-

% ls -l ~ftp/dev
total 0
crw-rw-rw-   1 root     other     11, 42 Mar 26  1998 tcp
crw-rw-rw-   1 root     other    105,  1 Mar 26  1998 ticotsord
crw-rw-rw-   1 root     other     11, 41 Mar 26  1998 udp
crw-rw-rw-   1 root     other     13, 12 Mar 26  1998 zero

I hope this helps; if it doesn't, try checking out Darci Chapman's Solaris 2.5
How-To file at
   http://www.wildheart.org/wu-ftpd/
which is also obtainable via Kent landfield's WU-FTPD Resource Center at
   http://www.landfield.com/wu-ftpd/

Cheers, Bob
-- 
Bob Luckin   [email-masked]   "On data, coder, adapt - FTP Ada, redo C a tad, no ?"
                           [http://www.dhc.net/~luckin/palindromes.html]

---

From: Steve Saul <[email-masked]>
Date: Wed, 05 May 1999 12:53:48 -0500

> This should have been covered in upload.configuration.HOWTO

I checked this after I had some trouble configuring uploads (solved
inadvertently by one of your recent posts). You're right, it's all there
but it may help to modify:

Notice the target directory for the uploads is relative to the view the
user will have during the FTP session.

to:

Notice the target directory for the uploads is relative to the view the
user will have during the FTP session (i.e. relative to the chroot).

I think the clarification is needed because my implementation uses path
names that overlap slightly in the upload clauses.

(e.g.   upload /home/ftp/joeblow /joeblow/incoming yes......).

It was also not obvious to me that I needed the (relative) home directly
defined correctly in the ~ftp/etc/passwd file for this to work.

I've also just determined experimentally that, unlike noretrieve,
allow-retrieve does not allow wildcards in the filename. If this is
true, it's not made clear in the man entry.

Cheers,

Steve

---

From: Gregory A Lundberg <[email-masked]>
Date: Wed, 5 May 1999 15:03:21 -0400 (EDT)

thanks for the feedback.  I'll see if I can make the wording more clear.

On Wed, 5 May 1999, Steve Saul wrote:

> Date: Wed, 05 May 1999 12:53:48 -0500
> From: Steve Saul <[email-masked]>
> To: [email-masked]
> Cc: [email-masked]
> Subject: Re: upload denied after wu-ftpd upgrade - but config sayspermitted -
     confused

--

---

From: Gregory A Lundberg <[email-masked]>
Date: Wed, 5 May 1999 15:10:27 -0400 (EDT)

> > true, it's not made clear in the man entry.

Uh .. that's a bug.  I'll take a look at it RSN.

--

---

From: Gregory A Lundberg <[email-masked]>
Date: Tue, 18 May 1999 12:42:49 -0400 (EDT)

> Uh .. that's a bug.  I'll take a look at it RSN.

Finally got arround to looking at the allow-retrieve function.  It does
allow wildcards (filename globbing) the same as noretrieve.

The problem may be the 'regular expression' term appearing in the manpage
for noretrieve.  There was a beta-18-VR version which allowed regular
expressions.  It turned out to be a very bad idea.  I'd though the
reference was removed.  I'll put a patch in to update the documentation.

--