[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]

Re: [LI] FTP restrictions...



Hi,

Sorry for the delay in replying.

Sudhakar Chandrasekharan forced the electrons to say:
> > ftponly:<passwd>:uid:gid:OnlyFTP:/home/ftponly/.//:/bin/false
> What does the extra '/' do?

The extra / makes the ftpd do a chdir("/") immediately after the chroot()
call. As a matter of fact, it is not really necessary.

> > Since ftpd runs from inetd, the whole setup is complete. Test the new
> > ftponly login that you have created and release it to the user.
> 
> Both of us forgot to mention one thing.  The inetd daemon needs to be
> restarted.  Here is how you do it:

Is that really necessary? We haven't changed the configuration of inetd. And
ftpd is started every time by inetd.

> 
> ps aux |  grep inetd
> 
> Note down the process id and
> 
> kill -HUP process_id_of_inetd

killall -HUP inetd is probably better.

Plus a note about this query. I don't remember who the original author is.

> Yup...got it,  In flavors other than Debian, how do U restart the 
> inetd daemon ?  U have killed the inetd process, what does one do next
> ??
> 
> Is this not a serious issue ?  

We have not killed inetd. The kill command is actually a misnomer. It just
delivers the specified signal to the specified process. It is named so because
its most common use is to send the SIGKILL signal. (Or more specifically, the
system call it uses is kill(), which is most often used to....).

There are many other signals, and unix allows these signals to be trapped, and
appropriate action to be taken. Almost all daemon processes trap the hangup
signal (SIGHUP) and re-read their configuration files, and the SIGTERM signal
to gracefully end their operations.

See kill(2).

Binand


-- 
#include <stdio.h>                                   | Binand Raj S.
char *p = "#include <stdio.h>%cchar *p = %c%s%c;     | This is a self-
int main(){printf(p,10,34,p,34,10);return 0;}%c";    | printing program.
int main(){printf(p,10,34,p,34,10);return 0;}        | Try it!!
--------------------------------------------------------------------
The Linux India Mailing List Archives are now available.  Please search
the archive at http://lists.linux-india.org/ before posting your question
to avoid repetition and save bandwidth.