Subject: Re: Guest acct Problems...

From: "Eduardo B. Fonseca" <[email-masked]>
Date: Tue, 6 Jan 98 10:48:17 -0300

Michael - 

Here comes EVERYTHING :)

<SNIP>

/etc/ftpaccess:

loginfails 2

class   local   real,guest,anonymous *.domain 200.250.12.0
class   remote  real,guest,anonymous *

limit   local   20  Any                 /etc/msgs/msg.toomany
limit   remote  100 SaSu|Any1800-0600   /etc/msgs/msg.toomany
limit   remote  60  Any                 /etc/msgs/msg.toomany

banner /etc/banner

readme  README*    login
readme  README*    cwd=*

message /welcome.msg            login
message .message                cwd=*

compress        yes             local remote
tar             yes             local remote
# allow use of private file for SITE GROUP and SITE GPASS?
private         no

# passwd-check  <none|trivial|rfc822>  [<enforce|warn>]
passwd-check    rfc822  warn

log commands real
log transfers anonymous,real inbound,outbound
shutdown /etc/shutmsg

# all the following default to "yes" for everybody
delete          no      anonymous         # delete permission?
overwrite       no      anonymous         # overwrite permission?
rename                  no              anonymous                       # 
renam$
chmod           no      anonymous               # chmod permission?
umask           no      anonymous               # umask permission?

# specify the upload directory information
upload  /var/ftp  *             no
upload  /var/ftp  /incoming     yes     root    daemon  0600 dirs
upload  /var/ftp  /bin          no
upload  /var/ftp  /etc          no

# directory aliases...  [note, the ":" is not required]
alias   inc:    /incoming

# cdpath
cdpath  /incoming
cdpath  /pub
cdpath  /

# path-filter...
path-filter  anonymous  /etc/pathmsg  ^[-A-Za-z0-9_\.]*$  ^\.  ^-
path-filter  guest      /etc/pathmsg  ^[-A-Za-z0-9_\.]*$  ^\.  ^-

# specify which group of users will be treated as "guests".
guestgroup users

email [email-masked]

<snip>

/etc/passwd: line 32
dudu:*:1005:1109:Dudu:/home/dudu/./:/etc/ftponly 

<snip>

/etc/shells

# List of acceptable shells for chpass(1).
# Ftpd will not allow users to connect who are not using
# one of these shells.

/bin/sh
/bin/csh
/usr/local/bin/bash
/etc/ftponly
/etc/ftpno

<snip>
ls -l /home/dudu

-rw-r--r--  1 dudu  users    466 Jan  4 23:56 .cshrc
-r--------  1 root  daemon     0 Jan  5 00:36 .forward
-rw-r--r--  1 dudu  users    619 Jan  4 23:56 .login
-rw-r--r--  1 dudu  users    290 Jan  4 23:56 .mailrc
-rw-r--r--  1 dudu  users   1203 Jan  4 23:56 .profile
-r--------  1 root  daemon   257 Jan  5 00:36 .rhosts
d--x--x--x  2 root  daemon   512 Jan  5 00:40 bin
d--x--x--x  2 root  daemon   512 Jan  5 00:40 etc
drwxr-xr-x  2 root  users    512 Jan  5 00:41 pub

NOTE: every file listed on the guest-HOWTO is installed 
(ls/passwd/group...)

<snip>

LOG OF THE FTP SESSION:

bash# ftp ftp.fnn.net

220 vanessa.fnn.net FTP server (Version wu-2.4.2-academ[BETA-16](1) Mon 
Jan 5 02
:29:31 EDT 1998) ready.
Name (ftp.fnn.net:root): dudu
331 Password required for dudu.
Password:
550 Can't set guest privileges.
Login failed.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp>

<snip>

that's it... I hope I didn't miss anything.

Cheers,

____________________________________................
Eduardo Brasao da Fonseca
Technical Director
.........................
The FutureNet Network
www.fnn.net
.........................
[email-masked]
[email-masked]
____________________________________................

---

From: Michael Brennen <[email-masked]>
Date: Tue, 6 Jan 1998 09:48:44 -0600 (CST)

> 550 Can't set guest privileges.

The code snippet from ftpd.c that sets this error is below.  I don't
see any immediately obvious problems in your data set, but the
chroot() is failing.  Not sure what to suggest, and I've got a full
plate today with client issues.  Hope you find it.

   -- Michael

      if (chroot(pw->pw_dir) < 0 || chdir(++sp) < 0) {
        reply(550, "Can't set guest privileges.");
        goto bad;
      }