pure-ftpd.8.in 29 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036
  1. .\"
  2. .\" Troll-FTPd is Copyright 1995-2000 Trolltech AS, and Copyright 2001-2002 Arnt Gulbrandsen.
  3. .\" Pure-FTPd is (C)opyleft 2001-2019 by Frank DENIS <j at pureftpd dot org> and the Pure-FTPd team.
  4. .\"
  5. .\" Use, modification and distribution is allowed without limitation, warranty, or liability of any kind.
  6. .\"
  7. .TH "pure-ftpd" "8" "@VERSION@" "Frank Denis" "Pure-FTPd"
  8. .SH "NAME"
  9. pure\-ftpd \- simple File Transfer Protocol server
  10. .SH "SYNOPSIS"
  11. .B pure\-ftpd [\-0] [\-1] [\-2 cert_file[,key_file]] [\-3 certd_socket] [\-4] [\-6] [\-a gid] [\-A] [\-b] [\-B] [\-c clients] [\-C cnx/ip] [\-d [\-d]] [\-D] [\-e] [\-E] [\-f facility] [\-F fortunes file] [\-g pidfile] [\-G] [\-H] [\-i] [\-I] [\-j] [\-J ciphers] [\-k percentage] [\-K] [\-l authentication[:config file]] [\-L max files:max depth] [\-m maxload] [\-M] [\-n maxfiles:maxsize] [\-N] [\-o] [\-O format:log file] [\-p first:last] [\-P ip address or host name] [\-q upload:download ratio] [\-Q upload:download ratio] [\-r] [\-R] [\-s] [\-S [address,][port]] [\-t upload bandwidth:download bandwidth] [\-T upload bandwidth:download bandwidth] [\-u uid] [\-U umask files:umask dirs] [\-v bonjour name] [\-V ip address] [\-w] [\-W] [\-x] [\-X] [\-y max user sessions:max anon sessions] [\-Y tls behavior] [\-z] [\-Z]
  12. .br
  13. Alternative style:
  14. .br
  15. \-0 \-\-notruncate
  16. .br
  17. \-1 \-\-logpid
  18. .br
  19. \-2 \-\-certfile
  20. .br
  21. \-3 \-\-extcert
  22. .br
  23. \-4 \-\-ipv4only
  24. .br
  25. \-6 \-\-ipv6only
  26. .br
  27. \-a \-\-trustedgid
  28. .br
  29. \-A \-\-chrooteveryone
  30. .br
  31. \-b \-\-brokenclientscompatibility
  32. .br
  33. \-B \-\-daemonize
  34. .br
  35. \-c \-\-maxclientsnumber
  36. .br
  37. \-C \-\-maxclientsperip
  38. .br
  39. \-d \-\-verboselog
  40. .br
  41. \-D \-\-displaydotfiles
  42. .br
  43. \-e \-\-anonymousonly
  44. .br
  45. \-E \-\-noanonymous
  46. .br
  47. \-f \-\-syslogfacility
  48. .br
  49. \-F \-\-fortunesfile
  50. .br
  51. \-g \-\-pidfile
  52. .br
  53. \-G \-\-norename
  54. .br
  55. \-h \-\-help
  56. .br
  57. \-H \-\-dontresolve
  58. .br
  59. \-i \-\-anonymouscantupload
  60. .br
  61. \-I \-\-maxidletime
  62. .br
  63. \-j \-\-createhomedir
  64. .br
  65. \-J \-\-tlsciphersuite
  66. .br
  67. \-k \-\-maxdiskusagepct
  68. .br
  69. \-K \-\-keepallfiles
  70. .br
  71. \-l \-\-login
  72. .br
  73. \-L \-\-limitrecursion
  74. .br
  75. \-m \-\-maxload
  76. .br
  77. \-M \-\-anonymouscancreatedirs
  78. .br
  79. \-n \-\-quota
  80. .br
  81. \-N \-\-natmode
  82. .br
  83. \-o \-\-uploadscript
  84. .br
  85. \-O \-\-altlog
  86. .br
  87. \-p \-\-passiveportrange
  88. .br
  89. \-P \-\-forcepassiveip
  90. .br
  91. \-q \-\-anonymousratio
  92. .br
  93. \-Q \-\-userratio
  94. .br
  95. \-r \-\-autorename
  96. .br
  97. \-R \-\-nochmod
  98. .br
  99. \-s \-\-antiwarez
  100. .br
  101. \-S \-\-bind
  102. .br
  103. \-t \-\-anonymousbandwidth
  104. .br
  105. \-T \-\-userbandwidth
  106. .br
  107. \-u \-\-minuid
  108. .br
  109. \-U \-\-umask
  110. .br
  111. \-v \-\-bonjour
  112. .br
  113. \-V \-\-trustedip
  114. .br
  115. \-w \-\-allowuserfxp
  116. .br
  117. \-W \-\-allowanonymousfxp
  118. .br
  119. \-x \-\-prohibitdotfileswrite
  120. .br
  121. \-X \-\-prohibitdotfilesread
  122. .br
  123. \-y \-\-peruserlimits
  124. .br
  125. \-Y \-\-tls
  126. .br
  127. \-z \-\-allowdotfiles
  128. .br
  129. \-Z \-\-customerproof
  130. .SH "DESCRIPTION"
  131. .B Pure\-FTPd
  132. is a small, simple server for the old and hairy File Transfer
  133. Protocol, designed to use less resources than older servers, be
  134. smaller and very secure, and to never execute any external program.
  135. .PP
  136. It support most\-used features and commands of FTP (including many modern
  137. extensions), and leaves out everything which is deprecated, meaningless,
  138. insecure, or correlates with trouble.
  139. .PP
  140. IPv6 is fully supported.
  141. .SH "OPTIONS"
  142. .TP
  143. .B \-0
  144. When a file is uploaded and there is already a previous version of the
  145. file with the same name, the old file will neither get removed nor truncated.
  146. Upload will take place in a temporary file and once the upload is complete,
  147. the switch to the new version will be atomic. This option should not be used
  148. together with virtual quotas.
  149. .TP
  150. .B \-1
  151. Add the PID to the syslog output. Ignored if
  152. .B -f
  153. .B none
  154. is set.
  155. .TP
  156. .B \-2 cert_file[,key_file]
  157. When using TLS, set the path to the certificate file. The certificate
  158. and its key can be be bundled into a single file, or the key can be
  159. in a distinct file.
  160. .TP
  161. .B \-3 path
  162. Path to the pure-certd UNIX socket.
  163. .TP
  164. .B \-4
  165. Listen only to IPv4 connections.
  166. .TP
  167. .B \-6
  168. Listen only to IPv6 connections.
  169. .TP
  170. .B \-a gid
  171. Regular users will be chrooted to their home directories, unless
  172. they belong to the specified gid. Note that root is always trusted,
  173. and that chroot() occurs only for anonymous ftp without this option.
  174. .TP
  175. .B \-A
  176. Chroot() everyone, but root.
  177. .TP
  178. .B \-b
  179. Be broken. Turns on some compatibility hacks for shoddy clients, and for broken Netfilter gateways.
  180. .TP
  181. .B \-B
  182. Start the standalone server in background (daemonize).
  183. .TP
  184. .B \-c clients
  185. Allow a maximum of
  186. .I clients
  187. to be connected.
  188. .I clients
  189. must be at least 1, and if you combine it with
  190. .B \-p
  191. it will be forced down to half the number of ports specified by
  192. .B \-p.
  193. If more than
  194. .I clients
  195. are connected, new clients are rejected at once, even clients wishing
  196. to upload, or to log in as normal users. Therefore, it is advisable
  197. to use
  198. .B \-m
  199. as primary overload protection. The default value is 50.
  200. .TP
  201. .B \-C max connection per ip
  202. Limit the number of simultaneous connections
  203. coming from the same IP address. This is yet another very effective way to
  204. prevent stupid denial of services and bandwidth starvation by a single user.
  205. It works only when the server is launched in standalone mode (if you use a
  206. super\-server, it is supposed to do that). If the server is launched with
  207. .B \-C 2
  208. , it doesn't mean that the total number of connection is limited to 2.
  209. But the same client, coming from the same machine (or at least the same IP),
  210. can't have more than two simultaneous connections. This features needs some
  211. memory to track IP addresses, but it's recommended to use it.
  212. .TP
  213. .B \-d
  214. turns on debug logging. Every command is logged, except that the argument
  215. to PASS is changed to "<password>". If you repeat
  216. .B \-d
  217. , responses too are logged.
  218. .TP
  219. .B \-e
  220. Only allow anonymous users to log in.
  221. .TP
  222. .B \-E
  223. Only allow authenticated login. Anonymous users are prohibited.
  224. .TP
  225. .B \-f facility
  226. makes ftpd use
  227. .I facility
  228. for all
  229. .BR syslog (3)
  230. messages.
  231. .I facility
  232. defaults to
  233. .BR ftp .
  234. The facility names are normally listed in
  235. .IR /usr/include/sys/syslog.h .
  236. Note that if
  237. .B \-f
  238. is not the first option on the command line, a couple of messages may
  239. be logged to local2 before the
  240. .B \-f
  241. option is parsed.
  242. Use
  243. .B \-f none
  244. to disable logging.
  245. .TP
  246. .B \-F fortunes file
  247. Display a funny random message in the initial login banner. The
  248. random cookies are extracted from a text file, in the standard
  249. .B fortune
  250. format. If you installed the
  251. .B fortune
  252. package, you should have a directory
  253. (usually
  254. .B /usr/share/fortune
  255. ) with binary files (
  256. .B xxxx.dat
  257. ) and text files
  258. (without the
  259. .B .dat
  260. extension).
  261. .TP
  262. .B \-g pidfile
  263. In standalone mode, write the pid to that file in instead of
  264. @LOCALSTATEDIR@/run/pure-ftpd.pid .
  265. .TP
  266. .B \-G
  267. When this option is enabled, people can no more change the name of already
  268. uploaded files, even if they own those files or their directory.
  269. .TP
  270. .B \-H
  271. Don't resolve host names ("192.0.34.166" will be logged instead of
  272. "www.example.com"). It can significantly speed up connections and reduce
  273. bandwidth usage on busy servers. Use it especially on public FTP sites.
  274. .TP
  275. .B \-i
  276. Disallow upload for anonymous users, whatever directory permissions
  277. are. This option is especially useful for virtual hosting, to avoid your
  278. users create warez sites in their account.
  279. .TP
  280. .B \-I timeout
  281. Change the maximum idle time. The timeout is in minutes, and defaults to 15.
  282. .TP
  283. .B \-j
  284. If the home directory of a user doesn't exist, automatically
  285. create it. The newly created home directory belongs to the user, and
  286. permissions are set according to the current directory mask. To avoid local
  287. attacks, the parent directory should never belong to an untrusted user.
  288. .TP
  289. .B \-J ciphers
  290. Set the list of ciphers that will be accepted for TLS connections.
  291. .TP
  292. .B \-k percentage
  293. Disallow upload if the partition is more than
  294. .B percentage
  295. full. Example:
  296. \-k 95 will ensure that your disk will never get filled more than 95% by FTP
  297. users.
  298. .TP
  299. .B \-K
  300. Allow users to resume and upload files, but NOT to delete them. Directories
  301. can be removed, but only if they are empty.
  302. .TP
  303. .B \-l authentication:file
  304. Enable a new authentication method. It can be one of:
  305. .I -l unix
  306. For standard (/etc/passwd) authentication.
  307. .I -l pam
  308. For PAM authentication.
  309. .I -l ldap:LDAP config file
  310. For LDAP directories.
  311. .I -l mysql:MySQL config file
  312. For MySQL databases.
  313. .I -l pgsql:Postgres config file
  314. For Postgres databases.
  315. .I -l puredb:PureDB database file
  316. For PureDB databases.
  317. .I -l extauth:path to pure-authd socket
  318. For external authentication handlers.
  319. .br
  320. Different authentication methods can be mixed together. For instance if you
  321. run the server with
  322. .I -lpuredb:@CONFDIR@/pwd.pdb -lmysql:@CONFDIR@/my.cf -lunix
  323. Accounts will first be authenticated from a PureDB database. If it fails, a
  324. MySQL server will be asked. If the account is still not found is the
  325. database, standard unix accounts will be scanned. Authentication methods are
  326. tried in the order you give the -l options, if you do not give -l, then the
  327. decision comes from configure, if PAM is built in, it is used, if not,
  328. then UNIX (/etc/passwd) is used by default.
  329. .br
  330. See the
  331. .I README.LDAP
  332. and
  333. .I README.MySQL
  334. files for info about the built\-in LDAP and SQL directory support.
  335. .TP
  336. .B \-L max files:max depth
  337. Avoid denial\-of\-service attacks by limiting the number of displayed files
  338. in a 'ls' and the maximum depth of a recursive 'ls'. Defaults are 2000:5
  339. (2000 files displayed for a single 'ls' and walk through 5 subdirectories
  340. max).
  341. .TP
  342. .B \-m load
  343. Do not allow anonymous users to download files if the load is above
  344. .I load
  345. when the user connects. Uploads and file listings are still allowed,
  346. as are downloads by real users. The user is not told about this until
  347. he/she tries to download a file.
  348. .TP
  349. .B \-M
  350. Allow anonymous users to create directories.
  351. .TP
  352. .B \-n maxfiles:maxsize
  353. Enable
  354. .B virtual quotas
  355. When virtual quotas are enabled, .ftpquota files are created, and the
  356. number of files for a user is restricted to 'maxfiles'. The max total size
  357. of his directory is also restricted to 'maxsize' Megabytes. Members of the
  358. trusted group aren't subject to quotas.
  359. .TP
  360. .B \-N
  361. NAT mode. Force
  362. .B active
  363. mode. If your FTP server is behind a NAT box
  364. that doesn't support applicative FTP proxying, or if you use port
  365. redirection without a transparent FTP proxy, use this. Well... the previous
  366. sentence isn't very clear. Okay: if your network looks like this:
  367. .br
  368. FTP\-\-NAT.gateway/router\-\-Internet
  369. .br
  370. and if you want people coming from the internet to have access to your FTP
  371. server, please try without this option first. If Netscape clients can
  372. connect without any problem, your NAT gateway rulez. If Netscape doesn't
  373. display directory listings, your NAT gateway sucks. Use
  374. \fB\-N\fR
  375. as a workaround.
  376. .TP
  377. .B \-o
  378. Enable
  379. .IR pure\-uploadscript .
  380. .TP
  381. .B \-O format:log file
  382. Record all file transfers into a specific log
  383. file, in an alternative format. Currently, three formats are supported: CLF,
  384. Stats, W3C and xferlog.
  385. .br
  386. If you add
  387. .br
  388. \fB\-O clf:/var/log/pureftpd.log\fR
  389. .br
  390. to your starting options,
  391. Pure-FTPd will log transfers in
  392. \fB/var/log/pureftpd.log\fR
  393. in a format similar to
  394. the Apache web server in default configuration.
  395. .br
  396. If you add
  397. .br
  398. \fB\-O stats:/var/log/pureftpd.log\fR
  399. .br
  400. to your starting options,
  401. Pure-FTPd will create accurate log files designed for traffic analys
  402. software like ftpStats.
  403. .br
  404. If you add
  405. .br
  406. \fB\-O w3c:/var/log/pureftpd.log\fR
  407. .br
  408. to your starting options,
  409. Pure-FTPd will create W3C\-conformant log files.
  410. .br
  411. For security purposes, the path must be absolute
  412. (eg.
  413. \fB/var/log/pureftpd.log\fR, not \fB ../log/pureftpd.log\fR).
  414. .TP
  415. .B \-p first:last
  416. Use only ports in the range \fIfirst\fR to \fIlast\fR
  417. inclusive for passive\-mode downloads. This means that clients will
  418. not try to open connections to TCP ports outside the range \fIfirst \- last\fR,
  419. which makes pure\-ftpd more compatible with packet filters. Note that
  420. the maximum number of clients (specified with \fB\-c\fR)
  421. is forced down to \fI(last + 1 \- first)/2\fR
  422. if it is greater, as the default is. (The syntax for the port range
  423. is, conveniently, the same as that of
  424. .BR iptables).
  425. .TP
  426. .B \-P ip address or host name
  427. Force the specified IP address in reply to a
  428. .B PASV/EPSV/SPSV
  429. command. If the server is behind a masquerading (NAT) box that doesn't
  430. properly handle stateful FTP masquerading, put the ip address of that box
  431. here. If you have a dynamic IP address, you can use a symbolic host name
  432. (probably the one of your gateway), that will be resolved every time a new
  433. client will connect.
  434. .TP
  435. .B \-q upload:download
  436. Enable an upload/download ratio for anonymous users (ex:
  437. .I \-q 1:5
  438. means that 1 Mb of goodies have to be uploaded to leech 5 Mb).
  439. .TP
  440. .B \-Q upload:download
  441. Enable ratios for anonymous and non\-anonymous users. If the
  442. .I \-a
  443. option is also used, users from the trusted group have no ratio.
  444. .TP
  445. .B \-r
  446. Never overwrite existing files. Uploading a file whose name
  447. already exists cause an automatic rename. Files are called xyz.1, xyz.2,
  448. xyz.3, etc.
  449. .TP
  450. .B \-R
  451. Disallow users (even non-anonymous ones) usage of the CHMOD
  452. command. On hosting services, it may prevent newbies from doing mistakes,
  453. like setting bad permissions on their home directory. Only root can use
  454. CHMOD when this switch is enabled.
  455. .TP
  456. .B \-s
  457. Don't allow anonymous users to retrieve files owned by "ftp"
  458. (generally, files uploaded by other anonymous users).
  459. .TP
  460. .B \-S [{ip address|hostname}] [,{port|service name}]
  461. This option is
  462. only effective when the server is launched as a standalone server.
  463. Connections are accepted on the specified IP and port. IPv4 and IPv6 are
  464. supported. Numeric and fully\-qualified host names are accepted. A service
  465. name (see /etc/services) can be used instead of a numeric port number.
  466. .TP
  467. .B \-t bandwidth
  468. or
  469. .B \-t upload bandwidth:download bandwidth
  470. Enable process priority lowering and bandwidth throttling for anonymous
  471. users. Delay should be in kilobytes/seconds.
  472. .TP
  473. .B \-T bandwidth
  474. or
  475. .B \-T upload bandwidth:download bandwidth
  476. Enable process priority lowering and bandwidth throttling for *ALL*
  477. users.
  478. Pure\-FTPd should have been explicitly compiled with throttling support
  479. to have these flags work.
  480. It is possible to have different bandwidth limits for uploads and for
  481. downloads. '\-t' and '\-T' can indeed be followed by two numbers delimited by
  482. a column (':'). The first number is the upload bandwidth and the next one
  483. applies only to downloads. One of them can be left blank which means infinity.
  484. A single number without any column means that the same limit applies to upload
  485. and download.
  486. .TP
  487. .B \-u uid
  488. Do not allow uids below \fIuid\fR
  489. to log in (typically, low\-numbered \fIuid\fRs
  490. are used for administrative accounts).
  491. .B "\-u 100"
  492. is sufficient to deny access to all administrative accounts on many
  493. linux boxes, where 99 is the last administrative account. Anonymous
  494. FTP is allowed even if the uid of the ftp user is smaller than
  495. .IR uid .
  496. .B "\-u 1"
  497. denies access only to root accounts. The default is to allow FTP
  498. access to all accounts.
  499. .TP
  500. .B \-U umask files:umask dirs
  501. Change the mask for creation of new files and directories. The default are 133 (files are
  502. readable -but not writable- by other users) and 022 (same thing for directory, with the execute bit on).
  503. If new files should only be readable by the user, use 177:077. If you want uploaded files to be executable,
  504. use 022:022 (files will be readable by other people) or 077:077 (files will only be
  505. readable by their owner).
  506. .TP
  507. .B \-v bonjour name
  508. Set the Bonjour name of the service (only available on MacOS X when Bonjour support is compiled in).
  509. .TP
  510. .B \-V ip address
  511. Allow non-anonymous FTP access only on this specific
  512. local IP address. All other IP addresses are only anonymous. With that
  513. option, you can have routed IPs for public access, and a local IP (like
  514. 10.x.x.x) for administration. You can also have a routable trusted IP
  515. protected by firewall rules, and only that IP can be used to login as a
  516. non-anonymous user.
  517. .TP
  518. .B \-w
  519. Enable support for the FXP protocol, for non\-anonymous users only.
  520. .TP
  521. .B \-W
  522. Enable the FXP protocol for everyone.
  523. \fIFXP IS AN UNSECURE PROTOCOL. NEVER ENABLE IT ON UNTRUSTED NETWORKS.\fR
  524. .TP
  525. .B \-x
  526. In normal operation mode, authenticated users can read/write files
  527. beginning with a dot ('.'). Anonymous users can't, for security reasons
  528. (like changing banners or a forgotten .rhosts). When '\-x' is used,
  529. authenticated users can download dot\-files, but not overwrite/create them,
  530. even if they own them. That way, you can prevent hosted users from messing
  531. \&.qmail files.
  532. .TP
  533. .B \-X
  534. This flag is identical to the previous one (writing dot\-files is
  535. prohibited), but in addition, users can't even *read* files and directories
  536. beginning with a dot (like "cd .ssh").
  537. .TP
  538. .B \-y per user max sessions:max anonymous sessions
  539. This switch enables per-user concurrency limits. Two values are separated by a
  540. column. The first one is the max number of concurrent sessions for a single
  541. login. The second one is the maximum number of anonoymous sessions.
  542. .TP
  543. .B \-Y tls behavior
  544. \fB\-Y 0\fR
  545. (default) disables TLS security mechanisms.
  546. .br
  547. \fB\-Y 1\fR
  548. Accept both normal sessions and TLS ones.
  549. .br
  550. \fB\-Y 2\fR
  551. refuses connections that aren't using TLS security mechanisms, including
  552. anonymous ones.
  553. .br
  554. \fB\-Y 3\fR
  555. refuses connections that aren't using TLS security mechanisms, and refuse
  556. cleartext data channels as well.
  557. .br
  558. The server must have been compiled with TLS support and a valid certificate
  559. must be in place to accept encrypted sessions.
  560. .TP
  561. .B \-z
  562. Allow anonymous users to read files and directories starting with a dot ('.').
  563. .TP
  564. .B \-Z
  565. Add safe guards against common customer mistakes (like chmod 0 on their own files) .
  566. .SH "AUTHENTICATION"
  567. Some of the complexities of older servers are left out.
  568. .PP
  569. This version of pure\-ftpd can use PAM for authentication. If you want it to
  570. consult any files like /etc/shells or /etc/ftpd/ftpusers consult pam
  571. docs. LDAP directories and SQL databases are also supported.
  572. .PP
  573. Anonymous users are authenticated in any of three ways:
  574. .PP
  575. 1. The user logs in as "ftp" or "anonymous" and there is an
  576. account called "ftp" with an existing home directory. This server
  577. does not ask anonymous users for an email address or other password.
  578. .PP
  579. 2. The user connects to an IP address which resolves to the name of a
  580. directory in
  581. .I @CONFDIR@/pure\-ftpd
  582. (or a symlink in that directory to a real directory), and there is an
  583. account called "ftp" (which does not need to have a valid home
  584. directory). See
  585. .B Virtual Servers
  586. below.
  587. .PP
  588. .B Ftpd
  589. does a
  590. .BR chroot (2)
  591. to the relevant base directory when an anonymous user logs in.
  592. .PP
  593. Note that
  594. .B ftpd
  595. allows remote users to log in as root if the password is known and \-u
  596. not used.
  597. .SH "UNUSUAL FEATURES"
  598. If a user's home directory is \fB/path/to/home/./\fR, FTP sessions under that UID will be chroot()ed. In addition, if a users's home directory is \fB/path/to/home/./directory\fR the session will be chroot()ed to /path/to/home and the FTP session will start in 'directory'.
  599. .PP
  600. As noted above, this
  601. .B pure\-ftpd
  602. omits several features that are required by the RFC or might be
  603. considered useful at first. Here is a list of the most important
  604. omissions.
  605. .PP
  606. On\-the\-fly tar is not supported, for several reasons. I feel that
  607. users who want to get many files should use a special FTP client such
  608. as "mirror," which also supports incremental fetch. I don't want to
  609. either add several hundred lines of code to create tar files or
  610. execute an external tar. Finally, on\-the\-fly tar distorts log files.
  611. .PP
  612. On\-the\-fly compression is left out too. Most files on an FTP site are
  613. compressed already, and if a file isn't, there presumably is a reason
  614. why. (As for decompression: Don't FTP users waste bandwidth enough
  615. without help from on\-the\-fly decompression?)
  616. .SH "DIRECTORY ALIASES"
  617. Shortcuts for the "cd" command can be set up if the server has been compiled
  618. with the \-\-with\-diraliases feature.
  619. .PP
  620. To enable directory aliases, create a file called
  621. .I @CONFDIR@/pureftpd\-dir\-aliases
  622. and alternate lines of alias names and associated directories.
  623. .SH "ANONYMOUS FTP"
  624. This server leaves out some of the commands and features that have
  625. been used to subvert anonymous FTP servers in the past, but still you
  626. have to be a little bit careful in order to support anonymous FTP
  627. without risk to the rest of your files.
  628. .PP
  629. Make
  630. .I ~ftp
  631. and all files and directories below this directory owned by some user
  632. other than "ftp," and only the
  633. .I .../incoming
  634. directory/directories writable by "ftp." It is probably best if all
  635. directories are writable only by a special group such as "ftpadmin"
  636. and "ftp" is not a member of this group.
  637. .PP
  638. If you do not trust the local users, put
  639. .I ~ftp
  640. on a separate partition, so local users can't hard\-link unapproved
  641. files into the anonymous FTP area.
  642. .PP
  643. Use of the
  644. .B \-s
  645. option is strongly suggested. (Simply add "\-s" to the end of the
  646. .B ftpd
  647. line in
  648. .I /etc/inetd.conf
  649. to enable it.)
  650. .PP
  651. Most other FTP servers require that a number of files such as
  652. .I ~ftp/bin/ls
  653. exist. This server does not require that any files or directories
  654. within
  655. .I ~/ftp
  656. whatsoever exist, and I recommend that all such unnecessary files are
  657. removed (for no real reason).
  658. .PP
  659. It may be worth considering to run the anonymous FTP service as a
  660. virtual server, to get automatic logins and to firewall off the FTP
  661. address/port to which real users can log in.
  662. .PP
  663. If your server is a public FTP site, you may want to allow only 'ftp' and 'anonymous' users to log in. Use the
  664. .B \-e
  665. option for this. Real accounts will be ignored and you will get a secure, anonymous\-only FTP server.
  666. .SH "MAGIC FILES"
  667. The files
  668. .I <ftproot>/.banner
  669. and
  670. .I .message
  671. are magical.
  672. .P
  673. If there is a file called
  674. .I .banner
  675. in the root directory of the anonymous FTP area, or in the root
  676. directory of a virtual host, and it is shorter than 1024 bytes, it is
  677. printed upon login. (If the client does not log in explicitly, and an
  678. implicit login is triggered by a CWD or CDUP command, the banner is
  679. not printed. This is regrettable but hard to avoid.)
  680. .P
  681. If there is a file called
  682. .I .message
  683. in any directory and it is shorter than 1024 bytes, that file is
  684. printed whenever a user enters that directory using CWD or CDUP.
  685. .SH "VIRTUAL SERVERS"
  686. You can run several different anonymous FTP servers on one host, by
  687. giving the host several IP addresses with different DNS names.
  688. .PP
  689. Here are the steps needed to create an extra server using an IP alias
  690. on linux 2.4.x, called "ftp.example.com" on address 10.11.12.13. on
  691. the IP alias eth0.
  692. .PP
  693. 1. Create an "ftp" account if you do not have one. It it best if
  694. the account does not have a valid home directory and shell. I prefer
  695. to make
  696. .I /dev/null
  697. the ftp account's home directory and shell.
  698. .B Ftpd
  699. uses this account to set the anonymous users' uid.
  700. .PP
  701. 2. Create a directory as described in
  702. .B Anonymous FTP
  703. and make a symlink called
  704. .I @CONFDIR@/pure\-ftpd/10.11.12.13
  705. which points to this directory.
  706. .PP
  707. 3. Make sure your kernel has support for IP aliases.
  708. .PP
  709. 4. Make sure that the following commands are run at boot:
  710. .PP
  711. .in +2
  712. /sbin/ifconfig eth0:1 10.11.12.13
  713. .PP
  714. That should be all. If you have problems, here are some things to
  715. try.
  716. .PP
  717. First, symlink
  718. .I @CONFDIR@/pure\-ftpd/127.0.0.1
  719. to some directory and say "ftp localhost". If that doesn't log you
  720. in, the problem is with
  721. .B ftpd.
  722. .PP
  723. If not, "ping \-v 10.11.12.13" and/or "ping \-v ftp.example.com" from the
  724. same host. If this does not work, the problem is with the IP alias.
  725. .PP
  726. Next, try "ping \-v 10.11.12.13" from a host on the local ethernet, and
  727. afterwards "/sbin/arp \-a". If 10.11.12.13 is listed among the ARP
  728. entries with the correct hardware address, the problem is probably
  729. with the IP alias. If 10.11.12.13 is listed, but has hardware address
  730. 0:0:0:0:0:0, then proxy\-ARP isn't working.
  731. .PP
  732. If none of that helps, I'm stumped. Good luck.
  733. .PP
  734. .B Warning:
  735. If you setup a virtual hosts, normal users will not be able to login via
  736. this name, so
  737. .B don't
  738. create link/directory in
  739. .I @CONFDIR@/pure\-ftpd
  740. for your regular hostname.
  741. .SH "FILES"
  742. .I /etc/passwd
  743. is used via libc (and PAM is this case), to get the uid and home
  744. directory of normal users, the uid and home directory of "ftp" for
  745. normal anonymous ftp, and just the uid of "ftp" for virtual ftp hosts.
  746. .PP
  747. .I /etc/shadow
  748. is used like
  749. .I /etc/passwd
  750. if shadow support is enabled.
  751. .PP
  752. .I /etc/group
  753. is used via libc, to get the group membership of normal users.
  754. .PP
  755. .I /proc/net/tcp
  756. is used to count existing FTP connections, if the
  757. .B \-c
  758. or
  759. .B \-p
  760. options are used
  761. .PP
  762. .I @CONFDIR@/pure\-ftpd/<ip address>
  763. is the base directory for the <ip address> virtual ftp server, or a
  764. symbolic link to its base directory.
  765. .B Ftpd
  766. does a
  767. .BR chroot (2)
  768. into this directory when a user logs in to <ip address>, thus symlinks
  769. outside this directory will not work.
  770. .PP
  771. .I ~ftp
  772. is the base directory for "normal" anonymous FTP.
  773. .B Ftpd
  774. does a
  775. .BR chroot (2)
  776. into this directory when an anonymous user logs in, thus symlinks
  777. outside this directory will not work.
  778. .SH "LS"
  779. The behaviour of LIST and NLST is a tricky issue. Few servers send
  780. RFC\-compliant responses to LIST, and some clients depend on
  781. non\-compliant responses.
  782. .PP
  783. This server uses
  784. .BR glob (3)
  785. to do filename globbing.
  786. .PP
  787. The response to NLST is by default similar to that of
  788. .BR ls (1),
  789. and
  790. that to LIST is by default similar to that of
  791. .B "ls \-l"
  792. or
  793. .B "ls \-lg"
  794. on most Unix systems, except that the "total" count is meaningless.
  795. Only regular files, directories and symlinks are shown. Only important
  796. .B ls
  797. options are supported:
  798. .TP
  799. .B \-1
  800. Undoes
  801. .BR \-l " and " \-C .
  802. .TP
  803. .B \-a
  804. lists even files/directories whose names begin with ".".
  805. .TP
  806. .B \-C
  807. lists files in as many colums as will fit on the screen. Undoes
  808. .BR \-1 " and " \-l .
  809. .TP
  810. .B \-d
  811. lists argument directories' names rather their contents.
  812. .TP
  813. .B \-D
  814. List files beginning with a dot ('.') even when the client doesn't
  815. append the
  816. .B \-a
  817. option to the
  818. .B list
  819. command.
  820. .TP
  821. .B \-F
  822. appends '*' to executable regular files, '@' to symlinks and '/' to
  823. directories.
  824. .TP
  825. .B \-l
  826. shows various details about the file, including file group. See
  827. .BR ls (1)
  828. for details. Undoes
  829. .BR \-1 " and " \-C .
  830. .TP
  831. .B \-r
  832. reverses the sorting order (modifies
  833. .BR \-S " and " \-t " and the default alphabetical ordering)."
  834. .TP
  835. .B \-R
  836. recursively descends into subdirectories of the argument directories.
  837. .TP
  838. .B \-S
  839. Sorts by file size instead of by name. Undoes
  840. .BR \-t .
  841. .TP
  842. .B \-t
  843. Sorts by file modification time instead of by name. Undoes
  844. .BR \-S .
  845. .SH "PROTOCOL"
  846. Here are the FTP commands supported by this server.
  847. .br
  848. .B ABOR
  849. .B ALLO
  850. .B APPE
  851. .B AUTH TLS
  852. .B CCC
  853. .B CDUP
  854. .B CWD
  855. .B DELE
  856. .B EPRT
  857. .B EPSV
  858. .B ESTA
  859. .B ESTP
  860. .B FEAT
  861. .B HELP
  862. .B LIST
  863. .B MDTM
  864. .B MFMT
  865. .B MKD
  866. .B MLSD
  867. .B MLST
  868. .B MODE
  869. .B NLST
  870. .B NOOP
  871. .B PASS
  872. .B PASV
  873. .B PBSZ
  874. .B PORT
  875. .B PROT
  876. .B PWD
  877. .B QUIT
  878. .B REST
  879. .B RETR
  880. .B RMD
  881. .B RNFR
  882. .B RNTO
  883. .B SIZE
  884. .B SPSV
  885. .B STAT
  886. .B STOR
  887. .B STOU
  888. .B STRU
  889. .B SYST
  890. .B TYPE
  891. .B USER
  892. .B XCUP
  893. .B XCWD
  894. .B XDBG
  895. .B XMKD
  896. .B XPWD
  897. .B XRMD
  898. .B OPTS MLST
  899. .B OPTS UTF8
  900. .B SITE CHMOD
  901. .B SITE HELP
  902. .B SITE IDLE
  903. .B SITE TIME
  904. .B SITE UTIME
  905. .SH "BUGS"
  906. Please report bugs to the mailing\-list (see below).
  907. Pure\-FTPd looks very stable and is used on production servers. However it comes with no warranty and it can have nasty bugs or security flaws.
  908. .SH "HOME PAGE"
  909. http://www.pureftpd.org/
  910. .SH "NEW VERSIONS"
  911. See the mailing\-list on \fBhttp://www.pureftpd.org/ml/\fR.
  912. .SH "AUTHOR AND LICENSE"
  913. Troll\-FTPd was written by Arnt Gulbrandsen <agulbra@troll.no> and copyright 1995\-2002
  914. Troll Tech AS, Waldemar Thranes gate 98B, N\-0175 Oslo, Norway, fax +47
  915. 22806380.
  916. .PP
  917. Pure\-FTPd is (C)opyleft 2001\-2019 by Frank DENIS <j at pureftpd dot org>.
  918. .PP
  919. This software is covered by the BSD license.
  920. .PP
  921. Contributors:
  922. .br
  923. Arnt Gulbrandsen,
  924. Troll Tech AS,
  925. Janos Farkas,
  926. August Fullford,
  927. Ximenes Zalteca,
  928. Patrick Michael Kane,
  929. Arkadiusz Miskiewicz,
  930. Michael K. Johnson,
  931. Kelley Lingerfelt,
  932. Sebastian Andersson,
  933. Andreas Westin,
  934. Jason Lunz,
  935. Mathias Gumz,
  936. Claudiu Costin,
  937. Ping,
  938. Paul Lasarev,
  939. Jean\-Mathieux Schaffhauser,
  940. Emmanuel Hocdet,
  941. Sami Koskinen,
  942. Sami Farin,
  943. Luis Llorente Campo,
  944. Peter Pentchev,
  945. Darren Casey,
  946. The Regents of the University of California,
  947. Theo de Raadt (OpenBSD),
  948. Matthias Andree,
  949. Isak Lyberth,
  950. Steve Reid,
  951. RSA Data Security Inc,
  952. Trilucid,
  953. Dmtry Lebkov,
  954. Johan Huisman,
  955. Thorsten Kukuk,
  956. Jan van Veen,
  957. Roger Constantin Demetrescu,
  958. Stefano F.,
  959. Robert Varga,
  960. Freeman,
  961. James Metcalf,
  962. Im Eunjea,
  963. Philip Gladstone,
  964. Kenneth Stailey,
  965. Brad Smith,
  966. Ulrik Sartipy,
  967. Cindy Marasco,
  968. Nicolas Doye,
  969. Thomas Briggs,
  970. Stanton Gallegos,
  971. Florin Andrei,
  972. Chan Wilson,
  973. Bjoern Metzdorf,
  974. Ben Gertzfield,
  975. Akhilesch Mritunjai,
  976. Dawid Szymanski,
  977. Kurt Inge Smadal,
  978. Alex Dupre,
  979. Gabriele Vinci,
  980. Andrey Ulanov,
  981. Fygul Hether,
  982. Jeffrey Lim,
  983. Ying-Chieh Liao,
  984. Johannes Erdfelt,
  985. Martin Sarfy,
  986. Clive Goodhead,
  987. Aristoteles Pagaltzis,
  988. Stefan Hornburg,
  989. Mehmet Cokcevik,
  990. Brynjar Eide,
  991. Torgnt Wernersson,
  992. Banhalmi Csaba,
  993. Volodin D,
  994. Oriol Magrané,
  995. Jui-Nan Lin,
  996. Patrick Gosling,
  997. Marc Balmer,
  998. Rajat Upadhyaya / Novell,
  999. Christian Cier-Zniewski,
  1000. Wilco Baan Hofman,
  1001. Clement Chauplannaz.
  1002. .SH "SEE ALSO"
  1003. .BR "ftp(1)" ,
  1004. .BR "pure-ftpd(8)"
  1005. .BR "pure-ftpwho(8)"
  1006. .BR "pure-mrtginfo(8)"
  1007. .BR "pure-uploadscript(8)"
  1008. .BR "pure-statsdecode(8)"
  1009. .BR "pure-pw(8)"
  1010. .BR "pure-quotacheck(8)"
  1011. .BR "pure-authd(8)"
  1012. .BR "pure-certd(8)"
  1013. .BR "RFC 959" ,
  1014. .BR "RFC 2228",
  1015. .BR "RFC 2389",
  1016. .BR "RFC 2428" " and"
  1017. .BR "RFC 4217" .