Subject: Getting wu-ftp to look for /etc/nologin

From: Timothy J Luoma <luomat+Lists/[email-masked]>
Date: Sat, 14 Feb 98 20:47:10 -0500

telnet/rlogin/ssh all look for /etc/nologin ... is there a way to make  
wu-ftp do the same ?

This is for a small private ftp site and I want to easily limit all access  
at given times....

Thanks

TjL

-- 
"It takes real courage to be a Macintosh user; it takes real
conviction; not unlike being a Christian in the days of the Romans." 
 - Guy Kawasaki, Chief Evangelist for Apple Computer - from "Hotseat"
   interview with John McChesney (3/28/97) [ my birthday! ]

---

From: Dave Wreski <[email-masked]>
Date: Sat, 14 Feb 1998 20:59:32 -0500 (EST)

> telnet/rlogin/ssh all look for /etc/nologin ... is there a way to make  

You can use ftpshut for that, which creates /etc/shutmsg containing when
the ftp server went down.

You can easily modify the code to use /etc/nologin instead, but I'm not
sure if telnet/rlogin/ssh expect it to be zero-length, like I suspect..

Remove /etc/shutmsg to bring the server back online.

Dave

---

From: Timothy J Luoma <luomat+Lists/[email-masked]>
Date: Sat, 14 Feb 98 21:13:02 -0500

Author:        Dave Wreski <[email-masked]>
	Original-Date: Sat, 14 Feb 1998 20:59:32 -0500 (EST)
	Message-ID:    <[email-masked]>

> You can easily modify the code to use /etc/nologin instead

I changed the 'ftpaccess' file to:

shutdown /etc/nologin

but it does not work if just anything is there, it has to conform to the  
wu-ftp format:

% ftpshut now "FTP Server is off"
% cat /etc/nologin
1998 01 14 21 06 0010 0005
FTP Server is off

> but I'm not sure if telnet/rlogin/ssh expect it to be zero-length,
> like I suspect..

No, there can be a message in /etc/nologin.... and it can be the format above.... 

I'm not entirely clear what the first line is but I guess that can suffice.

TjL

---

From: Dave Wreski <[email-masked]>
Date: Sat, 14 Feb 1998 21:30:15 -0500 (EST)

> but it does not work if just anything is there, it has to conform to the  

Sorry, thought I made that clear in the first message.

> No, there can be a message in /etc/nologin.... and it can be the format

I guess the point I was making is will telnet/rlogin/ssh print that
message to the screen if it exists?  Knowing that wu-ftpd will write data
to that file led me to believe you don't want to mix the two files.

Why not just create a shell script called 'ftpup' that simply removes
/etc/ftpshut?  That way you don't have to remember its filename, and you
can also have ftp disabled without allowing telnet access at the same
time.

> I'm not entirely clear what the first line is but I guess that can suffice.

Its a date stamp to determine when/how long the server has been down..

Dave

---

From: Timothy J Luoma <luomat+Lists/[email-masked]>
Date: Sat, 14 Feb 98 22:07:57 -0500

Author:        Dave Wreski <[email-masked]>
	Original-Date: Sat, 14 Feb 1998 21:30:15 -0500 (EST)
	Message-ID:    <[email-masked]>

> to that file led me to believe you don't want to mix the two files.

Well, I want to tell telnet/rlogin/ssh users the same message as ftp users,  
so it works rather well.

The datestamp is probably innocuous enough to include

Thanks!

TjL

---

From: Miles Fidelman <[email-masked]>
Date: Sat, 14 Feb 1998 22:49:30 -0500 (EST)

I have a server (Sun, Solaris 2.5.?) running wu-ftpd, and I have an Apache
web server where I've set up multiple directories under the server root -
each for a separate user.

Each user has an ftponly account on the machine, and I'm trying to get
things set up so that they ftp directly into their subdirectory.

I've tried setting up things as follows:

in /etc/passwd, home directories are specified something like:
/../sites/sitename/htdocs/./username

in ftpaccess, I've got a line stating:
guestgroup ftponly foo

where "foo" is a group that contains all members on the server

for several other users, who are in group ftponly, everything works fine

for users in group foo, I can log in, and a pwd gives: "/username" but an
ls gives: Can't create data socket (0.0.0.0,20): Bad file number.

if I remove "foo" from the guestgroup statement, then everything works,
but the pwd gives a fully specified pathname

any ideas/help would be much apprecited

Thanks very much,

Miles Fidelman
[email-masked]

---

From: Dave Wreski <[email-masked]>
Date: Sat, 14 Feb 1998 23:05:16 -0500 (EST)

> ls gives: Can't create data socket (0.0.0.0,20): Bad file number.

You are most likely missing some of the necessary libraries.  Read the
in.ftpd man page from solaris to find the necessary ones.  I have:

ld.so             libintl.so.1      libw.so.1         nss_nis.so.1
ld.so.1           libmp.so.1        nss_compat.so.1   nss_nisplus.so.1
libc.so.1         libnsl.so.1       nss_dns.so.1      straddr.so
libdl.so.1        libsocket.so.1    nss_files.so.1

The ones not ending in .1 are not necessary, but can otherwise be symlinks
to their respective ones ending in .1

Dave

---

From: Miles Fidelman <[email-masked]>
Date: Sat, 14 Feb 1998 23:21:40 -0500 (EST)

Thanks Dave, but sorry - not even close - all the libraries are there

any other ideas?

---

From: Dave Wreski <[email-masked]>
Date: Sat, 14 Feb 1998 23:33:18 -0500 (EST)

> Thanks Dave, but sorry - not even close - all the libraries are there

Perhaps there is a permission problem with that user trying to get to
~ftp/usr/lib?

It should be from ~ftp:

d--x--x--x   9 root     root          512 Feb 14 15:24 .
d--x--x--x   4 root     root          512 Jan 17 02:39 usr
dr-xr-xr-x   2 root     root          512 Jan 17 02:39 usr/lib

Also, have you made sure you've installed all the other files that are
necessary, like zoneinfo, and the files in ~ftp/dev?  ~ftp/dev should look
like:

d--x--x--x   2 root     root          512 Jan  8 14:48 .
d--x--x--x   9 root     root          512 Feb 14 15:24 ..
crw-r--r--   1 root     other     13,   2 Jan  7 01:27 null
crw-rw-r--   1 root     other     11,  42 Jan  7 01:27 tcp
crw-rw-r--   1 root     other    105,   1 Jan  7 01:27 ticotsord
crw-rw-r--   1 root     other     11,  41 Jan  7 01:27 udp
crw-rw-r--   1 root     other     13,  12 Jan  7 01:27 zero

Dave

---

From: Miles Fidelman <[email-masked]>
Date: Sun, 15 Feb 1998 00:35:46 -0500 (EST)

turns out that it has to do with having to replicate ../etc ../usr and the
like at the same level as the user directories people are accessing

thanks for all the help!

Miles

---

From: Bob Luckin <[email-masked]>
Date: Mon, 16 Feb 98 15:42:13 CST

> crw-rw-r--   1 root     other     13,  12 Jan  7 01:27 zero

Not quite !

This setup won't allow passive mode connections on a Solaris box - which will
stop some browsers from working with the system.

~ftp/dev/tcp needs to be world-writeable to allow pasive mode.
See the FAQ question 9.13 for more details...
(http://www.cetis.hvu.nl/~koos/wu-ftpd-faq.html#QA56)

On my system, tcp, ticotsord, udp and zero are all set to 666, because
that's how they are set in the (non-ftp root) /dev, and I simply copied
the settings.  I'm not sure if anything other than tcp need to be
world-writeable, though.

Cheers, Bob
-- 
Bob Luckin      [email-masked]      "Dick's attempt FTP met task CID"
                                 [http://www.dhc.net/~luckin/palindromes.html]