Subject: CWDIR Determination

From: Thomas Neshite <[email-masked]>
Date: Thu, 17 Jun 1999 12:55:38 -0400 (EDT)

Good day everyone!
 
 How does wuftp determine cwdir?
 
 I have a real user (uid=username, gid=users) whose home directory is
 /usrA/username. When he logs in telnet or ftp, he is placed there.
 
 I have a directory elsewhere where he needs to place files:
 /home/data/development.
 
 /home is owned by root:data (i.e., owner:group) with perms 755.
 /home/data is owned by me:data with perms 751.
 /home/data/development is owned by username:data with perms 751.
 
 When he telnets in, he cd's to /home/data/development . When he
 does a pwd it returns the full path.
 He ftps in and then cd's to /home/data/development. If he does a
 pwd, it returns "." If he tries to uplaid -ooops! freudian slip!-
 upload a file there he gets:
 "553 Could not determine cwdir: Permission denied."
 
 He is not chrooted (in /etc/passwd), he is not guestgrouped (in
 ftpaccess).
 
 What gives? How does wuftp determine cwdir? Why can he not ftp?
 BTW, he has no problem in his home directory /usrA/username.

  Much admiration,
 
 tjn

---

From: Gregory A Lundberg <[email-masked]>
Date: Thu, 17 Jun 1999 13:15:23 -0400 (EDT)

> How does wuftp determine cwdir?

That depends on the version and compile options.  Most often the daemon
uses the cwd() function.  If MAPPING_CHDIR is used, it uses an internal
version of cwd() which remembers symlinks, etc., like a command shell.

> /home/data is owned by me:data with perms 751. /home/data/development
> is owned by username:data with perms 751.
> 
> When he telnets in, he cd's to /home/data/development . When he does a
> pwd it returns the full path. He ftps in and then cd's to
> /home/data/development. If he does a pwd, it returns "." If he tries
> to uplaid -ooops! freudian slip!- upload a file there he gets:

In 2.5.0, this come from an upload (in src/extensions.c: upl_check()
function).  It means the fb_realpath() function errored out trying to
determine the real pathname for "." .. the cwd.  Possible errors include
the inability to read the parent directories.  This should have all been
fixed in 2.5.0 even for NFS-mounted areas.

> What gives? How does wuftp determine cwdir? Why can he not ftp? BTW,
> he has no problem in his home directory /usrA/username.

If you're not running 2.5.0; upgrade.  If you still have problems, read
the FAQ, the upload.configuration.HOWTO and the 2.5.0 ftpaccess manpage.

The location of the latest version of wu-ftpd can be found in the 
directory
 
      ftp://ftp.wu-ftpd.org/pub/wu-ftpd/
 
wu-ftpd Resource Center:  http://www.landfield.com/wu-ftpd/
wu-ftpd FAQ:              http://www.cetis.hvu.nl/~koos/wu-ftpd-faq.html
wu-ftpd list archive:     http://www.landfield.com/wu-ftpd/mail-archive/

-- 

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