Weird FTPd behaviour

=?ISO-8859-1?Q?Jakob_=D8stergaard?= (jake@oestergaard.ostenfeld.dtu.dk)
Sun, 17 Nov 1996 00:56:45 +0100 (MET)


Hi folks.

This question may not be exactly net-related, but it may very well be
quite related to the tools related to the net, so here goes:

I'm administrating a Linux mail server for about 130 people at my college.
Currently running RedHat Linux 3.0.4 (Rembrandt release), kernel 2.0.21,
and ext2fs.

I did a _tiny_ change in the adduser script, to make the script create a
~/public_html directory whenever I add a new user. I learned that it could
also be done by creating that directory in the /etc/skel directory, which
also solves my problem, but I can still not understand what is going wrong
when i do the little `fix' in the script...

The original adduser script reads:

mkdir $DHOME/$LOGIN
chmod 2775 $DHOME/$LOGIN
cp -a $SKEL/.??* $SKEL/* $DHOME/$LOGIN >/dev/null 2>/dev/null
chown -R $NUID.$NGID $DHOME/$LOGIN

And my modified script goes:

mkdir $DHOME/$LOGIN
chmod 2775 $DHOME/$LOGIN
cp -a $SKEL/.??* $SKEL/* $DHOME/$LOGIN >/dev/null 2>/dev/null
mkdir $DHOME/$LOGIN/public_html
chown -R $NUID.$NGID $DHOME/$LOGIN

................

When I use the modified copy, users can connect as usual using rlogin and
telnet, but when they try FTP, they get a
530 Login incorrect.
Login failed.

Using the original script, everything - including FTP - works without
problems.

...............

And as mentioned above, if I create the public_html directory in the
/etc/skel directory, everything works fine with the original script.
(sub-directories to /etc/skel are copied as well)

...............

If I create two users, say: test1 and test2, the first one using the
original script and the latter using my modified script, the directories
look _EXACTLY_ the same (user/group/other-rights and ownerships). The
/etc/passwd and /etc/group file entries also look similar.

Using FTP as test1 works fine. Using FTP as test2 gets me the login failed
message.

.............

I have no idea what so ever about what could possibly be wrong, and I
spent about half a day messing with it.

I solved my problem unsing the /etc/skel directory, but maybe there is a
bug in ftpd or the ext2fs filesystem or something, I dunno.

Anyway: You people out there now know that someone has had this problem.
This may ease tracing problems for someone some day ;)

.....................
jake@ostenfeld.dtu.dk
..........