Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

FTP

Status
Not open for further replies.

linuxnewb00

Technical User
Joined
Sep 21, 2003
Messages
8
Location
US
How can I start/stop FTP on a Linux server?
 
Which FTP server and which release/version of Linux?

IBM Certified Confused - MQSeries
IBM Certified Flabbergasted - AIX 5 pSeries System Administration
MS Certified Windblows Rebooter
 
Something like this if you want a programmatic way
of dealing with it.

Code:
#!/bin/sh
ftpid=`lsof -i -n | grep ftp | awk ' {print $2}'`
if [ ! -z "$ftpid" ] ; then   
   kill -kill $ftpid 
   echo "Killed process: $ftpid"
   exit
fi
echo "FTPD is not running"

Otherwise just find the process id and send
a kill to it. Or be civilized and RTFM for your
ftpd and see if there is a way to shut it down
more gracefully. Many ftpd's run from(x)inetd,
so there may not be.
 
Marsd is right on the money. Find the deamon it was/will_be started from and see if there's any options to it. Classics are around the style of :
$deamon {start|stop|reload|halt}

If you are truly lost, find which script is invoked in your RC directories and start from there. LOCATE helps... i suggest installing it since i abuse it everyday to find files that i know but simply don't remember where they are.

 
If you are using wu-ftpd and the aim is to allow/prevent ftp connections, then it can be done from the /etc/ftpaccess config file. Typically the following is in the file, uncomment the 2nd line if you want to disallow FTP connections for a period:

# If /etc/shutmsg exists, don't allow logins
# shutdown /etc/shutmsg

IBM Certified Confused - MQSeries
IBM Certified Flabbergasted - AIX 5 pSeries System Administration
MS Certified Windblows Rebooter
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top