FTP Question

Ceri Davies ceri at submonkey.net
Tue Oct 11 13:32:29 BST 2005


--H2KpQ9C2DUtn/ko0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, Oct 11, 2005 at 01:52:18PM +0200, Khaled Hussein wrote:
> Hi, I noticed at last day that when I FTP any site I got this welcome
> message=20
>=20
> 230 User khaledh logged in, access restrictions apply.
>=20
> My question is the last part "access restrictions apply" why this stateme=
nt
> appeared and how I can remove it=20

That appears if the user has access restrictions applied via any of
/etc/ftpusers, /etc/ftpchroot, /etc/login.conf or /etc/ftpd.conf.  Start
with the manpage for ftpchroot and go from there.

If you want to start looking, the relevant code is:

 src/libexec/ftpd/ftpd.c:
   1580         if (guest) {
   1581                 if (ident !=3D NULL)
   1582                         free(ident);
   1583                 ident =3D strdup(passwd);
   1584                 if (ident =3D=3D NULL)=20
   1585                         fatalerror("Ran out of memory.");
   1586                    =20
   1587                 reply(230, "Guest login ok, access restrictions app=
ly.");
   1588 #ifdef SETPROCTITLE
   1589 #ifdef VIRTUAL_HOSTING =20
   1590                 if (thishost !=3D firsthost)
   1591                         snprintf(proctitle, sizeof(proctitle),
   1592                                  "%s: anonymous(%s)/%s", remotehost=
, hostname,
   1593                                  passwd);
   1594                 else   =20
   1595 #endif
   1596                         snprintf(proctitle, sizeof(proctitle),
   1597                                  "%s: anonymous/%s", remotehost, pa=
sswd);
   1598                 setproctitle("%s", proctitle);
   1599 #endif /* SETPROCTITLE */
   1600                 if (logging)
   1601                         syslog(LOG_INFO, "ANONYMOUS FTP LOGIN FROM =
%s, %s",
   1602                             remotehost, passwd);
   1603         } else {
   1604                 if (dochroot)
   1605                         reply(230, "User %s logged in, "
   1606                                    "access restrictions apply.", pw=
->pw_name);
   1607                 else
   1608                         reply(230, "User %s logged in.", pw->pw_nam=
e);


Ceri
--=20
Only two things are infinite, the universe and human stupidity, and I'm
not sure about the former.			  -- Einstein (attrib.)

--H2KpQ9C2DUtn/ko0
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (FreeBSD)

iD8DBQFDS7DdocfcwTS3JF8RAoMUAJ97XIhWpCeXiLUayafq2ZAzj1VEkwCfYiUU
Y3FwHnZmiDdACk74lpqhaAE=
=MSUJ
-----END PGP SIGNATURE-----

--H2KpQ9C2DUtn/ko0--




More information about the Ukfreebsd mailing list