⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ftpd.8

📁 wu-ftpd类unix下的ftp服务器,可用于嵌入式系统
💻 8
字号:
.\".\" Copyright (c) 1999,2000 WU-FTPD Development Group. .\" All rights reserved..\" .\" Portions Copyright (c) 1980, 1985, 1988, 1989, 1990, 1991, 1993, 1994 .\" The Regents of the University of California.  Portions Copyright (c) .\" 1993, 1994 Washington University in Saint Louis.  Portions Copyright .\" (c) 1996, 1998 Berkeley Software Design, Inc.  Portions Copyright (c) .\" 1998 Sendmail, Inc.  Portions Copyright (c) 1983, 1995, 1996, 1997 Eric .\" P. Allman.  Portions Copyright (c) 1989 Massachusetts Institute of .\" Technology.  Portions Copyright (c) 1997 Stan Barber.  Portions .\" Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997 Free Software .\" Foundation, Inc.  Portions Copyright (c) 1997 Kent Landfield. .\".\" Use and distribution of this software and its source code are governed .\" by the terms and conditions of the WU-FTPD Software License ("LICENSE"). .\".\"	$Id: ftpd.8,v 1.8 2000/07/01 17:49:09 wuftpd Exp $.\".TH FTPD 8 "Jan 10, 1997".UC 5.SH NAMEftpd \- Internet File Transfer Protocol server.SH SYNOPSIS.B ftpd[.B \-d] [.B \-v] [.B \-l] [.BR \-ttimeout] [.BR \-Tmaxtimeout] [.BR \-a] [.BR \-A] [.BR \-L] [.BR \-i] [.BR \-I] [.BR \-o] [.BR \-pctrlport] [.BR \-Pdataport] [.BR \-q] [.BR \-Q] [.BR \-rrootdir] [.BR \-s] [.BR \-S] [.BR \-uumask] [.BR \-V] [.BR \-w] [.BR \-W] [.BR \-X].SH DESCRIPTION.I Ftpdis the Internet File Transfer Protocolserver process.  The server uses the TCP protocoland listens at the port specified in the ``ftp''service specification; see.IR services (5)..PPThe.B \-Voption causes the program to display copyright and version information, thenterminate..PPIf the .B \-dor .B \-voption is specified,debugging information is written to the syslog..PPIf the.B \-loption is specified,each ftp session is logged in the syslog..PPThe ftp serverwill timeout an inactive session after 15 minutes.If the.B \-toption is specified,the inactivity timeout period will be set to.I timeoutseconds.A client may also request a different timeout period;the maximum period allowed may be set to.I timeoutseconds with the.B \-Toption.The default limit is 2 hours..PPIf the.B \-aoption is specified, the use of the.IR ftpaccess (5)configuration file is enabled..PPIf the.B \-Aoption is specified, use of the.IR ftpaccess (5)configuration file is disabled. This is the default..PPIf the.B \-Loption is specified, commands sent to the.IR ftpd (8)server will be logged to the syslog.  The .B \-Loption is overridden by the use of the.IR ftpaccess (5)file.  If the .B \-L flag is used, command logging will be on bydefault as soon as the ftp server is invoked.This will cause the server to log all USERcommands, which if a user accidentally enters apassword for that command instead of theusername, will cause passwords to be logged via syslog..PPIf the.B \-ioption is specified, files received by the.IR ftpd (8)server will be logged to the.IR xferlog (5).The.B \-ioption is overridden by the use of the.IR ftpaccess (5)file..PPThe.B \-Ioption disables the use of RFC931 (AUTH/ident) to attempt to determine theusername on the client..PPIf the.B \-ooption is specified, files transmitted by the.IR ftpd (8)server will be logged to the .IR xferlog (5).  The .B \-ooption is overridden by the use of the.IR ftpaccess (5)file.  If the.B \-Xoption is specified, the output created by the.B \-iand.B \-ooptions is not saved to the xferlog file but saved via syslogso you can collect output from several hosts on one central loghost..PPIf the.B \-uoption is specified, the default umask is set to.I umask..PPIf the.B \-Woption is specified user logins are not recorded in the wtmp file.  Thedefault (.B \-w) is to record every login and logout..PPThe.B \-sand.B \-Soptions place the daemon in standalone operation mode.  The.B \-Soption runs the daemon in the background and is useful in startup scriptsduring system initialization (ie., in rc.local).  The.B \-soption leaves the daemon in foreground and is useful when running from init(ie., /etc/inittab)..PPThe.B \-pand.B \-Poptions override the port numbers used by the daemon.  Normally, the daemondetermines the port numbers by looking in /etc/services for "ftp" and "ftp-data".If there is no /etc/services entry for "ftp-data" and the.B \-Poption is not specified, the daemon uses the port just prior to the control connectionport.The.B \-poption is only available if running as a standalone daemon..PPThe.B \-qand.B \-Qoptions deterine whether the daemon uses the PID files.  These files are required by thelimit directive to determine the number of current users in each access class.  Disablingthe use of the PID files disables user limits.  The default (.B \-q) is to use the PID files.  Specify.B \-Qwhen testing the server as a normal user when access permissions prevent the use of the PID files.Large, busy sites which do not wish to impose limits on the number of concurrent users may also considerdisabling the PID files..PPThe.B \-roption instructs the daemon to chroot(2) to the specified rootdir immedeately upon loading.  This canimprove system security by limiting the files which may be damaged should a breakin occur through thedaemon.  Set is much like anonymous FTP, with additional files needed which vary from system to system..PPThe ftp server currently supports the following ftprequests; case is not distinguished..PP.nf.ta \w'Request        'u\fBRequest	Description\fPABOR	abort previous commandACCT	specify account (ignored)ALLO	allocate storage (vacuously)APPE	append to a fileCDUP	change to parent of current working directoryCWD	change working directoryDELE	delete a fileHELP	give help informationLIST	give list files in a directory (``ls -lgA'')MKD	make a directoryMDTM	show last modification time of fileMODE	specify data transfer \fImode\fPNLST	give name list of files in directory NOOP	do nothingPASS	specify passwordPASV	prepare for server-to-server transferPORT	specify data connection portPWD	print the current working directoryQUIT	terminate sessionREST	restart incomplete transferRETR	retrieve a fileRMD	remove a directoryRNFR	specify rename-from file nameRNTO	specify rename-to file nameSITE	non-standard commands (see next section)SIZE	return size of fileSTAT	return status of serverSTOR	store a fileSTOU	store a file with a unique nameSTRU	specify data transfer \fIstructure\fPSYST	show operating system type of server systemTYPE	specify data transfer \fItype\fPUSER	specify user nameXCUP	change to parent of current working directory (deprecated)XCWD	change working directory (deprecated)XMKD	make a directory (deprecated)XPWD	print the current working directory (deprecated)XRMD	remove a directory (deprecated).fi.PPThe following non-standard or UNIX specific commands are supportedby the SITE request..PP.nf.ta \w'Request        'u\fBRequest	Description\fPUMASK	change umask. \fIE.g.\fP SITE UMASK 002IDLE	set idle-timer. \fIE.g.\fP SITE IDLE 60CHMOD	change mode of a file. \fIE.g.\fP SITE CHMOD 755 filenameHELP	give help information. \fIE.g.\fP SITE HELPNEWER	list files newer than a particular dateMINFO	like SITE NEWER, but gives extra informationGROUP	request special group access. \fIE.g.\fP SITE GROUP fooGPASS	give special group access password. \fIE.g.\fP SITE GPASS barEXEC	execute a program.  \fIE.g.\fP SITE EXEC program params.fi.PPThe remaining ftp requests specified in Internet RFC 959 arerecognized, but not implemented.MDTM and SIZE are not specified inRFC 959, but will appear in the next updated FTP RFC..PPThe ftp server will abort an active file transfer only when theABOR command is preceded by a Telnet "Interrupt Process" (IP)signal and a Telnet "Synch" signal in the command Telnet stream,as described in Internet RFC 959.If a STAT command is received during a data transfer, preceded by a Telnet IPand Synch, transfer status will be returned..PP.I Ftpdinterprets file names according to the ``globbing''conventions used by.IR csh (1).This allows users to utilize the metacharacters ``*?[]{}~''..PP.I Ftpdauthenticates users according to four rules. .IP 1)The user name must be in the password data base,.IR /etc/passwd ,or whatever is appropriate for the operating system,and the password must not be null.  In this case a passwordmust be provided by the client before any file operationsmay be performed..IP 2)The user name must not appear in the file.IR /etc/ftpusers ..IP 3)The user must have a standard shell returned by .IR getusershell (3)..IP 4)If the user name is ``anonymous'' or ``ftp'', ananonymous ftp account must be present in the passwordfile (user ``ftp'').  In this case the user is allowedto log in by specifying any password (by convention thisis given as the client host's name)..PPIn the last case, .I ftpdtakes special measures to restrict the client's access privileges.The server performs a .IR chroot (2)command to the home directory of the ``ftp'' user.In order that system security is not breached, it is recommendedthat the ``ftp'' subtree be constructed with care;  the followingrules are recommended..IP ~ftp)Make the home directory owned by super-user and unwritable by anyone..IP ~ftp/bin)Make this directory owned by the super-user and unwritable byanyone.  The program.IR ls (1)must be present to support the list command.  Thisprogram should have mode 111..IP ~ftp/etc)Make this directory owned by the super-user and unwritable byanyone.  The files.IR passwd (5)and.IR group (5)must be present for the .I lscommand to be able to produce owner names rather than numbers. Dependingon the operating system, there may be other required files. Check yourmanual page for the .IR getpwent (3)library routine.The password field in.I passwdis not used, and should not contain real encrypted passwords.These files should be mode 444 and owned by the super-user.Don't use the system's /etc/passwd file as the password file orthe system's /etc/group file as the group file in the ~ftp/etc directory..IP ~ftp/pub)Create a subdirectory in ~ftp/pubwith the appropriate mode (777 or 733) if you want to allow normalusers to upload files..PP.SH AUTHENTICATION MECHANISM ON BSD/OS SYSTEMS ONLYThe authentication mechanism used by ftpd is determined bythe ``auth-ftp'' entry in the.IR /etc/login.conffile(see.IR login.conf (5))that matches the users class.If there is no ``auth-ftp'' entry for the class, the normal ``auth'' entrywill be used instead.An alternate authentication mechanism may be specified byappending a colon (``:'') followed by the authenticationstyle, i.e. ``joe:skey''..SH GENERAL FTP EXTENSIONS.PPThere are some extensions to the FTP server such that if the userspecifies a filename (when using a RETRIEVE command) such that:.PP.nf True Filename  Specified Filename  Action -------------  ------------------  ----------------------------------- <filename>.Z   <filename>          Decompress file before transmitting <filename>     <filename>.Z        Compress <filename> before                                             transmitting <filename>     <filename>.tar      Tar <filename> before transmitting <filename>     <filename>.tar.Z    Tar and compress <filename> before                                            transmitting.fi.PPAlso, the FTP server will attempt to check for valid e-mail addresses andchide the user if he doesn't pass the test.  For users whose FTP clientwill hang on "long replies" (i.e. multiline responses), using a dash asthe first character of the password will disable the server's lreply()function..PPThe FTP server can also log all file transmission and reception,keeping the following information for each file transmission that takesplace..PP.nfMon Dec  3 18:52:41 1990 1 wuarchive.wustl.edu 568881 /files.lst.Z a _ o a chris@wugate.wustl.edu ftp 0 *  %.24s %d %s %d %s %c %s %c %c %s %s %d %s    1   2  3  4  5  6  7  8  9  10 11 12 13  1 current time in the form DDD MMM dd hh:mm:ss YYYY  2 transfer time in seconds  3 remote host name  4 file size in bytes  5 name of file  6 transfer type (a>scii, b>inary)  7 special action flags (concatenated as needed):        C   file was compressed        U   file was uncompressed        T   file was tar'ed        _   no action taken  8 file was sent to user (o>utgoing) or received from     user (i>ncoming)  9 accessed anonymously (r>eal, a>nonymous, g>uest) -- mostly for FTP 10 local username or, if guest, ID string given     (anonymous FTP password) 11 service name ('ftp', other) 12 authentication method (bitmask)        0   none        1   RFC931 Authentication 13 authenticated user id (if available, '*' otherwise).fi.SH "SEE ALSO".BR ftp(1) ,.BR getusershell(3) ,.BR syslogd(8) ,.BR ftpaccess(5) ,.BR xferlog(5) ,.BR umask(2).SH BUGSThe anonymous account is inherently dangerous and shouldavoided when possible..PPThe server must run as the super-userto create sockets with privileged port numbers.  It maintainsan effective user id of the logged in user, reverting tothe super-user only when binding addresses to sockets.  Thepossible security holes have been extensivelyscrutinized, but are possibly incomplete.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -