| 1 | <HTML |
| 2 | ><HEAD |
| 3 | ><TITLE |
| 4 | >Professional FTP Daemon FAQ</TITLE |
| 5 | ><META |
| 6 | NAME="GENERATOR" |
| 7 | CONTENT="Modular DocBook HTML Stylesheet Version 1.77+"></HEAD |
| 8 | ><BODY |
| 9 | CLASS="BOOK" |
| 10 | BGCOLOR="#FFFFFF" |
| 11 | TEXT="#000000" |
| 12 | LINK="#0000FF" |
| 13 | VLINK="#840084" |
| 14 | ALINK="#0000FF" |
| 15 | ><DIV |
| 16 | CLASS="BOOK" |
| 17 | ><A |
| 18 | NAME="AEN1" |
| 19 | ></A |
| 20 | ><DIV |
| 21 | CLASS="TITLEPAGE" |
| 22 | ><H1 |
| 23 | CLASS="TITLE" |
| 24 | ><A |
| 25 | NAME="AEN2" |
| 26 | ></A |
| 27 | >Professional FTP Daemon FAQ</H1 |
| 28 | ><H3 |
| 29 | CLASS="AUTHOR" |
| 30 | ><A |
| 31 | NAME="AEN4" |
| 32 | ></A |
| 33 | >Mark Lowes</H3 |
| 34 | ><DIV |
| 35 | CLASS="AFFILIATION" |
| 36 | ><DIV |
| 37 | CLASS="ADDRESS" |
| 38 | ><P |
| 39 | CLASS="ADDRESS" |
| 40 | ><TT |
| 41 | CLASS="EMAIL" |
| 42 | ><<A |
| 43 | HREF="mailto:[email protected]" |
| 44 | >[email protected]</A |
| 45 | >></TT |
| 46 | ></P |
| 47 | ></DIV |
| 48 | ></DIV |
| 49 | ><P |
| 50 | CLASS="COPYRIGHT" |
| 51 | >Copyright © 1999-2003 Mark Lowes</P |
| 52 | ><DIV |
| 53 | CLASS="LEGALNOTICE" |
| 54 | ><A |
| 55 | NAME="AEN15" |
| 56 | ></A |
| 57 | ><P |
| 58 | ><B |
| 59 | >Copyrights and Trademarks</B |
| 60 | ></P |
| 61 | ><P |
| 62 | >This document may be reproduced in whole or in part, without fee, |
| 63 | subject to the following restrictions:</P |
| 64 | ><P |
| 65 | ></P |
| 66 | ><OL |
| 67 | COMPACT="COMPACT" |
| 68 | TYPE="1" |
| 69 | ><LI |
| 70 | ><P |
| 71 | >The copyright notice above and this permission notice must be |
| 72 | preserved complete on all complete or partial copies</P |
| 73 | ></LI |
| 74 | ><LI |
| 75 | ><P |
| 76 | >Any translation or derived work must be approved by the author in |
| 77 | writing before distribution.</P |
| 78 | ></LI |
| 79 | ><LI |
| 80 | ><P |
| 81 | >If you distribute this work in part, instructions for obtaining |
| 82 | the complete version of this manual must be included, and a means |
| 83 | for obtaining a complete version provided.</P |
| 84 | ></LI |
| 85 | ><LI |
| 86 | ><P |
| 87 | >Small portions may be reproduced as illustrations for reviews or |
| 88 | quotes in other works without this permission notice if proper |
| 89 | citation is given.</P |
| 90 | ></LI |
| 91 | ></OL |
| 92 | ><P |
| 93 | >Exceptions to these rules may be granted for academic purposes: |
| 94 | Write to the author and ask. These restrictions are here to protect us |
| 95 | as authors, not to restrict you as learners and educators. </P |
| 96 | ></DIV |
| 97 | ><HR></DIV |
| 98 | ><DIV |
| 99 | CLASS="TOC" |
| 100 | ><DL |
| 101 | ><DT |
| 102 | ><B |
| 103 | >Table of Contents</B |
| 104 | ></DT |
| 105 | ><DT |
| 106 | ><A |
| 107 | HREF="#AEN29" |
| 108 | >Preface</A |
| 109 | ></DT |
| 110 | ><DT |
| 111 | >1. <A |
| 112 | HREF="#AEN33" |
| 113 | >Introduction to ProFTPD</A |
| 114 | ></DT |
| 115 | ><DT |
| 116 | >2. <A |
| 117 | HREF="#AEN163" |
| 118 | >Compilation and installing</A |
| 119 | ></DT |
| 120 | ><DT |
| 121 | >3. <A |
| 122 | HREF="#AEN239" |
| 123 | >Compatibility and Integration</A |
| 124 | ></DT |
| 125 | ><DT |
| 126 | >4. <A |
| 127 | HREF="#AEN288" |
| 128 | >Common Running problems</A |
| 129 | ></DT |
| 130 | ><DT |
| 131 | >5. <A |
| 132 | HREF="#AEN553" |
| 133 | >Configuration problems</A |
| 134 | ></DT |
| 135 | ><DT |
| 136 | >6. <A |
| 137 | HREF="#AEN727" |
| 138 | >Security</A |
| 139 | ></DT |
| 140 | ><DT |
| 141 | >7. <A |
| 142 | HREF="#AEN813" |
| 143 | >User Authentication</A |
| 144 | ></DT |
| 145 | ><DT |
| 146 | >8. <A |
| 147 | HREF="#AEN924" |
| 148 | >FAQ Notes</A |
| 149 | ></DT |
| 150 | ></DL |
| 151 | ></DIV |
| 152 | ><DIV |
| 153 | CLASS="PREFACE" |
| 154 | ><HR><H1 |
| 155 | ><A |
| 156 | NAME="AEN29" |
| 157 | ></A |
| 158 | >Preface</H1 |
| 159 | ><BLOCKQUOTE |
| 160 | CLASS="ABSTRACT" |
| 161 | ><DIV |
| 162 | CLASS="ABSTRACT" |
| 163 | ><A |
| 164 | NAME="AEN31" |
| 165 | ></A |
| 166 | ><P |
| 167 | ></P |
| 168 | ><P |
| 169 | >This document sets out many of the FAQs related to the installation, |
| 170 | functioning and configuration of ProFTPD. It also provides some guidance |
| 171 | on policy and security issues.</P |
| 172 | ><P |
| 173 | ></P |
| 174 | ></DIV |
| 175 | ></BLOCKQUOTE |
| 176 | ></DIV |
| 177 | ><DIV |
| 178 | CLASS="CHAPTER" |
| 179 | ><HR><H1 |
| 180 | ><A |
| 181 | NAME="AEN33" |
| 182 | ></A |
| 183 | >Chapter 1. Introduction to ProFTPD</H1 |
| 184 | ><DIV |
| 185 | CLASS="QANDASET" |
| 186 | ><DL |
| 187 | ><DT |
| 188 | >1. <A |
| 189 | HREF="#AEN37" |
| 190 | >What is ProFTPD?</A |
| 191 | ></DT |
| 192 | ><DT |
| 193 | >2. <A |
| 194 | HREF="#AEN42" |
| 195 | >What is the current version?</A |
| 196 | ></DT |
| 197 | ><DT |
| 198 | >3. <A |
| 199 | HREF="#AEN50" |
| 200 | >Version numbering scheme</A |
| 201 | ></DT |
| 202 | ><DT |
| 203 | >4. <A |
| 204 | HREF="#AEN77" |
| 205 | >Website & documentation</A |
| 206 | ></DT |
| 207 | ><DT |
| 208 | >5. <A |
| 209 | HREF="#AEN89" |
| 210 | >Bug reporting</A |
| 211 | ></DT |
| 212 | ><DT |
| 213 | >6. <A |
| 214 | HREF="#AEN95" |
| 215 | >I've found a security hole</A |
| 216 | ></DT |
| 217 | ><DT |
| 218 | >7. <A |
| 219 | HREF="#AEN103" |
| 220 | >Downloading</A |
| 221 | ></DT |
| 222 | ><DT |
| 223 | >8. <A |
| 224 | HREF="#AEN118" |
| 225 | >Mailing lists</A |
| 226 | ></DT |
| 227 | ><DT |
| 228 | >9. <A |
| 229 | HREF="#AEN159" |
| 230 | >Copyright Issues</A |
| 231 | ></DT |
| 232 | ></DL |
| 233 | ><DIV |
| 234 | CLASS="QANDAENTRY" |
| 235 | ><DIV |
| 236 | CLASS="QUESTION" |
| 237 | ><P |
| 238 | ><A |
| 239 | NAME="AEN37" |
| 240 | ></A |
| 241 | ><B |
| 242 | >1. </B |
| 243 | >What is ProFTPD?</P |
| 244 | ></DIV |
| 245 | ><DIV |
| 246 | CLASS="ANSWER" |
| 247 | ><P |
| 248 | ><B |
| 249 | > </B |
| 250 | >ProFTPD is a ftp server primarily written for the |
| 251 | various unix variants however it will compile under Cygwin |
| 252 | giving some support on Windows platforms. It has been |
| 253 | designed to be much like Apache in concept taking many |
| 254 | of the ideas (configuration format, modular design, etc) |
| 255 | from it.</P |
| 256 | ></DIV |
| 257 | ></DIV |
| 258 | ><DIV |
| 259 | CLASS="QANDAENTRY" |
| 260 | ><DIV |
| 261 | CLASS="QUESTION" |
| 262 | ><P |
| 263 | ><A |
| 264 | NAME="AEN42" |
| 265 | ></A |
| 266 | ><B |
| 267 | >2. </B |
| 268 | >What is the current version?</P |
| 269 | ></DIV |
| 270 | ><DIV |
| 271 | CLASS="ANSWER" |
| 272 | ><P |
| 273 | ><B |
| 274 | > </B |
| 275 | >Stable: 1.2.9</P |
| 276 | ><P |
| 277 | ></P |
| 278 | ><TABLE |
| 279 | BORDER="0" |
| 280 | ><TBODY |
| 281 | ><TR |
| 282 | ><TD |
| 283 | >Release Candidate: -none-</TD |
| 284 | ></TR |
| 285 | ></TBODY |
| 286 | ></TABLE |
| 287 | ><P |
| 288 | ></P |
| 289 | ></DIV |
| 290 | ></DIV |
| 291 | ><DIV |
| 292 | CLASS="QANDAENTRY" |
| 293 | ><DIV |
| 294 | CLASS="QUESTION" |
| 295 | ><P |
| 296 | ><A |
| 297 | NAME="AEN50" |
| 298 | ></A |
| 299 | ><B |
| 300 | >3. </B |
| 301 | >Version numbering scheme</P |
| 302 | ></DIV |
| 303 | ><DIV |
| 304 | CLASS="ANSWER" |
| 305 | ><P |
| 306 | ><B |
| 307 | > </B |
| 308 | >At the moment there is a little irrationality in the numbering scheme however it can be summarised as follows</P |
| 309 | ><A |
| 310 | NAME="AEN54" |
| 311 | ></A |
| 312 | ><BLOCKQUOTE |
| 313 | CLASS="BLOCKQUOTE" |
| 314 | ><P |
| 315 | ></P |
| 316 | ><DIV |
| 317 | CLASS="VARIABLELIST" |
| 318 | ><DL |
| 319 | ><DT |
| 320 | >1.0.x</DT |
| 321 | ><DD |
| 322 | ><P |
| 323 | >This is the previous stable version.</P |
| 324 | ></DD |
| 325 | ><DT |
| 326 | >1.1.x</DT |
| 327 | ><DD |
| 328 | ><P |
| 329 | >Development code</P |
| 330 | ></DD |
| 331 | ><DT |
| 332 | >1.2.0rcx</DT |
| 333 | ><DD |
| 334 | ><P |
| 335 | >Release candidate code, these releases are |
| 336 | pretty much bug free and are testing releases prior |
| 337 | to the final stable code.</P |
| 338 | ></DD |
| 339 | ><DT |
| 340 | >1.2.x</DT |
| 341 | ><DD |
| 342 | ><P |
| 343 | >This will be the stable cycle with the final .x |
| 344 | being the incremental patches to fix bugs discovered |
| 345 | after the release version is issued.</P |
| 346 | ></DD |
| 347 | ><DT |
| 348 | >1.3.x</DT |
| 349 | ><DD |
| 350 | ><P |
| 351 | >1.3.x is the planned development tree, work |
| 352 | on this has been pushed back while more active |
| 353 | development of 1.2.x is undertaken. |
| 354 | </P |
| 355 | ></DD |
| 356 | ></DL |
| 357 | ></DIV |
| 358 | ></BLOCKQUOTE |
| 359 | ></DIV |
| 360 | ></DIV |
| 361 | ><DIV |
| 362 | CLASS="QANDAENTRY" |
| 363 | ><DIV |
| 364 | CLASS="QUESTION" |
| 365 | ><P |
| 366 | ><A |
| 367 | NAME="AEN77" |
| 368 | ></A |
| 369 | ><B |
| 370 | >4. </B |
| 371 | >Website & documentation</P |
| 372 | ></DIV |
| 373 | ><DIV |
| 374 | CLASS="ANSWER" |
| 375 | ><P |
| 376 | ><B |
| 377 | > </B |
| 378 | ><A |
| 379 | HREF="http://www.proftpd.org/" |
| 380 | TARGET="_top" |
| 381 | >http://www.proftpd.org/</A |
| 382 | > |
| 383 | is the primary source for all information about the |
| 384 | project including documentation and security alerts. |
| 385 | There are a number of geographic mirror sites, |
| 386 | see the mirror pages on www.proftpd.org for more |
| 387 | details or try www.<isocode>.proftpd.org (ie |
| 388 | www.uk.proftpd.org).</P |
| 389 | ><A |
| 390 | NAME="AEN82" |
| 391 | ></A |
| 392 | ><BLOCKQUOTE |
| 393 | CLASS="BLOCKQUOTE" |
| 394 | ><H3 |
| 395 | CLASS="BRIDGEHEAD" |
| 396 | ><A |
| 397 | NAME="AEN83" |
| 398 | ></A |
| 399 | >Helping with documentation</H3 |
| 400 | ><P |
| 401 | >Writing documentation is time consuming and requires |
| 402 | some work but it's not actually difficult. Look through the |
| 403 | directive list shipped with the source and package builds |
| 404 | of ProFTPD and see what needs work. Check the source code |
| 405 | to ensure that the context is correct by grepping through |
| 406 | the source code looking for something like</P |
| 407 | ><PRE |
| 408 | CLASS="PROGRAMLISTING" |
| 409 | >CHECK_CONF(cmd,CONF_ROOT|CONF_VIRTUAL|CONF_ANON|CONF_GLOBAL) |
| 410 | </PRE |
| 411 | ><P |
| 412 | >to figure out where the directive is valid |
| 413 | (server config, <VirtualHost>, <Anonymous>, |
| 414 | <Global> for the above example). Once you think you |
| 415 | understand what it does, test, play, break (if possible). |
| 416 | </P |
| 417 | ><P |
| 418 | > Then either submit a plain text update via the bug reporting |
| 419 | system or a patch against the docbook/sgml source (available |
| 420 | from CVS on sourceforge (Project: pdd) |
| 421 | </P |
| 422 | ></BLOCKQUOTE |
| 423 | ></DIV |
| 424 | ></DIV |
| 425 | ><DIV |
| 426 | CLASS="QANDAENTRY" |
| 427 | ><DIV |
| 428 | CLASS="QUESTION" |
| 429 | ><P |
| 430 | ><A |
| 431 | NAME="AEN89" |
| 432 | ></A |
| 433 | ><B |
| 434 | >5. </B |
| 435 | >Bug reporting</P |
| 436 | ></DIV |
| 437 | ><DIV |
| 438 | CLASS="ANSWER" |
| 439 | ><P |
| 440 | ><B |
| 441 | > </B |
| 442 | >Bug reports should be made via <A |
| 443 | HREF="http://bugs.proftpd.org/" |
| 444 | TARGET="_top" |
| 445 | >http://bugs.proftpd.org/</A |
| 446 | > |
| 447 | which uses the bugzilla tracking system. Patches should be |
| 448 | attached to the appropriate bug and not mailed directly to |
| 449 | the mailing lists or any given team member.</P |
| 450 | ></DIV |
| 451 | ></DIV |
| 452 | ><DIV |
| 453 | CLASS="QANDAENTRY" |
| 454 | ><DIV |
| 455 | CLASS="QUESTION" |
| 456 | ><P |
| 457 | ><A |
| 458 | NAME="AEN95" |
| 459 | ></A |
| 460 | ><B |
| 461 | >6. </B |
| 462 | >I've found a security hole</P |
| 463 | ></DIV |
| 464 | ><DIV |
| 465 | CLASS="ANSWER" |
| 466 | ><P |
| 467 | ><B |
| 468 | > </B |
| 469 | >Please report all security problems with the code to |
| 470 | <TT |
| 471 | CLASS="EMAIL" |
| 472 | ><<A |
| 473 | HREF="mailto:[email protected]" |
| 474 | >[email protected]</A |
| 475 | >></TT |
| 476 | > before releasing the information into the public |
| 477 | domain. It would be appreciated if you give the core team a few days |
| 478 | to put together a patch and/or new release to address the issue.</P |
| 479 | ><P |
| 480 | >Please adhere to the proceedures and timescales given in the RF |
| 481 | Policy document <A |
| 482 | HREF="http://www.wiretrip.net/rfp/policy.html" |
| 483 | TARGET="_top" |
| 484 | >http://www.wiretrip.net/rfp/policy.html</A |
| 485 | >, this will give the core development team a chance to get a fix or workaround in place before the problem becomes fully public domain.</P |
| 486 | ></DIV |
| 487 | ></DIV |
| 488 | ><DIV |
| 489 | CLASS="QANDAENTRY" |
| 490 | ><DIV |
| 491 | CLASS="QUESTION" |
| 492 | ><P |
| 493 | ><A |
| 494 | NAME="AEN103" |
| 495 | ></A |
| 496 | ><B |
| 497 | >7. </B |
| 498 | >Downloading</P |
| 499 | ></DIV |
| 500 | ><DIV |
| 501 | CLASS="ANSWER" |
| 502 | ><P |
| 503 | ><B |
| 504 | > </B |
| 505 | >There are two main methods of getting the software. Downloading a |
| 506 | compressed tarball or rpm (there is also a Debian package available in the main distribution) from proftpd.org or from a mirror site, alternatively if you wish to run the latest bleeding edge code then collecting from the cvs server is the best method.</P |
| 507 | ><A |
| 508 | NAME="AEN107" |
| 509 | ></A |
| 510 | ><BLOCKQUOTE |
| 511 | CLASS="BLOCKQUOTE" |
| 512 | ><H3 |
| 513 | CLASS="BRIDGEHEAD" |
| 514 | ><A |
| 515 | NAME="AEN108" |
| 516 | ></A |
| 517 | >Mirror sites</H3 |
| 518 | ><P |
| 519 | >There is a complete and maintained list of ftp mirror sites available |
| 520 | from <A |
| 521 | HREF="http://www.proftpd.org/download.html" |
| 522 | TARGET="_top" |
| 523 | >http://www.proftpd.org/download.html</A |
| 524 | ></P |
| 525 | ><H3 |
| 526 | CLASS="BRIDGEHEAD" |
| 527 | ><A |
| 528 | NAME="AEN111" |
| 529 | ></A |
| 530 | >CVS</H3 |
| 531 | ><P |
| 532 | > cvs -d :pserver:[email protected]:/cvsroot/proftp |
| 533 | login (Hit Enter when prompted for a password.)</P |
| 534 | ><P |
| 535 | >Then do:</P |
| 536 | ><P |
| 537 | >cvs -d :pserver:[email protected]:/cvsroot/proftp -z3 co proftpd</P |
| 538 | ><P |
| 539 | >To obtain the latest/greatest updates, just hop into the |
| 540 | proftpd directory and do: cvs update</P |
| 541 | ><P |
| 542 | >A couple of sites generate downloadable tarballs of the latest CVS |
| 543 | code to make obtaining the test code easier.</P |
| 544 | ></BLOCKQUOTE |
| 545 | ></DIV |
| 546 | ></DIV |
| 547 | ><DIV |
| 548 | CLASS="QANDAENTRY" |
| 549 | ><DIV |
| 550 | CLASS="QUESTION" |
| 551 | ><P |
| 552 | ><A |
| 553 | NAME="AEN118" |
| 554 | ></A |
| 555 | ><B |
| 556 | >8. </B |
| 557 | >Mailing lists</P |
| 558 | ></DIV |
| 559 | ><DIV |
| 560 | CLASS="ANSWER" |
| 561 | ><P |
| 562 | ><B |
| 563 | > </B |
| 564 | >There are a number of mailing lists for ProFTPD</P |
| 565 | ><A |
| 566 | NAME="AEN122" |
| 567 | ></A |
| 568 | ><BLOCKQUOTE |
| 569 | CLASS="BLOCKQUOTE" |
| 570 | ><H3 |
| 571 | CLASS="BRIDGEHEAD" |
| 572 | ><A |
| 573 | NAME="AEN123" |
| 574 | ></A |
| 575 | >Announce</H3 |
| 576 | ><P |
| 577 | >[email protected]</P |
| 578 | ><P |
| 579 | >This is a very low traffic list where only ProFTPD announcements/changes |
| 580 | will be announced. Subscribe by sending a message to <TT |
| 581 | CLASS="EMAIL" |
| 582 | ><<A |
| 583 | HREF="mailto:[email protected]" |
| 584 | >[email protected]</A |
| 585 | >></TT |
| 586 | > with |
| 587 | "subscribe" in the subject.</P |
| 588 | ><P |
| 589 | >Web interface: |
| 590 | <A |
| 591 | HREF="https://lists.sourceforge.net/lists/listinfo/proftp-announce" |
| 592 | TARGET="_top" |
| 593 | > https://lists.sourceforge.net/lists/listinfo/proftp-announce |
| 594 | </A |
| 595 | > |
| 596 | </P |
| 597 | ><H3 |
| 598 | CLASS="BRIDGEHEAD" |
| 599 | ><A |
| 600 | NAME="AEN129" |
| 601 | ></A |
| 602 | >Users</H3 |
| 603 | ><P |
| 604 | >[email protected]</P |
| 605 | ><P |
| 606 | >This is intended to the the user support channel for the software, |
| 607 | in most likelihood this is going to be a high traffic list and |
| 608 | slightly chatty. Please read the FAQ, the documentation and the list |
| 609 | archives before posting a question.</P |
| 610 | ><P |
| 611 | >Subscribe by sending a message to <TT |
| 612 | CLASS="EMAIL" |
| 613 | ><<A |
| 614 | HREF="mailto:[email protected]" |
| 615 | >[email protected]</A |
| 616 | >></TT |
| 617 | > with |
| 618 | "subscribe" in the subject.</P |
| 619 | ><P |
| 620 | >Web interface: <A |
| 621 | HREF="https://lists.sourceforge.net/lists/listinfo/proftp-user" |
| 622 | TARGET="_top" |
| 623 | >https://lists.sourceforge.net/lists/listinfo/proftp-user</A |
| 624 | ></P |
| 625 | ><H3 |
| 626 | CLASS="BRIDGEHEAD" |
| 627 | ><A |
| 628 | NAME="AEN136" |
| 629 | ></A |
| 630 | >Development</H3 |
| 631 | ><P |
| 632 | >[email protected]</P |
| 633 | ><P |
| 634 | >This list is intended for discussion of development-related issues |
| 635 | of ProFTPD, and feature design. It is NOT intended to be a "user |
| 636 | help" group.</P |
| 637 | ><P |
| 638 | >Subscribe by sending a message to <TT |
| 639 | CLASS="EMAIL" |
| 640 | ><<A |
| 641 | HREF="mailto:[email protected]" |
| 642 | >[email protected]</A |
| 643 | >></TT |
| 644 | > |
| 645 | with "subscribe" in the subject.</P |
| 646 | ><P |
| 647 | >Web interface: |
| 648 | <A |
| 649 | HREF="https://lists.sourceforge.net/lists/listinfo/proftp-devel" |
| 650 | TARGET="_top" |
| 651 | > https://lists.sourceforge.net/lists/listinfo/proftp-devel |
| 652 | </A |
| 653 | > |
| 654 | </P |
| 655 | ><H3 |
| 656 | CLASS="BRIDGEHEAD" |
| 657 | ><A |
| 658 | NAME="AEN143" |
| 659 | ></A |
| 660 | >Archives</H3 |
| 661 | ><P |
| 662 | >The mailing list archives can be found at:</P |
| 663 | ><P |
| 664 | ></P |
| 665 | ><UL |
| 666 | ><LI |
| 667 | ><P |
| 668 | ><A |
| 669 | HREF="http://www.proftpd.org/proftpd-announce-archive/" |
| 670 | TARGET="_top" |
| 671 | > http://www.proftpd.org/proftpd-announce-archive/</A |
| 672 | ></P |
| 673 | ></LI |
| 674 | ><LI |
| 675 | ><P |
| 676 | ><A |
| 677 | HREF="http://www.proftpd.org/proftpd-l-archive/" |
| 678 | TARGET="_top" |
| 679 | > http://www.proftpd.org/proftpd-l-archive/</A |
| 680 | ></P |
| 681 | ></LI |
| 682 | ><LI |
| 683 | ><P |
| 684 | ><A |
| 685 | HREF="http://www.proftpd.org/proftpd-devel-archive/" |
| 686 | TARGET="_top" |
| 687 | > http://www.proftpd.org/proftpd-devel-archive/</A |
| 688 | ></P |
| 689 | ></LI |
| 690 | ></UL |
| 691 | ><H3 |
| 692 | CLASS="BRIDGEHEAD" |
| 693 | ><A |
| 694 | NAME="AEN155" |
| 695 | ></A |
| 696 | >Unsubscribing</H3 |
| 697 | ><P |
| 698 | >Before posting to any of the lists or mailing the list admins |
| 699 | please try and remove yourself first. Either by emailing |
| 700 | <listname>[email protected] with the subject "unsubscribe" or |
| 701 | visiting the web interface and unsubscribing from there.</P |
| 702 | ><P |
| 703 | >I've (lost / never had) a password to the interface. Easy, |
| 704 | enter the address you are subscribed to the list as into the form and |
| 705 | hit the "email me my password" button.</P |
| 706 | ></BLOCKQUOTE |
| 707 | ></DIV |
| 708 | ></DIV |
| 709 | ><DIV |
| 710 | CLASS="QANDAENTRY" |
| 711 | ><DIV |
| 712 | CLASS="QUESTION" |
| 713 | ><P |
| 714 | ><A |
| 715 | NAME="AEN159" |
| 716 | ></A |
| 717 | ><B |
| 718 | >9. </B |
| 719 | >Copyright Issues</P |
| 720 | ></DIV |
| 721 | ><DIV |
| 722 | CLASS="ANSWER" |
| 723 | ><P |
| 724 | ><B |
| 725 | > </B |
| 726 | >The software is currently distributed under the GNU General Public License |
| 727 | (version 2 or later) as published by the Free Software Foundation. |
| 728 | Copyright is held by Public Flood Software.</P |
| 729 | ></DIV |
| 730 | ></DIV |
| 731 | ></DIV |
| 732 | ></DIV |
| 733 | ><DIV |
| 734 | CLASS="CHAPTER" |
| 735 | ><HR><H1 |
| 736 | ><A |
| 737 | NAME="AEN163" |
| 738 | ></A |
| 739 | >Chapter 2. Compilation and installing</H1 |
| 740 | ><DIV |
| 741 | CLASS="QANDASET" |
| 742 | ><DL |
| 743 | ><DT |
| 744 | >1. <A |
| 745 | HREF="#AEN167" |
| 746 | >What platforms will it compile on?</A |
| 747 | ></DT |
| 748 | ><DT |
| 749 | >2. <A |
| 750 | HREF="#AEN193" |
| 751 | >Why not libc5 on Linux?</A |
| 752 | ></DT |
| 753 | ><DT |
| 754 | >3. <A |
| 755 | HREF="#AEN198" |
| 756 | >CVS</A |
| 757 | ></DT |
| 758 | ><DT |
| 759 | >4. <A |
| 760 | HREF="#AEN210" |
| 761 | >How do I get debug output</A |
| 762 | ></DT |
| 763 | ><DT |
| 764 | >5. <A |
| 765 | HREF="#AEN217" |
| 766 | >Patches</A |
| 767 | ></DT |
| 768 | ><DT |
| 769 | >6. <A |
| 770 | HREF="#AEN224" |
| 771 | >Using non-default modules</A |
| 772 | ></DT |
| 773 | ><DT |
| 774 | >7. <A |
| 775 | HREF="#AEN230" |
| 776 | >Microsoft platform support</A |
| 777 | ></DT |
| 778 | ><DT |
| 779 | >8. <A |
| 780 | HREF="#AEN235" |
| 781 | >New features/modules</A |
| 782 | ></DT |
| 783 | ></DL |
| 784 | ><DIV |
| 785 | CLASS="QANDAENTRY" |
| 786 | ><DIV |
| 787 | CLASS="QUESTION" |
| 788 | ><P |
| 789 | ><A |
| 790 | NAME="AEN167" |
| 791 | ></A |
| 792 | ><B |
| 793 | >1. </B |
| 794 | >What platforms will it compile on?</P |
| 795 | ></DIV |
| 796 | ><DIV |
| 797 | CLASS="ANSWER" |
| 798 | ><P |
| 799 | ><B |
| 800 | > </B |
| 801 | >There have been reports of ProFTPD compiling on all the following |
| 802 | platforms (and versions).</P |
| 803 | ><P |
| 804 | ></P |
| 805 | ><UL |
| 806 | ><LI |
| 807 | ><P |
| 808 | >Linux 2.0.x & 2.2.x (glibc 2.x only) & 2.4.x</P |
| 809 | ></LI |
| 810 | ><LI |
| 811 | ><P |
| 812 | >BSDI 3.1 & 4.0</P |
| 813 | ></LI |
| 814 | ><LI |
| 815 | ><P |
| 816 | >IRIX 6.2, 6.3, 6.4, 6.5</P |
| 817 | ></LI |
| 818 | ><LI |
| 819 | ><P |
| 820 | >Solaris 2.5.1, 2.6, 2.7, 8 (Sparc)</P |
| 821 | ></LI |
| 822 | ><LI |
| 823 | ><P |
| 824 | >AIX 3.2 & 4.2</P |
| 825 | ></LI |
| 826 | ><LI |
| 827 | ><P |
| 828 | >OpenBSD 2.2/2.3</P |
| 829 | ></LI |
| 830 | ><LI |
| 831 | ><P |
| 832 | >FreeBSD 2.2.7</P |
| 833 | ></LI |
| 834 | ><LI |
| 835 | ><P |
| 836 | >Digital UNIX 4.0A</P |
| 837 | ></LI |
| 838 | ><LI |
| 839 | ><P |
| 840 | >DEC OFS/1</P |
| 841 | ></LI |
| 842 | ><LI |
| 843 | ><P |
| 844 | >Cygwin</P |
| 845 | ></LI |
| 846 | ></UL |
| 847 | ></DIV |
| 848 | ></DIV |
| 849 | ><DIV |
| 850 | CLASS="QANDAENTRY" |
| 851 | ><DIV |
| 852 | CLASS="QUESTION" |
| 853 | ><P |
| 854 | ><A |
| 855 | NAME="AEN193" |
| 856 | ></A |
| 857 | ><B |
| 858 | >2. </B |
| 859 | >Why not libc5 on Linux?</P |
| 860 | ></DIV |
| 861 | ><DIV |
| 862 | CLASS="ANSWER" |
| 863 | ><P |
| 864 | ><B |
| 865 | > </B |
| 866 | >There are several known problems with libc5-based |
| 867 | systems, including improperly implemented library routines |
| 868 | (vsprintf and vsnprintf are examples). There are known |
| 869 | problems with the resolver library. For these reasons |
| 870 | and others lib5 is not being supported at all, the latest |
| 871 | versions of the major distributions (inc Debian, Redhat and |
| 872 | Suse) are all glibc. </P |
| 873 | ></DIV |
| 874 | ></DIV |
| 875 | ><DIV |
| 876 | CLASS="QANDAENTRY" |
| 877 | ><DIV |
| 878 | CLASS="QUESTION" |
| 879 | ><P |
| 880 | ><A |
| 881 | NAME="AEN198" |
| 882 | ></A |
| 883 | ><B |
| 884 | >3. </B |
| 885 | >CVS</P |
| 886 | ></DIV |
| 887 | ><DIV |
| 888 | CLASS="ANSWER" |
| 889 | ><P |
| 890 | ><B |
| 891 | > </B |
| 892 | >CVS (Concurrent Versions System), is a version control system which |
| 893 | allows multiple developers (scattered across the same room or across |
| 894 | the world) to maintain a single codebase and keep a record of all |
| 895 | changes to the work.</P |
| 896 | ><P |
| 897 | >The CVS repository for ProFTPD is available for non-developers in |
| 898 | read-only mode, however this code is right on the bleeding edge and is |
| 899 | not guaranteed to even compile let alone work. Access to CVS is given |
| 900 | to allow important security patches out into the wild and to allow |
| 901 | users and interested users to test out the latest changes on real |
| 902 | systems. </P |
| 903 | ><P |
| 904 | >Nightly tarballs of the current CVS are available on |
| 905 | ftp.proftpd.org, these are built at approx 1am UK time.</P |
| 906 | ><A |
| 907 | NAME="AEN204" |
| 908 | ></A |
| 909 | ><BLOCKQUOTE |
| 910 | CLASS="BLOCKQUOTE" |
| 911 | ><H3 |
| 912 | CLASS="BRIDGEHEAD" |
| 913 | ><A |
| 914 | NAME="AEN205" |
| 915 | ></A |
| 916 | >Recommended ~/.cvsrc settings</H3 |
| 917 | ><PRE |
| 918 | CLASS="PROGRAMLISTING" |
| 919 | >cvs -z 3 |
| 920 | update -Pd |
| 921 | diff -u |
| 922 | </PRE |
| 923 | ><H3 |
| 924 | CLASS="BRIDGEHEAD" |
| 925 | ><A |
| 926 | NAME="AEN207" |
| 927 | ></A |
| 928 | >Where can I get information on cvs?</H3 |
| 929 | ><P |
| 930 | >CVS is produced by Cyclic Software (http://www.cyclic.com/) and |
| 931 | details on CVS can be found on their website. The CVS documentation |
| 932 | is clear, detailed and above all heavy when printed. I'd recommend |
| 933 | reading it if you're planning on using CVS a lot.</P |
| 934 | ></BLOCKQUOTE |
| 935 | ></DIV |
| 936 | ></DIV |
| 937 | ><DIV |
| 938 | CLASS="QANDAENTRY" |
| 939 | ><DIV |
| 940 | CLASS="QUESTION" |
| 941 | ><P |
| 942 | ><A |
| 943 | NAME="AEN210" |
| 944 | ></A |
| 945 | ><B |
| 946 | >4. </B |
| 947 | >How do I get debug output</P |
| 948 | ></DIV |
| 949 | ><DIV |
| 950 | CLASS="ANSWER" |
| 951 | ><P |
| 952 | ><B |
| 953 | > </B |
| 954 | >The easiest way is to fire up proftpd manually from the command |
| 955 | line with the debug level cranked up.</P |
| 956 | ><PRE |
| 957 | CLASS="PROGRAMLISTING" |
| 958 | >/usr/local/sbin/proftpd -d9 -n |
| 959 | </PRE |
| 960 | ><P |
| 961 | >This will result in maximal debug output direct to the |
| 962 | console. Warning, this can get messy on a busy server, for testing I |
| 963 | would suggest copying the config and altering the port the server |
| 964 | binds to and then testing.</P |
| 965 | ></DIV |
| 966 | ></DIV |
| 967 | ><DIV |
| 968 | CLASS="QANDAENTRY" |
| 969 | ><DIV |
| 970 | CLASS="QUESTION" |
| 971 | ><P |
| 972 | ><A |
| 973 | NAME="AEN217" |
| 974 | ></A |
| 975 | ><B |
| 976 | >5. </B |
| 977 | >Patches</P |
| 978 | ></DIV |
| 979 | ><DIV |
| 980 | CLASS="ANSWER" |
| 981 | ><P |
| 982 | ><B |
| 983 | > </B |
| 984 | >Any patches should be submitted in Universal format, this makes |
| 985 | integrating them into the main cvs source a lot easier. When |
| 986 | generating a diff against the current cvs source use "cvs diff -uw" to |
| 987 | generate the patch.</P |
| 988 | ><PRE |
| 989 | CLASS="PROGRAMLISTING" |
| 990 | >cvs diff -u filename > filename.patch |
| 991 | |
| 992 | or |
| 993 | |
| 994 | cvs diff -u > bigger.patch |
| 995 | </PRE |
| 996 | ><P |
| 997 | >Patches that add configuration directives without proper |
| 998 | documentation. Will be rejected. New features without documentation |
| 999 | are less than useless to the community at large.</P |
| 1000 | ></DIV |
| 1001 | ></DIV |
| 1002 | ><DIV |
| 1003 | CLASS="QANDAENTRY" |
| 1004 | ><DIV |
| 1005 | CLASS="QUESTION" |
| 1006 | ><P |
| 1007 | ><A |
| 1008 | NAME="AEN224" |
| 1009 | ></A |
| 1010 | ><B |
| 1011 | >6. </B |
| 1012 | >Using non-default modules</P |
| 1013 | ></DIV |
| 1014 | ><DIV |
| 1015 | CLASS="ANSWER" |
| 1016 | ><P |
| 1017 | ><B |
| 1018 | > </B |
| 1019 | >Simply configure ProFTPD with </P |
| 1020 | ><PRE |
| 1021 | CLASS="PROGRAMLISTING" |
| 1022 | >./configure --with-modules=mod_module1:mod_module2:mod_module3 |
| 1023 | make |
| 1024 | make install |
| 1025 | </PRE |
| 1026 | ></DIV |
| 1027 | ></DIV |
| 1028 | ><DIV |
| 1029 | CLASS="QANDAENTRY" |
| 1030 | ><DIV |
| 1031 | CLASS="QUESTION" |
| 1032 | ><P |
| 1033 | ><A |
| 1034 | NAME="AEN230" |
| 1035 | ></A |
| 1036 | ><B |
| 1037 | >7. </B |
| 1038 | >Microsoft platform support</P |
| 1039 | ></DIV |
| 1040 | ><DIV |
| 1041 | CLASS="ANSWER" |
| 1042 | ><P |
| 1043 | ><B |
| 1044 | > </B |
| 1045 | >There are no current plans for a direct port to any MS platform.</P |
| 1046 | ></DIV |
| 1047 | ></DIV |
| 1048 | ><DIV |
| 1049 | CLASS="QANDAENTRY" |
| 1050 | ><DIV |
| 1051 | CLASS="QUESTION" |
| 1052 | ><P |
| 1053 | ><A |
| 1054 | NAME="AEN235" |
| 1055 | ></A |
| 1056 | ><B |
| 1057 | >8. </B |
| 1058 | >New features/modules</P |
| 1059 | ></DIV |
| 1060 | ><DIV |
| 1061 | CLASS="ANSWER" |
| 1062 | ><P |
| 1063 | ><B |
| 1064 | > </B |
| 1065 | >While anything new is welcomed it's probably better |
| 1066 | to at least float the idea first on the devel mailing list |
| 1067 | to ensure that someone else isn't already hacking on it. |
| 1068 | Also when submitting the patch or module for inclusion into |
| 1069 | the ProFTPD source full documentation is needed.</P |
| 1070 | ></DIV |
| 1071 | ></DIV |
| 1072 | ></DIV |
| 1073 | ></DIV |
| 1074 | ><DIV |
| 1075 | CLASS="CHAPTER" |
| 1076 | ><HR><H1 |
| 1077 | ><A |
| 1078 | NAME="AEN239" |
| 1079 | ></A |
| 1080 | >Chapter 3. Compatibility and Integration</H1 |
| 1081 | ><DIV |
| 1082 | CLASS="QANDASET" |
| 1083 | ><DL |
| 1084 | ><DT |
| 1085 | >1. <A |
| 1086 | HREF="#AEN243" |
| 1087 | >SQL</A |
| 1088 | ></DT |
| 1089 | ><DT |
| 1090 | >2. <A |
| 1091 | HREF="#AEN248" |
| 1092 | >SSH</A |
| 1093 | ></DT |
| 1094 | ><DT |
| 1095 | >3. <A |
| 1096 | HREF="#AEN254" |
| 1097 | >sendfile()</A |
| 1098 | ></DT |
| 1099 | ><DT |
| 1100 | >4. <A |
| 1101 | HREF="#AEN270" |
| 1102 | >IPv6</A |
| 1103 | ></DT |
| 1104 | ><DT |
| 1105 | >5. <A |
| 1106 | HREF="#AEN276" |
| 1107 | >Filename case sensitivity</A |
| 1108 | ></DT |
| 1109 | ><DT |
| 1110 | >6. <A |
| 1111 | HREF="#AEN281" |
| 1112 | >FXP</A |
| 1113 | ></DT |
| 1114 | ></DL |
| 1115 | ><DIV |
| 1116 | CLASS="QANDAENTRY" |
| 1117 | ><DIV |
| 1118 | CLASS="QUESTION" |
| 1119 | ><P |
| 1120 | ><A |
| 1121 | NAME="AEN243" |
| 1122 | ></A |
| 1123 | ><B |
| 1124 | >1. </B |
| 1125 | >SQL</P |
| 1126 | ></DIV |
| 1127 | ><DIV |
| 1128 | CLASS="ANSWER" |
| 1129 | ><P |
| 1130 | ><B |
| 1131 | > </B |
| 1132 | >ProFTPD has support for authentication and logging via SQL |
| 1133 | databases using the mod_sql module as supplied in the main |
| 1134 | distribution.</P |
| 1135 | ></DIV |
| 1136 | ></DIV |
| 1137 | ><DIV |
| 1138 | CLASS="QANDAENTRY" |
| 1139 | ><DIV |
| 1140 | CLASS="QUESTION" |
| 1141 | ><P |
| 1142 | ><A |
| 1143 | NAME="AEN248" |
| 1144 | ></A |
| 1145 | ><B |
| 1146 | >2. </B |
| 1147 | >SSH</P |
| 1148 | ></DIV |
| 1149 | ><DIV |
| 1150 | CLASS="ANSWER" |
| 1151 | ><P |
| 1152 | ><B |
| 1153 | > </B |
| 1154 | >There is a mini-HOWTO at <A |
| 1155 | HREF="http://www.castaglia.org/proftpd/doc/" |
| 1156 | TARGET="_top" |
| 1157 | >http://www.castaglia.org/proftpd/doc/</A |
| 1158 | > detailing how to tunnel ftp connections over ssh.</P |
| 1159 | ></DIV |
| 1160 | ></DIV |
| 1161 | ><DIV |
| 1162 | CLASS="QANDAENTRY" |
| 1163 | ><DIV |
| 1164 | CLASS="QUESTION" |
| 1165 | ><P |
| 1166 | ><A |
| 1167 | NAME="AEN254" |
| 1168 | ></A |
| 1169 | ><B |
| 1170 | >3. </B |
| 1171 | >sendfile()</P |
| 1172 | ></DIV |
| 1173 | ><DIV |
| 1174 | CLASS="ANSWER" |
| 1175 | ><P |
| 1176 | ><B |
| 1177 | > </B |
| 1178 | >sendfile() is a system call which streamlines the copying of data |
| 1179 | between the disk and the tcp socket. The call copied from the page |
| 1180 | cache directly rather than requiring a kernel -> user space -> kernel |
| 1181 | space copy for every read() and write() call. Generally the |
| 1182 | advantages are only felt on heavily loaded servers. The call is |
| 1183 | supported in ProFTPD for Linux and FreeBSD.</P |
| 1184 | ><A |
| 1185 | NAME="AEN258" |
| 1186 | ></A |
| 1187 | ><BLOCKQUOTE |
| 1188 | CLASS="BLOCKQUOTE" |
| 1189 | ><H3 |
| 1190 | CLASS="BRIDGEHEAD" |
| 1191 | ><A |
| 1192 | NAME="AEN259" |
| 1193 | ></A |
| 1194 | >Linux 2.0.x</H3 |
| 1195 | ><P |
| 1196 | >sendfile is not supported under 2.0.x, this is not an issue when |
| 1197 | compiling for 2.0.x on a 2.0.x system. However when compiling on a |
| 1198 | 2.2.x system for use on 2.0.x use the --disable-sendfile flag.</P |
| 1199 | ><H3 |
| 1200 | CLASS="BRIDGEHEAD" |
| 1201 | ><A |
| 1202 | NAME="AEN261" |
| 1203 | ></A |
| 1204 | >Runtime detection of sendfile()</H3 |
| 1205 | ><P |
| 1206 | >Johnie Ingram (aka netgod)'s: |
| 1207 | <A |
| 1208 | HREF="http://www.proftpd.org/proftpd-devel-archive/99-10/msg00073.html" |
| 1209 | TARGET="_top" |
| 1210 | >http://www.proftpd.org/proftpd-devel-archive/99-10/msg00073.html</A |
| 1211 | ></P |
| 1212 | ><P |
| 1213 | >John Pierce <[email protected]> |
| 1214 | <A |
| 1215 | HREF="http://www.proftpd.org/proftpd-devel-archive/99-10/msg00112.html" |
| 1216 | TARGET="_top" |
| 1217 | >http://www.proftpd.org/proftpd-devel-archive/99-10/msg00112.html</A |
| 1218 | ></P |
| 1219 | ><H3 |
| 1220 | CLASS="BRIDGEHEAD" |
| 1221 | ><A |
| 1222 | NAME="AEN266" |
| 1223 | ></A |
| 1224 | >Problems with sendfile</H3 |
| 1225 | ><P |
| 1226 | >There appear to be a number of problems with sendfile() |
| 1227 | particularly with the directives and features which require accurate |
| 1228 | determination of filesize. Such as the Rate* functions and |
| 1229 | downloading large files, the best advice at the moment appears to be |
| 1230 | to disable sendfile by default ( --disable-sendfile ).</P |
| 1231 | ><P |
| 1232 | >Sendfile() also appears to be the source of a number of file corruption problems.</P |
| 1233 | ></BLOCKQUOTE |
| 1234 | ></DIV |
| 1235 | ></DIV |
| 1236 | ><DIV |
| 1237 | CLASS="QANDAENTRY" |
| 1238 | ><DIV |
| 1239 | CLASS="QUESTION" |
| 1240 | ><P |
| 1241 | ><A |
| 1242 | NAME="AEN270" |
| 1243 | ></A |
| 1244 | ><B |
| 1245 | >4. </B |
| 1246 | >IPv6</P |
| 1247 | ></DIV |
| 1248 | ><DIV |
| 1249 | CLASS="ANSWER" |
| 1250 | ><P |
| 1251 | ><B |
| 1252 | > </B |
| 1253 | >There is currently no official support for IPv6 within the 1.2.x |
| 1254 | code tree, however there is an <A |
| 1255 | HREF="http://www.t17.ds.pwr.wroc.pl/~misiek/ipv6/" |
| 1256 | TARGET="_top" |
| 1257 | >http://www.t17.ds.pwr.wroc.pl/~misiek/ipv6/</A |
| 1258 | > and more comprehensive support will probably be developed |
| 1259 | during the 1.3.x development cycle.</P |
| 1260 | ></DIV |
| 1261 | ></DIV |
| 1262 | ><DIV |
| 1263 | CLASS="QANDAENTRY" |
| 1264 | ><DIV |
| 1265 | CLASS="QUESTION" |
| 1266 | ><P |
| 1267 | ><A |
| 1268 | NAME="AEN276" |
| 1269 | ></A |
| 1270 | ><B |
| 1271 | >5. </B |
| 1272 | >Filename case sensitivity</P |
| 1273 | ></DIV |
| 1274 | ><DIV |
| 1275 | CLASS="ANSWER" |
| 1276 | ><P |
| 1277 | ><B |
| 1278 | > </B |
| 1279 | >ProFTPD is utterly dependant on the underlying OS to handle |
| 1280 | filename case sensitivity. If the underlying OS is case sensitive |
| 1281 | then ProFTPD will be, there are currently no plans for a module to |
| 1282 | handle this.</P |
| 1283 | ></DIV |
| 1284 | ></DIV |
| 1285 | ><DIV |
| 1286 | CLASS="QANDAENTRY" |
| 1287 | ><DIV |
| 1288 | CLASS="QUESTION" |
| 1289 | ><P |
| 1290 | ><A |
| 1291 | NAME="AEN281" |
| 1292 | ></A |
| 1293 | ><B |
| 1294 | >6. </B |
| 1295 | >FXP</P |
| 1296 | ></DIV |
| 1297 | ><DIV |
| 1298 | CLASS="ANSWER" |
| 1299 | ><P |
| 1300 | ><B |
| 1301 | > </B |
| 1302 | >FXP is capable of bouncing data between websites. There have been |
| 1303 | a number of reports of problems in configuring ProFTPD to function |
| 1304 | cleanly with this program (http://flashfxp.skuz.net/).</P |
| 1305 | ><P |
| 1306 | >To support FXP when connecting as a user place "AllowForeignAddress |
| 1307 | on" in the Global or VirtualHost context.</P |
| 1308 | ><P |
| 1309 | >To support FXP when connecting as anon "AllowForeignAddress on" |
| 1310 | must be placed in the Anonymous context.</P |
| 1311 | ><P |
| 1312 | >The config will happily support "AllowForeignAddress on" in |
| 1313 | multiple places within the config.</P |
| 1314 | ></DIV |
| 1315 | ></DIV |
| 1316 | ></DIV |
| 1317 | ></DIV |
| 1318 | ><DIV |
| 1319 | CLASS="CHAPTER" |
| 1320 | ><HR><H1 |
| 1321 | ><A |
| 1322 | NAME="AEN288" |
| 1323 | ></A |
| 1324 | >Chapter 4. Common Running problems</H1 |
| 1325 | ><DIV |
| 1326 | CLASS="QANDASET" |
| 1327 | ><DL |
| 1328 | ><DT |
| 1329 | >1. <A |
| 1330 | HREF="#AEN292" |
| 1331 | >ProFTPD doesn't seem to work.</A |
| 1332 | ></DT |
| 1333 | ><DT |
| 1334 | >2. <A |
| 1335 | HREF="#AEN325" |
| 1336 | >"inet_create_connection() failed: Operation not permitted".</A |
| 1337 | ></DT |
| 1338 | ><DT |
| 1339 | >3. <A |
| 1340 | HREF="#AEN330" |
| 1341 | >Unable to bind to port/Address already in use</A |
| 1342 | ></DT |
| 1343 | ><DT |
| 1344 | >4. <A |
| 1345 | HREF="#AEN339" |
| 1346 | >"(Login failed): Invalid shell"</A |
| 1347 | ></DT |
| 1348 | ><DT |
| 1349 | >5. <A |
| 1350 | HREF="#AEN345" |
| 1351 | >"Fatal: Socket operation on non-socket"</A |
| 1352 | ></DT |
| 1353 | ><DT |
| 1354 | >6. <A |
| 1355 | HREF="#AEN351" |
| 1356 | >"Fatal: unable to determine IP address of "hostname:</A |
| 1357 | ></DT |
| 1358 | ><DT |
| 1359 | >7. <A |
| 1360 | HREF="#AEN356" |
| 1361 | >I'm having problems with FTP clients behind firewalls</A |
| 1362 | ></DT |
| 1363 | ><DT |
| 1364 | >8. <A |
| 1365 | HREF="#AEN367" |
| 1366 | >Can I run more that one VirtualHost on a single IP?</A |
| 1367 | ></DT |
| 1368 | ><DT |
| 1369 | >9. <A |
| 1370 | HREF="#AEN377" |
| 1371 | >How do I run ProFTPD from inetd?</A |
| 1372 | ></DT |
| 1373 | ><DT |
| 1374 | >10. <A |
| 1375 | HREF="#AEN388" |
| 1376 | >Can I use tcp-wrappers with ProFTPD?</A |
| 1377 | ></DT |
| 1378 | ><DT |
| 1379 | >11. <A |
| 1380 | HREF="#AEN394" |
| 1381 | >Can I run an FTP server on a non-standard port?</A |
| 1382 | ></DT |
| 1383 | ><DT |
| 1384 | >12. <A |
| 1385 | HREF="#AEN400" |
| 1386 | >Can control upload/download ratios?</A |
| 1387 | ></DT |
| 1388 | ><DT |
| 1389 | >13. <A |
| 1390 | HREF="#AEN413" |
| 1391 | >Slow logins</A |
| 1392 | ></DT |
| 1393 | ><DT |
| 1394 | >14. <A |
| 1395 | HREF="#AEN420" |
| 1396 | >Lots of "FTP session closed" messages</A |
| 1397 | ></DT |
| 1398 | ><DT |
| 1399 | >15. <A |
| 1400 | HREF="#AEN427" |
| 1401 | >How do I see who is connected?</A |
| 1402 | ></DT |
| 1403 | ><DT |
| 1404 | >16. <A |
| 1405 | HREF="#AEN432" |
| 1406 | >Can I force ProFTPD to listen on only one IP?</A |
| 1407 | ></DT |
| 1408 | ><DT |
| 1409 | >17. <A |
| 1410 | HREF="#AEN445" |
| 1411 | >"FTP server shut down ... please try again later."</A |
| 1412 | ></DT |
| 1413 | ><DT |
| 1414 | >18. <A |
| 1415 | HREF="#AEN450" |
| 1416 | >How do I shutdown the server without killing proftpd?</A |
| 1417 | ></DT |
| 1418 | ><DT |
| 1419 | >19. <A |
| 1420 | HREF="#AEN455" |
| 1421 | >Is is possible to shutdown a single VirtualHost?</A |
| 1422 | ></DT |
| 1423 | ><DT |
| 1424 | >20. <A |
| 1425 | HREF="#AEN460" |
| 1426 | >Error 421</A |
| 1427 | ></DT |
| 1428 | ><DT |
| 1429 | >21. <A |
| 1430 | HREF="#AEN477" |
| 1431 | >proftpd doesn't show in the processlist</A |
| 1432 | ></DT |
| 1433 | ><DT |
| 1434 | >22. <A |
| 1435 | HREF="#AEN482" |
| 1436 | >How do I restart/reload the server?</A |
| 1437 | ></DT |
| 1438 | ><DT |
| 1439 | >23. <A |
| 1440 | HREF="#AEN492" |
| 1441 | >503 No PORT command issued</A |
| 1442 | ></DT |
| 1443 | ><DT |
| 1444 | >24. <A |
| 1445 | HREF="#AEN497" |
| 1446 | >Fatal: unable to determine IP address of</A |
| 1447 | ></DT |
| 1448 | ><DT |
| 1449 | >25. <A |
| 1450 | HREF="#AEN502" |
| 1451 | >451 append/restart not permitted, try again</A |
| 1452 | ></DT |
| 1453 | ><DT |
| 1454 | >26. <A |
| 1455 | HREF="#AEN507" |
| 1456 | >501 REST not compatible with server configuration</A |
| 1457 | ></DT |
| 1458 | ><DT |
| 1459 | >27. <A |
| 1460 | HREF="#AEN512" |
| 1461 | >The time being displayed is wrong</A |
| 1462 | ></DT |
| 1463 | ><DT |
| 1464 | >28. <A |
| 1465 | HREF="#AEN518" |
| 1466 | >Authentication is taking too long</A |
| 1467 | ></DT |
| 1468 | ><DT |
| 1469 | >29. <A |
| 1470 | HREF="#AEN523" |
| 1471 | >Corrupted files</A |
| 1472 | ></DT |
| 1473 | ><DT |
| 1474 | >30. <A |
| 1475 | HREF="#AEN528" |
| 1476 | >Can I upgrade ProFTPD without terminating the current sessions?</A |
| 1477 | ></DT |
| 1478 | ><DT |
| 1479 | >31. <A |
| 1480 | HREF="#AEN533" |
| 1481 | >No such group "nogroup"</A |
| 1482 | ></DT |
| 1483 | ><DT |
| 1484 | >32. <A |
| 1485 | HREF="#AEN538" |
| 1486 | >Why do I see "unable to set groups: Invalid argument"? </A |
| 1487 | ></DT |
| 1488 | ><DT |
| 1489 | >33. <A |
| 1490 | HREF="#AEN547" |
| 1491 | >Why do I see error messages like these when I logout?</A |
| 1492 | ></DT |
| 1493 | ></DL |
| 1494 | ><DIV |
| 1495 | CLASS="QANDAENTRY" |
| 1496 | ><DIV |
| 1497 | CLASS="QUESTION" |
| 1498 | ><P |
| 1499 | ><A |
| 1500 | NAME="AEN292" |
| 1501 | ></A |
| 1502 | ><B |
| 1503 | >1. </B |
| 1504 | >ProFTPD doesn't seem to work.</P |
| 1505 | ></DIV |
| 1506 | ><DIV |
| 1507 | CLASS="ANSWER" |
| 1508 | ><P |
| 1509 | ><B |
| 1510 | > </B |
| 1511 | >Starting ProFTPD in standalone mode it doesn't show in "ps" It |
| 1512 | could be many things, possibly something like not running ProFTPD as |
| 1513 | root (it needs to be run as root initially, but will switch to a |
| 1514 | non-privileged user). Regardless, ProFTPD logs all errors via the |
| 1515 | standard syslog mechanism. You need to check your system logs in order |
| 1516 | to determine what the problem is.</P |
| 1517 | ><A |
| 1518 | NAME="AEN296" |
| 1519 | ></A |
| 1520 | ><BLOCKQUOTE |
| 1521 | CLASS="BLOCKQUOTE" |
| 1522 | ><H3 |
| 1523 | CLASS="BRIDGEHEAD" |
| 1524 | ><A |
| 1525 | NAME="AEN297" |
| 1526 | ></A |
| 1527 | >It doesn't work!</H3 |
| 1528 | ><P |
| 1529 | >There are many times when there's a completely random problem which |
| 1530 | appears to be insoluble. The best place to ask for help is definately |
| 1531 | the mailing list (proftpd-l) but it's not productive to ask for help |
| 1532 | without giving enough information for intelligent debugging.</P |
| 1533 | ><P |
| 1534 | >Have you?</P |
| 1535 | ><P |
| 1536 | ></P |
| 1537 | ><UL |
| 1538 | ><LI |
| 1539 | ><P |
| 1540 | >Checked your logs</P |
| 1541 | ></LI |
| 1542 | ><LI |
| 1543 | ><P |
| 1544 | >Tried the server in debug mode</P |
| 1545 | ></LI |
| 1546 | ><LI |
| 1547 | ><P |
| 1548 | >Read the FAQ?</P |
| 1549 | ></LI |
| 1550 | ><LI |
| 1551 | ><P |
| 1552 | >Checked the mailing list archive?</P |
| 1553 | ></LI |
| 1554 | ><LI |
| 1555 | ><P |
| 1556 | >Are you running the latest version?</P |
| 1557 | ></LI |
| 1558 | ></UL |
| 1559 | ></BLOCKQUOTE |
| 1560 | ></DIV |
| 1561 | ><DIV |
| 1562 | CLASS="ANSWER" |
| 1563 | ><P |
| 1564 | ><B |
| 1565 | > </B |
| 1566 | >When posting try giving enough information, this might include but |
| 1567 | not be limited to.</P |
| 1568 | ><P |
| 1569 | ></P |
| 1570 | ><UL |
| 1571 | ><LI |
| 1572 | ><P |
| 1573 | >OS and server version (proftpd -vv)</P |
| 1574 | ></LI |
| 1575 | ><LI |
| 1576 | ><P |
| 1577 | >List of included modules (proftpd -l)</P |
| 1578 | ></LI |
| 1579 | ><LI |
| 1580 | ><P |
| 1581 | >Appropriate log extracts</P |
| 1582 | ></LI |
| 1583 | ><LI |
| 1584 | ><P |
| 1585 | >Output fom debug mode</P |
| 1586 | ></LI |
| 1587 | ><LI |
| 1588 | ><P |
| 1589 | >Configration fragment</P |
| 1590 | ></LI |
| 1591 | ></UL |
| 1592 | ></DIV |
| 1593 | ></DIV |
| 1594 | ><DIV |
| 1595 | CLASS="QANDAENTRY" |
| 1596 | ><DIV |
| 1597 | CLASS="QUESTION" |
| 1598 | ><P |
| 1599 | ><A |
| 1600 | NAME="AEN325" |
| 1601 | ></A |
| 1602 | ><B |
| 1603 | >2. </B |
| 1604 | >"inet_create_connection() failed: Operation not permitted".</P |
| 1605 | ></DIV |
| 1606 | ><DIV |
| 1607 | CLASS="ANSWER" |
| 1608 | ><P |
| 1609 | ><B |
| 1610 | > </B |
| 1611 | >You aren't starting ProFTPD as root, or you have inetd configured |
| 1612 | to run ProFTPD as a user other than root. The ProFTPD daemon must be |
| 1613 | started as root in order to bind to tcp ports lower than 1024, or to |
| 1614 | open your shadow password file when authenticating users. The daemon |
| 1615 | switches uid/gids to the user and group specified by the User/Group |
| 1616 | directives during normal operation, so a "ps" will show it running as |
| 1617 | the user you specified.</P |
| 1618 | ></DIV |
| 1619 | ></DIV |
| 1620 | ><DIV |
| 1621 | CLASS="QANDAENTRY" |
| 1622 | ><DIV |
| 1623 | CLASS="QUESTION" |
| 1624 | ><P |
| 1625 | ><A |
| 1626 | NAME="AEN330" |
| 1627 | ></A |
| 1628 | ><B |
| 1629 | >3. </B |
| 1630 | >Unable to bind to port/Address already in use</P |
| 1631 | ></DIV |
| 1632 | ><DIV |
| 1633 | CLASS="ANSWER" |
| 1634 | ><P |
| 1635 | ><B |
| 1636 | > </B |
| 1637 | >0.0.0.0 is INADDR_ANY, which means to bind to any interface. The |
| 1638 | "address in use" will normally mean that something has already bound |
| 1639 | to that address.</P |
| 1640 | ><P |
| 1641 | >Under linux it is possible to run:</P |
| 1642 | ><PRE |
| 1643 | CLASS="PROGRAMLISTING" |
| 1644 | >fuser -n tcp 21 |
| 1645 | </PRE |
| 1646 | ><P |
| 1647 | >to get the PID of the process currently bound to port ProFTPD is |
| 1648 | configured to run as.</P |
| 1649 | ><P |
| 1650 | >The most common cause is that ProFTPD is configured standalone and |
| 1651 | inetd is still configured for port 21. Comment out the line starting |
| 1652 | "ftp" in /etc/inetd.conf and restart (killall -HUP inetd or something |
| 1653 | similar should do the trick) and try again. </P |
| 1654 | ></DIV |
| 1655 | ></DIV |
| 1656 | ><DIV |
| 1657 | CLASS="QANDAENTRY" |
| 1658 | ><DIV |
| 1659 | CLASS="QUESTION" |
| 1660 | ><P |
| 1661 | ><A |
| 1662 | NAME="AEN339" |
| 1663 | ></A |
| 1664 | ><B |
| 1665 | >4. </B |
| 1666 | >"(Login failed): Invalid shell"</P |
| 1667 | ></DIV |
| 1668 | ><DIV |
| 1669 | CLASS="ANSWER" |
| 1670 | ><P |
| 1671 | ><B |
| 1672 | > </B |
| 1673 | >The user attempting to login has been given a shell that is |
| 1674 | not listed in the system's /etc/shells file. By default, proftpd will require |
| 1675 | that users logging in have valid shells. Use the RequireValidShell directive |
| 1676 | to turn off this requirement:</P |
| 1677 | ><PRE |
| 1678 | CLASS="PROGRAMLISTING" |
| 1679 | >RequireValidShell off |
| 1680 | </PRE |
| 1681 | ></DIV |
| 1682 | ></DIV |
| 1683 | ><DIV |
| 1684 | CLASS="QANDAENTRY" |
| 1685 | ><DIV |
| 1686 | CLASS="QUESTION" |
| 1687 | ><P |
| 1688 | ><A |
| 1689 | NAME="AEN345" |
| 1690 | ></A |
| 1691 | ><B |
| 1692 | >5. </B |
| 1693 | >"Fatal: Socket operation on non-socket"</P |
| 1694 | ></DIV |
| 1695 | ><DIV |
| 1696 | CLASS="ANSWER" |
| 1697 | ><P |
| 1698 | ><B |
| 1699 | > </B |
| 1700 | >You have ProFTPD configured to run in inetd mode rather than |
| 1701 | standalone. In this mode, ProFTPD expects that it will be run from the |
| 1702 | inetd super-server, which implies that stdin/stdout will be sockets |
| 1703 | instead of terminals. As a result, socket operations will fail and the |
| 1704 | above error will be printed. If you wish to run ProFTPD from the |
| 1705 | shell, in standalone mode, you'll need to modify your proftpd.conf |
| 1706 | configuration file and add or edit the ServerType directive to read:</P |
| 1707 | ><PRE |
| 1708 | CLASS="PROGRAMLISTING" |
| 1709 | >ServerType standalone |
| 1710 | </PRE |
| 1711 | ></DIV |
| 1712 | ></DIV |
| 1713 | ><DIV |
| 1714 | CLASS="QANDAENTRY" |
| 1715 | ><DIV |
| 1716 | CLASS="QUESTION" |
| 1717 | ><P |
| 1718 | ><A |
| 1719 | NAME="AEN351" |
| 1720 | ></A |
| 1721 | ><B |
| 1722 | >6. </B |
| 1723 | >"Fatal: unable to determine IP address of "hostname:</P |
| 1724 | ></DIV |
| 1725 | ><DIV |
| 1726 | CLASS="ANSWER" |
| 1727 | ><P |
| 1728 | ><B |
| 1729 | > </B |
| 1730 | >The hosting machine has a poorly configured hostname setup to the |
| 1731 | point where the resolver library cannot determine the IP from the |
| 1732 | name. Solutions include, fixing the DNS for the domain, fixing the |
| 1733 | hostname, fixing the /etc/hosts file. Which one works for you will |
| 1734 | largely depend on your OS and exactly what is wrong.</P |
| 1735 | ></DIV |
| 1736 | ></DIV |
| 1737 | ><DIV |
| 1738 | CLASS="QANDAENTRY" |
| 1739 | ><DIV |
| 1740 | CLASS="QUESTION" |
| 1741 | ><P |
| 1742 | ><A |
| 1743 | NAME="AEN356" |
| 1744 | ></A |
| 1745 | ><B |
| 1746 | >7. </B |
| 1747 | >I'm having problems with FTP clients behind firewalls</P |
| 1748 | ></DIV |
| 1749 | ><DIV |
| 1750 | CLASS="ANSWER" |
| 1751 | ><P |
| 1752 | ><B |
| 1753 | > </B |
| 1754 | >The FTP Specification defines that two sockets should be used for |
| 1755 | all communications. The first runs over port 21 and is the control |
| 1756 | channel over which all commands and response codes are sent. Whenever |
| 1757 | data is required to be transfered, for example for a file download, a |
| 1758 | directory listing etc etc. A second channel is created on demand, |
| 1759 | this socket can take one of two forms.</P |
| 1760 | ><A |
| 1761 | NAME="AEN360" |
| 1762 | ></A |
| 1763 | ><BLOCKQUOTE |
| 1764 | CLASS="BLOCKQUOTE" |
| 1765 | ><H3 |
| 1766 | CLASS="BRIDGEHEAD" |
| 1767 | ><A |
| 1768 | NAME="AEN361" |
| 1769 | ></A |
| 1770 | >non-Passive</H3 |
| 1771 | ><P |
| 1772 | >The server end of the data socket uses port 20. This is nice and |
| 1773 | easy to work into a firewall configuration.</P |
| 1774 | ><H3 |
| 1775 | CLASS="BRIDGEHEAD" |
| 1776 | ><A |
| 1777 | NAME="AEN363" |
| 1778 | ></A |
| 1779 | >Passive</H3 |
| 1780 | ><P |
| 1781 | >The port at either end is dynamically allocated. This is virtually |
| 1782 | impossible to cater for in a firewall configuration given that the |
| 1783 | port mapping will be different for every data connection.</P |
| 1784 | ><P |
| 1785 | >The solution is to force the users to configure their clients to |
| 1786 | use the non-passive mode (ie port 20)</P |
| 1787 | ></BLOCKQUOTE |
| 1788 | ></DIV |
| 1789 | ></DIV |
| 1790 | ><DIV |
| 1791 | CLASS="QANDAENTRY" |
| 1792 | ><DIV |
| 1793 | CLASS="QUESTION" |
| 1794 | ><P |
| 1795 | ><A |
| 1796 | NAME="AEN367" |
| 1797 | ></A |
| 1798 | ><B |
| 1799 | >8. </B |
| 1800 | >Can I run more that one VirtualHost on a single IP?</P |
| 1801 | ></DIV |
| 1802 | ><DIV |
| 1803 | CLASS="ANSWER" |
| 1804 | ><P |
| 1805 | ><B |
| 1806 | > </B |
| 1807 | >No, or at least not in the HTTP/1.1 manner of virtual hosting. |
| 1808 | This is an inbuilt limitation of the current FTP RFC., unlike the |
| 1809 | HTTP/1.1 spec there is no mechanism comparable to the "Host: |
| 1810 | foo.bar.com" HTTP header for specifying which host the connection is |
| 1811 | for. Therefore the only method for determining which VirtualHost the |
| 1812 | connection is destined for is by the destination IP.</P |
| 1813 | ><P |
| 1814 | >The one exception to this is if you host multiple servers on the same |
| 1815 | IP but using different ports, however this requires that the connecting |
| 1816 | client uses a non-standard port and therefore is probably not a good |
| 1817 | solution for mass hosting.</P |
| 1818 | ><A |
| 1819 | NAME="AEN372" |
| 1820 | ></A |
| 1821 | ><BLOCKQUOTE |
| 1822 | CLASS="BLOCKQUOTE" |
| 1823 | ><H3 |
| 1824 | CLASS="BRIDGEHEAD" |
| 1825 | ><A |
| 1826 | NAME="AEN373" |
| 1827 | ></A |
| 1828 | >Is there anything in the pipeline to fix this?</H3 |
| 1829 | ><P |
| 1830 | >There is a draft standard <A |
| 1831 | HREF="http://search.ietf.org/internet-drafts/draft-ietf-ftpext-mlst-12.txt" |
| 1832 | TARGET="_top" |
| 1833 | >http://search.ietf.org/internet-drafts/draft-ietf-ftpext-mlst-12.txt</A |
| 1834 | > with the IETF which extends and improves on the FTP specification including support for a HOST command. However given that the IP crunch is coming from websites and not virtual ftp servers this is unlikely to be pushed through any time soon.</P |
| 1835 | ></BLOCKQUOTE |
| 1836 | ></DIV |
| 1837 | ></DIV |
| 1838 | ><DIV |
| 1839 | CLASS="QANDAENTRY" |
| 1840 | ><DIV |
| 1841 | CLASS="QUESTION" |
| 1842 | ><P |
| 1843 | ><A |
| 1844 | NAME="AEN377" |
| 1845 | ></A |
| 1846 | ><B |
| 1847 | >9. </B |
| 1848 | >How do I run ProFTPD from inetd?</P |
| 1849 | ></DIV |
| 1850 | ><DIV |
| 1851 | CLASS="ANSWER" |
| 1852 | ><P |
| 1853 | ><B |
| 1854 | > </B |
| 1855 | >Find the line in /etc/inetd.conf that looks something like this:</P |
| 1856 | ><A |
| 1857 | NAME="AEN381" |
| 1858 | ></A |
| 1859 | ><BLOCKQUOTE |
| 1860 | CLASS="BLOCKQUOTE" |
| 1861 | ><P |
| 1862 | >ftp stream tcp nowait root in.ftpd in.ftpd</P |
| 1863 | ></BLOCKQUOTE |
| 1864 | ><P |
| 1865 | >Replace it with:</P |
| 1866 | ><A |
| 1867 | NAME="AEN384" |
| 1868 | ></A |
| 1869 | ><BLOCKQUOTE |
| 1870 | CLASS="BLOCKQUOTE" |
| 1871 | ><P |
| 1872 | >ftp stream tcp nowait root in.proftpd in.proftpd</P |
| 1873 | ></BLOCKQUOTE |
| 1874 | ><P |
| 1875 | >Then, find your inetd process in the process listing and send it |
| 1876 | the SIGHUP signal so that it will rehash and reconfigure itself. You |
| 1877 | may also need to add in.ProFTPD to hosts.allow on your system.</P |
| 1878 | ></DIV |
| 1879 | ></DIV |
| 1880 | ><DIV |
| 1881 | CLASS="QANDAENTRY" |
| 1882 | ><DIV |
| 1883 | CLASS="QUESTION" |
| 1884 | ><P |
| 1885 | ><A |
| 1886 | NAME="AEN388" |
| 1887 | ></A |
| 1888 | ><B |
| 1889 | >10. </B |
| 1890 | >Can I use tcp-wrappers with ProFTPD?</P |
| 1891 | ></DIV |
| 1892 | ><DIV |
| 1893 | CLASS="ANSWER" |
| 1894 | ><P |
| 1895 | ><B |
| 1896 | > </B |
| 1897 | >Yup. Although ProFTPD has built-in IP access control (see the Deny |
| 1898 | and Allow directives), many admins choose to consolidate IP access |
| 1899 | control in one place via in.tcpd. Just configure ProFTPD to run from |
| 1900 | inetd as any other tcp-wrapper wrapped daemon and add the |
| 1901 | appropriate lines to hosts.allow/deny files.</P |
| 1902 | ><P |
| 1903 | >If running ProFTPD in standalone mode, mod_wrap can be used to direct the |
| 1904 | server to use the normal hosts.allow/deny files.</P |
| 1905 | ></DIV |
| 1906 | ></DIV |
| 1907 | ><DIV |
| 1908 | CLASS="QANDAENTRY" |
| 1909 | ><DIV |
| 1910 | CLASS="QUESTION" |
| 1911 | ><P |
| 1912 | ><A |
| 1913 | NAME="AEN394" |
| 1914 | ></A |
| 1915 | ><B |
| 1916 | >11. </B |
| 1917 | >Can I run an FTP server on a non-standard port?</P |
| 1918 | ></DIV |
| 1919 | ><DIV |
| 1920 | CLASS="ANSWER" |
| 1921 | ><P |
| 1922 | ><B |
| 1923 | > </B |
| 1924 | >Yes. Use a <VirtualHost> block with your machine's FQDN |
| 1925 | (Fully Qualified Domain Name) or IP address, and a Port directive |
| 1926 | inside the <VirtualHost> block. For example, if your host is |
| 1927 | named "myhost.mydomain.com" and you want to run an additional FTP |
| 1928 | server on port 2001, you would:</P |
| 1929 | ><PRE |
| 1930 | CLASS="PROGRAMLISTING" |
| 1931 | >... |
| 1932 | <VirtualHost myhost.mydomain.com> |
| 1933 | Port 2001 |
| 1934 | ... |
| 1935 | </VirtualHost> |
| 1936 | </PRE |
| 1937 | ></DIV |
| 1938 | ></DIV |
| 1939 | ><DIV |
| 1940 | CLASS="QANDAENTRY" |
| 1941 | ><DIV |
| 1942 | CLASS="QUESTION" |
| 1943 | ><P |
| 1944 | ><A |
| 1945 | NAME="AEN400" |
| 1946 | ></A |
| 1947 | ><B |
| 1948 | >12. </B |
| 1949 | >Can control upload/download ratios?</P |
| 1950 | ></DIV |
| 1951 | ><DIV |
| 1952 | CLASS="ANSWER" |
| 1953 | ><P |
| 1954 | ><B |
| 1955 | > </B |
| 1956 | >Yes the mod_ratio module provides for doing just this.</P |
| 1957 | ><P |
| 1958 | >The ratio directives take four numbers: file ratio, initial file |
| 1959 | credit, byte ratio, and initial byte credit. Setting either ratio |
| 1960 | to 0 disables that check.</P |
| 1961 | ><P |
| 1962 | >The directives are HostRatio (matches FQDN, wildcards allowed), |
| 1963 | AnonRatio (matches password entered at login), UserRatio (accepts "*" |
| 1964 | for "any user"), and GroupRatio. </P |
| 1965 | ><PRE |
| 1966 | CLASS="PROGRAMLISTING" |
| 1967 | >Ratios on # enable module |
| 1968 | UserRatio ftp 0 0 0 0 |
| 1969 | HostRatio master.debian.org 0 0 0 0 # leech access (default) |
| 1970 | GroupRatio proftpd 100 10 5 100000 # 100:1 files, 10 file cred 5:1 bytes, 100k byte cred |
| 1971 | AnonRatio [email protected] 1 0 1 0 # 1:1 ratio, no credits |
| 1972 | UserRatio * 5 5 5 50000 # special default case |
| 1973 | </PRE |
| 1974 | ><P |
| 1975 | >This example is for someone who (1) has downloaded 1 file of 82k, |
| 1976 | (2) has uploaded nothing, (3) has a ratio of 5:1 files and 5:1 |
| 1977 | bytes, (4) has 4 files and 17k credit remaining, and (5) is now |
| 1978 | changing directory to /art/nudes/young/carla. The initial credit, |
| 1979 | not shown, was 5 files and 100k (UserRatio * 5 5 5 100000).</P |
| 1980 | ><P |
| 1981 | >Version 2.0 and above of this module integrate with mod_sql.</P |
| 1982 | ><A |
| 1983 | NAME="AEN409" |
| 1984 | ></A |
| 1985 | ><BLOCKQUOTE |
| 1986 | CLASS="BLOCKQUOTE" |
| 1987 | ><H3 |
| 1988 | CLASS="BRIDGEHEAD" |
| 1989 | ><A |
| 1990 | NAME="AEN410" |
| 1991 | ></A |
| 1992 | >Limitations of mod_ratio</H3 |
| 1993 | ><P |
| 1994 | >It appears that the ratio limits in mod_ratio are only maintained |
| 1995 | on a per session basis and there is no ongoing tracking of usage.</P |
| 1996 | ></BLOCKQUOTE |
| 1997 | ></DIV |
| 1998 | ></DIV |
| 1999 | ><DIV |
| 2000 | CLASS="QANDAENTRY" |
| 2001 | ><DIV |
| 2002 | CLASS="QUESTION" |
| 2003 | ><P |
| 2004 | ><A |
| 2005 | NAME="AEN413" |
| 2006 | ></A |
| 2007 | ><B |
| 2008 | >13. </B |
| 2009 | >Slow logins</P |
| 2010 | ></DIV |
| 2011 | ><DIV |
| 2012 | CLASS="ANSWER" |
| 2013 | ><P |
| 2014 | ><B |
| 2015 | > </B |
| 2016 | >This is probably caused by a firewall or DNS timeout. By default |
| 2017 | ProFTPD will try to do both DNS and ident lookups against the incoming |
| 2018 | connection. If these are blocked or excessively delayed a slower than |
| 2019 | normal login will result. To turn off DNS and ident use:</P |
| 2020 | ><PRE |
| 2021 | CLASS="PROGRAMLISTING" |
| 2022 | >UseReverseDNS off |
| 2023 | IdentLookups off |
| 2024 | </PRE |
| 2025 | ><P |
| 2026 | >IdentLookups and tcpwrappers |
| 2027 | ***</P |
| 2028 | ></DIV |
| 2029 | ></DIV |
| 2030 | ><DIV |
| 2031 | CLASS="QANDAENTRY" |
| 2032 | ><DIV |
| 2033 | CLASS="QUESTION" |
| 2034 | ><P |
| 2035 | ><A |
| 2036 | NAME="AEN420" |
| 2037 | ></A |
| 2038 | ><B |
| 2039 | >14. </B |
| 2040 | >Lots of "FTP session closed" messages</P |
| 2041 | ></DIV |
| 2042 | ><DIV |
| 2043 | CLASS="ANSWER" |
| 2044 | ><P |
| 2045 | ><B |
| 2046 | > </B |
| 2047 | >Oct 7 12:30:48 salvage2 proftpd[8874]: FTP session closed. |
| 2048 | Oct 7 12:30:48 salvage2 proftpd[8874]: FTP session closed. |
| 2049 | Oct 7 12:30:48 salvage2 proftpd[8874]: FTP session closed. |
| 2050 | Oct 7 12:30:48 salvage2 proftpd[8874]: FTP session closed. |
| 2051 | </P |
| 2052 | ><P |
| 2053 | >The above log extract is likely to be caused by a local monitoring |
| 2054 | system or a particularly aggressive DoS attack. Most service |
| 2055 | monitoring systems try opening the ftp port on the target server to |
| 2056 | detect whether it is active and running. Most of the time these tests |
| 2057 | are followed by an immediate "QUIT" or disconnection.</P |
| 2058 | ><P |
| 2059 | >TCPdump/TCPshow on the server in question should show which machine |
| 2060 | on your network is is generating these connections.</P |
| 2061 | ></DIV |
| 2062 | ></DIV |
| 2063 | ><DIV |
| 2064 | CLASS="QANDAENTRY" |
| 2065 | ><DIV |
| 2066 | CLASS="QUESTION" |
| 2067 | ><P |
| 2068 | ><A |
| 2069 | NAME="AEN427" |
| 2070 | ></A |
| 2071 | ><B |
| 2072 | >15. </B |
| 2073 | >How do I see who is connected?</P |
| 2074 | ></DIV |
| 2075 | ><DIV |
| 2076 | CLASS="ANSWER" |
| 2077 | ><P |
| 2078 | ><B |
| 2079 | > </B |
| 2080 | >The ftpwho command lists the state of each ftp connection to the |
| 2081 | server and what it's current activity is. However this does not |
| 2082 | detail the connection information on a virtual by virtual basis.</P |
| 2083 | ></DIV |
| 2084 | ></DIV |
| 2085 | ><DIV |
| 2086 | CLASS="QANDAENTRY" |
| 2087 | ><DIV |
| 2088 | CLASS="QUESTION" |
| 2089 | ><P |
| 2090 | ><A |
| 2091 | NAME="AEN432" |
| 2092 | ></A |
| 2093 | ><B |
| 2094 | >16. </B |
| 2095 | >Can I force ProFTPD to listen on only one IP?</P |
| 2096 | ></DIV |
| 2097 | ><DIV |
| 2098 | CLASS="ANSWER" |
| 2099 | ><P |
| 2100 | ><B |
| 2101 | > </B |
| 2102 | >Sort, of it's not quite as clean as the socket binding under Apache |
| 2103 | but the principle works something like this.</P |
| 2104 | ><A |
| 2105 | NAME="AEN436" |
| 2106 | ></A |
| 2107 | ><BLOCKQUOTE |
| 2108 | CLASS="BLOCKQUOTE" |
| 2109 | ><H3 |
| 2110 | CLASS="BRIDGEHEAD" |
| 2111 | ><A |
| 2112 | NAME="AEN437" |
| 2113 | ></A |
| 2114 | >Standalone mode</H3 |
| 2115 | ><P |
| 2116 | >To listen on the primary IP of a host use the SocketBindTight directive</P |
| 2117 | ><P |
| 2118 | >To listen on a interfaces which are not the primary host interface use the SocketBindTight directive, place your server configuration in a <VirtualHost ftp.mydomain.com> block and use "Port 0" for the main host configuration and and "Port 21" inside the VirtualHost block.</P |
| 2119 | ><H3 |
| 2120 | CLASS="BRIDGEHEAD" |
| 2121 | ><A |
| 2122 | NAME="AEN440" |
| 2123 | ></A |
| 2124 | >inetd</H3 |
| 2125 | ><P |
| 2126 | >There are two approaches possible, the first is to use the patch |
| 2127 | from Daniel Roesen <[email protected]> (check |
| 2128 | the mailing list archives).</P |
| 2129 | ><P |
| 2130 | >The second method is to run ProFTPD from xinetd |
| 2131 | (http://synack.net/xinetd/), a more advanced replacement of inetd. An |
| 2132 | entry for this in xinetd.conf would be something like this:</P |
| 2133 | ><PRE |
| 2134 | CLASS="PROGRAMLISTING" |
| 2135 | >service ftp |
| 2136 | { |
| 2137 | disable = no |
| 2138 | flags = REUSE |
| 2139 | socket_type = stream |
| 2140 | wait = no |
| 2141 | user = root |
| 2142 | server = /usr/sbin/proftpd |
| 2143 | log_on_success += DURATION USERID |
| 2144 | log_on_failure += USERID |
| 2145 | nice = 10 |
| 2146 | #bind = [IP to bind to] |
| 2147 | } |
| 2148 | </PRE |
| 2149 | ></BLOCKQUOTE |
| 2150 | ></DIV |
| 2151 | ></DIV |
| 2152 | ><DIV |
| 2153 | CLASS="QANDAENTRY" |
| 2154 | ><DIV |
| 2155 | CLASS="QUESTION" |
| 2156 | ><P |
| 2157 | ><A |
| 2158 | NAME="AEN445" |
| 2159 | ></A |
| 2160 | ><B |
| 2161 | >17. </B |
| 2162 | >"FTP server shut down ... please try again later."</P |
| 2163 | ></DIV |
| 2164 | ><DIV |
| 2165 | CLASS="ANSWER" |
| 2166 | ><P |
| 2167 | ><B |
| 2168 | > </B |
| 2169 | >Check for /etc/shutmsg and delete it.</P |
| 2170 | ></DIV |
| 2171 | ></DIV |
| 2172 | ><DIV |
| 2173 | CLASS="QANDAENTRY" |
| 2174 | ><DIV |
| 2175 | CLASS="QUESTION" |
| 2176 | ><P |
| 2177 | ><A |
| 2178 | NAME="AEN450" |
| 2179 | ></A |
| 2180 | ><B |
| 2181 | >18. </B |
| 2182 | >How do I shutdown the server without killing proftpd?</P |
| 2183 | ></DIV |
| 2184 | ><DIV |
| 2185 | CLASS="ANSWER" |
| 2186 | ><P |
| 2187 | ><B |
| 2188 | > </B |
| 2189 | >ftpshut, allows the server to disallow connections with a message |
| 2190 | without actually taking down the service. The shutdown can be |
| 2191 | scheduled for a point in the future or right now, existing connections |
| 2192 | can be allowed to finish, or be terminated now. Re-enabling is done |
| 2193 | by removing the /etc/shutmsg file.</P |
| 2194 | ></DIV |
| 2195 | ></DIV |
| 2196 | ><DIV |
| 2197 | CLASS="QANDAENTRY" |
| 2198 | ><DIV |
| 2199 | CLASS="QUESTION" |
| 2200 | ><P |
| 2201 | ><A |
| 2202 | NAME="AEN455" |
| 2203 | ></A |
| 2204 | ><B |
| 2205 | >19. </B |
| 2206 | >Is is possible to shutdown a single VirtualHost?</P |
| 2207 | ></DIV |
| 2208 | ><DIV |
| 2209 | CLASS="ANSWER" |
| 2210 | ><P |
| 2211 | ><B |
| 2212 | > </B |
| 2213 | >No, the shutmsg file works at a daemon level not at a virtual host |
| 2214 | level.</P |
| 2215 | ></DIV |
| 2216 | ></DIV |
| 2217 | ><DIV |
| 2218 | CLASS="QANDAENTRY" |
| 2219 | ><DIV |
| 2220 | CLASS="QUESTION" |
| 2221 | ><P |
| 2222 | ><A |
| 2223 | NAME="AEN460" |
| 2224 | ></A |
| 2225 | ><B |
| 2226 | >20. </B |
| 2227 | >Error 421</P |
| 2228 | ></DIV |
| 2229 | ><DIV |
| 2230 | CLASS="ANSWER" |
| 2231 | ><P |
| 2232 | ><B |
| 2233 | > </B |
| 2234 | >This appears to be a general catch all error code meaning "something |
| 2235 | nasty has gone wrong".</P |
| 2236 | ><P |
| 2237 | ></P |
| 2238 | ><UL |
| 2239 | ><LI |
| 2240 | ><P |
| 2241 | >Connection has timed out</P |
| 2242 | ></LI |
| 2243 | ><LI |
| 2244 | ><P |
| 2245 | >The DefaultRoot specified doesn't exist</P |
| 2246 | ></LI |
| 2247 | ><LI |
| 2248 | ><P |
| 2249 | >The parent server has been killed</P |
| 2250 | ></LI |
| 2251 | ><LI |
| 2252 | ><P |
| 2253 | >Check /etc/services</P |
| 2254 | ></LI |
| 2255 | ><LI |
| 2256 | ><P |
| 2257 | >Wrong permissions on the DefaultRoot</P |
| 2258 | ></LI |
| 2259 | ></UL |
| 2260 | ><P |
| 2261 | >You get the idea...</P |
| 2262 | ></DIV |
| 2263 | ></DIV |
| 2264 | ><DIV |
| 2265 | CLASS="QANDAENTRY" |
| 2266 | ><DIV |
| 2267 | CLASS="QUESTION" |
| 2268 | ><P |
| 2269 | ><A |
| 2270 | NAME="AEN477" |
| 2271 | ></A |
| 2272 | ><B |
| 2273 | >21. </B |
| 2274 | >proftpd doesn't show in the processlist</P |
| 2275 | ></DIV |
| 2276 | ><DIV |
| 2277 | CLASS="ANSWER" |
| 2278 | ><P |
| 2279 | ><B |
| 2280 | > </B |
| 2281 | >Two possible reasons, first that it's simply not running, try |
| 2282 | proftpd -n -d2 to run in debug mode and see what happens. The other |
| 2283 | is that it's running from inetd and there are no active sessions at |
| 2284 | the moment.</P |
| 2285 | ></DIV |
| 2286 | ></DIV |
| 2287 | ><DIV |
| 2288 | CLASS="QANDAENTRY" |
| 2289 | ><DIV |
| 2290 | CLASS="QUESTION" |
| 2291 | ><P |
| 2292 | ><A |
| 2293 | NAME="AEN482" |
| 2294 | ></A |
| 2295 | ><B |
| 2296 | >22. </B |
| 2297 | >How do I restart/reload the server?</P |
| 2298 | ></DIV |
| 2299 | ><DIV |
| 2300 | CLASS="ANSWER" |
| 2301 | ><P |
| 2302 | ><B |
| 2303 | > </B |
| 2304 | >This depends on the mode you're running the server in.</P |
| 2305 | ><A |
| 2306 | NAME="AEN486" |
| 2307 | ></A |
| 2308 | ><BLOCKQUOTE |
| 2309 | CLASS="BLOCKQUOTE" |
| 2310 | ><H3 |
| 2311 | CLASS="BRIDGEHEAD" |
| 2312 | ><A |
| 2313 | NAME="AEN487" |
| 2314 | ></A |
| 2315 | >inetd</H3 |
| 2316 | ><P |
| 2317 | >Unless you're making a configuration change to inetd itself nothing |
| 2318 | needs doing. The server reloads the configuration everytime a new |
| 2319 | connection is made.</P |
| 2320 | ><H3 |
| 2321 | CLASS="BRIDGEHEAD" |
| 2322 | ><A |
| 2323 | NAME="AEN489" |
| 2324 | ></A |
| 2325 | >Standalone</H3 |
| 2326 | ><P |
| 2327 | >Either stop and start the server completely (a little aggressive |
| 2328 | for most admins tastes) or send a SIGHUP to the master daemon |
| 2329 | process.</P |
| 2330 | ></BLOCKQUOTE |
| 2331 | ></DIV |
| 2332 | ></DIV |
| 2333 | ><DIV |
| 2334 | CLASS="QANDAENTRY" |
| 2335 | ><DIV |
| 2336 | CLASS="QUESTION" |
| 2337 | ><P |
| 2338 | ><A |
| 2339 | NAME="AEN492" |
| 2340 | ></A |
| 2341 | ><B |
| 2342 | >23. </B |
| 2343 | >503 No PORT command issued</P |
| 2344 | ></DIV |
| 2345 | ><DIV |
| 2346 | CLASS="ANSWER" |
| 2347 | ><P |
| 2348 | ><B |
| 2349 | > </B |
| 2350 | >A bug was introduced in 1.2.0rc2 which prevented the PORT command |
| 2351 | working properly and therefore breaking the data socket under certain |
| 2352 | conditions. The bug was documented as bug 240 and has been fixed in |
| 2353 | CVS. A rc3 release is due before the end of Jan 2001.</P |
| 2354 | ></DIV |
| 2355 | ></DIV |
| 2356 | ><DIV |
| 2357 | CLASS="QANDAENTRY" |
| 2358 | ><DIV |
| 2359 | CLASS="QUESTION" |
| 2360 | ><P |
| 2361 | ><A |
| 2362 | NAME="AEN497" |
| 2363 | ></A |
| 2364 | ><B |
| 2365 | >24. </B |
| 2366 | >Fatal: unable to determine IP address of</P |
| 2367 | ></DIV |
| 2368 | ><DIV |
| 2369 | CLASS="ANSWER" |
| 2370 | ><P |
| 2371 | ><B |
| 2372 | > </B |
| 2373 | >Proftpd was unable to work out what IP is associated with the |
| 2374 | hostname in the VirtualHost block. Normally caused by a problem |
| 2375 | with the DNS resolution of the host, check the resolv.conf file |
| 2376 | and that your chosen nameservers are functional.</P |
| 2377 | ></DIV |
| 2378 | ></DIV |
| 2379 | ><DIV |
| 2380 | CLASS="QANDAENTRY" |
| 2381 | ><DIV |
| 2382 | CLASS="QUESTION" |
| 2383 | ><P |
| 2384 | ><A |
| 2385 | NAME="AEN502" |
| 2386 | ></A |
| 2387 | ><B |
| 2388 | >25. </B |
| 2389 | >451 append/restart not permitted, try again</P |
| 2390 | ></DIV |
| 2391 | ><DIV |
| 2392 | CLASS="ANSWER" |
| 2393 | ><P |
| 2394 | ><B |
| 2395 | > </B |
| 2396 | >AllowStoreRestart is disabled by default because it will allow any |
| 2397 | writable file to be corrupted by a malicious user. It is recommended |
| 2398 | that this option is only used with authenticated users and then only |
| 2399 | in certain directories.</P |
| 2400 | ></DIV |
| 2401 | ></DIV |
| 2402 | ><DIV |
| 2403 | CLASS="QANDAENTRY" |
| 2404 | ><DIV |
| 2405 | CLASS="QUESTION" |
| 2406 | ><P |
| 2407 | ><A |
| 2408 | NAME="AEN507" |
| 2409 | ></A |
| 2410 | ><B |
| 2411 | >26. </B |
| 2412 | >501 REST not compatible with server configuration</P |
| 2413 | ></DIV |
| 2414 | ><DIV |
| 2415 | CLASS="ANSWER" |
| 2416 | ><P |
| 2417 | ><B |
| 2418 | > </B |
| 2419 | >As mentioned in the description of the HiddenStor configuration directive, |
| 2420 | use of that directive is incompatible with the FTP command REST. Either |
| 2421 | disable use of REST with the AllowRetrieveRestart and AllowStoreRestart |
| 2422 | directives, or do not use HiddenStor.</P |
| 2423 | ></DIV |
| 2424 | ></DIV |
| 2425 | ><DIV |
| 2426 | CLASS="QANDAENTRY" |
| 2427 | ><DIV |
| 2428 | CLASS="QUESTION" |
| 2429 | ><P |
| 2430 | ><A |
| 2431 | NAME="AEN512" |
| 2432 | ></A |
| 2433 | ><B |
| 2434 | >27. </B |
| 2435 | >The time being displayed is wrong</P |
| 2436 | ></DIV |
| 2437 | ><DIV |
| 2438 | CLASS="ANSWER" |
| 2439 | ><P |
| 2440 | ><B |
| 2441 | > </B |
| 2442 | >The default behaviour for ProFTPD is to display all times relative |
| 2443 | to GMT. To use local time set "TimesGMT off" in the server section of |
| 2444 | the config. There is a known issue with Redhat 7, with regard to time |
| 2445 | handling. |
| 2446 | <A |
| 2447 | HREF="http://www.redhat.com/support/rh7-errata-bugfixes.html" |
| 2448 | TARGET="_top" |
| 2449 | >http://www.redhat.com/support/errata/rh7-errata-bugfixes.html</A |
| 2450 | ></P |
| 2451 | ></DIV |
| 2452 | ></DIV |
| 2453 | ><DIV |
| 2454 | CLASS="QANDAENTRY" |
| 2455 | ><DIV |
| 2456 | CLASS="QUESTION" |
| 2457 | ><P |
| 2458 | ><A |
| 2459 | NAME="AEN518" |
| 2460 | ></A |
| 2461 | ><B |
| 2462 | >28. </B |
| 2463 | >Authentication is taking too long</P |
| 2464 | ></DIV |
| 2465 | ><DIV |
| 2466 | CLASS="ANSWER" |
| 2467 | ><P |
| 2468 | ><B |
| 2469 | > </B |
| 2470 | >Make sure that ReverseDNS is disabled, turn off ident lookups. |
| 2471 | Additionally check the size of your /etc/passwd (or shadow) file, if |
| 2472 | it is large then the only solution may be to move to another |
| 2473 | authentication scheme.</P |
| 2474 | ></DIV |
| 2475 | ></DIV |
| 2476 | ><DIV |
| 2477 | CLASS="QANDAENTRY" |
| 2478 | ><DIV |
| 2479 | CLASS="QUESTION" |
| 2480 | ><P |
| 2481 | ><A |
| 2482 | NAME="AEN523" |
| 2483 | ></A |
| 2484 | ><B |
| 2485 | >29. </B |
| 2486 | >Corrupted files</P |
| 2487 | ></DIV |
| 2488 | ><DIV |
| 2489 | CLASS="ANSWER" |
| 2490 | ><P |
| 2491 | ><B |
| 2492 | > </B |
| 2493 | >There appear to be some problems with both the use of sendfile() |
| 2494 | in ProFTPD and with the implementation within certain operating systems.</P |
| 2495 | ></DIV |
| 2496 | ></DIV |
| 2497 | ><DIV |
| 2498 | CLASS="QANDAENTRY" |
| 2499 | ><DIV |
| 2500 | CLASS="QUESTION" |
| 2501 | ><P |
| 2502 | ><A |
| 2503 | NAME="AEN528" |
| 2504 | ></A |
| 2505 | ><B |
| 2506 | >30. </B |
| 2507 | >Can I upgrade ProFTPD without terminating the current sessions?</P |
| 2508 | ></DIV |
| 2509 | ><DIV |
| 2510 | CLASS="ANSWER" |
| 2511 | ><P |
| 2512 | ><B |
| 2513 | > </B |
| 2514 | >Short answer, no. Longer answer is no, but you can minimise the |
| 2515 | effects. The cleanest approach on servers which have significant |
| 2516 | amounts of traffic appears to be to use ftpshut to block new |
| 2517 | connections and terminate existing ones after a pre-determined time |
| 2518 | period and then to upgrade and restart. This approach limits the |
| 2519 | number of downloads which are terminated part way through.</P |
| 2520 | ></DIV |
| 2521 | ></DIV |
| 2522 | ><DIV |
| 2523 | CLASS="QANDAENTRY" |
| 2524 | ><DIV |
| 2525 | CLASS="QUESTION" |
| 2526 | ><P |
| 2527 | ><A |
| 2528 | NAME="AEN533" |
| 2529 | ></A |
| 2530 | ><B |
| 2531 | >31. </B |
| 2532 | >No such group "nogroup"</P |
| 2533 | ></DIV |
| 2534 | ><DIV |
| 2535 | CLASS="ANSWER" |
| 2536 | ><P |
| 2537 | ><B |
| 2538 | > </B |
| 2539 | >The default ProFTPD configuration file uses the user "nouser" and |
| 2540 | the group "nogroup", some systems / distributions do not have the |
| 2541 | group "nogroup" defined. The solution is to either add the group |
| 2542 | "nogroup" to /etc/groups or to change the "nogroup" entry in the |
| 2543 | proftpd.conf to a group which does exist.</P |
| 2544 | ></DIV |
| 2545 | ></DIV |
| 2546 | ><DIV |
| 2547 | CLASS="QANDAENTRY" |
| 2548 | ><DIV |
| 2549 | CLASS="QUESTION" |
| 2550 | ><P |
| 2551 | ><A |
| 2552 | NAME="AEN538" |
| 2553 | ></A |
| 2554 | ><B |
| 2555 | >32. </B |
| 2556 | >Why do I see "unable to set groups: Invalid argument"? </P |
| 2557 | ></DIV |
| 2558 | ><DIV |
| 2559 | CLASS="ANSWER" |
| 2560 | ><P |
| 2561 | ><B |
| 2562 | > </B |
| 2563 | >The setting of the group privileges for a process uses the setgroups(2) |
| 2564 | system call. This call will fail with the above error message for |
| 2565 | one of two reasons: there is a negative GID value for one of the |
| 2566 | groups, or the maximum number of groups for a single user has been |
| 2567 | exceeded.</P |
| 2568 | ><P |
| 2569 | >Ideally, all IDs, both UID and GID, will be positive. Unfortunately, |
| 2570 | it is common on many systems to use -1 or -2, especially for such |
| 2571 | users as 'nobody', or group 'nogroup'. Use of these values uses C's |
| 2572 | treatment of data types to make the actual numeric value very high; |
| 2573 | some functions, like setgroups(), do not like this, though. In |
| 2574 | general, always use positive ID numbers.</P |
| 2575 | ><P |
| 2576 | >The other limitation is the number of supplemental groups for a user |
| 2577 | (eg non-primary groups, the ones configured in /etc/group). The |
| 2578 | maximum number of supplemental groups to which a user may belong |
| 2579 | is defined by the operating system constant NGROUPS_MAX. On |
| 2580 | some operating systems, such as Solaris, this limitation may be |
| 2581 | tunable.</P |
| 2582 | ><P |
| 2583 | >Some other applications may not encounter this error if they use the |
| 2584 | initgroups(3) function, which reads the /etc/group file for a user's |
| 2585 | supplemental group memberships, and sets those groups. This function, |
| 2586 | however, silently ignores any supplemental groups for user greater than |
| 2587 | NGROUPS_MAX, unlike setgroups(2), which complains.</P |
| 2588 | ><P |
| 2589 | > If this is the cause of your error message, any solution will most |
| 2590 | likely involve reducing the number of groups your users are members of, |
| 2591 | or tuning the NGROUPS_MAX value, if your operating system allows it.</P |
| 2592 | ></DIV |
| 2593 | ></DIV |
| 2594 | ><DIV |
| 2595 | CLASS="QANDAENTRY" |
| 2596 | ><DIV |
| 2597 | CLASS="QUESTION" |
| 2598 | ><P |
| 2599 | ><A |
| 2600 | NAME="AEN547" |
| 2601 | ></A |
| 2602 | ><B |
| 2603 | >33. </B |
| 2604 | >Why do I see error messages like these when I logout?</P |
| 2605 | ></DIV |
| 2606 | ><DIV |
| 2607 | CLASS="ANSWER" |
| 2608 | ><P |
| 2609 | ><B |
| 2610 | > </B |
| 2611 | > <PRE |
| 2612 | CLASS="PROGRAMLISTING" |
| 2613 | > PAM(exit): Permission denied |
| 2614 | open_module: stat(/usr/lib/security/pam_unix.so.1) failed: No such file or directory |
| 2615 | load_modules: can not open module /usr/lib/security/pam_unix.so.1 |
| 2616 | PAM(exit): Dlopen failure. |
| 2617 | </PRE |
| 2618 | ></P |
| 2619 | ><P |
| 2620 | >These messages appear when the DefaultRoot configuration directive is |
| 2621 | in effect. This directive causes a user to be confined using the |
| 2622 | chroot(2) system call. This call, however, affects other system |
| 2623 | utilities, such as PAM. In this case, PAM's configuration is causing |
| 2624 | the PAM library to attempt to open PAM modules using a path that is |
| 2625 | no longer valid, thus the errors. This happens on logout because the |
| 2626 | chroot has already happened by that point; on login, the PAM modules |
| 2627 | are successfully found and loaded before the chroot, so no errors. |
| 2628 | These are merely cosmetic reporting errors, and do not really affect |
| 2629 | the functionality or security of the server.</P |
| 2630 | ></DIV |
| 2631 | ></DIV |
| 2632 | ></DIV |
| 2633 | ></DIV |
| 2634 | ><DIV |
| 2635 | CLASS="CHAPTER" |
| 2636 | ><HR><H1 |
| 2637 | ><A |
| 2638 | NAME="AEN553" |
| 2639 | ></A |
| 2640 | >Chapter 5. Configuration problems</H1 |
| 2641 | ><DIV |
| 2642 | CLASS="QANDASET" |
| 2643 | ><DL |
| 2644 | ><DT |
| 2645 | >1. <A |
| 2646 | HREF="#AEN558" |
| 2647 | >How do I add another anonymous login or guest account?</A |
| 2648 | ></DT |
| 2649 | ><DT |
| 2650 | >2. <A |
| 2651 | HREF="#AEN565" |
| 2652 | >How do I ftp as root?</A |
| 2653 | ></DT |
| 2654 | ><DT |
| 2655 | >3. <A |
| 2656 | HREF="#AEN572" |
| 2657 | >How do I provide a secure upload facility?</A |
| 2658 | ></DT |
| 2659 | ><DT |
| 2660 | >4. <A |
| 2661 | HREF="#AEN579" |
| 2662 | >How can I stop my users from using their space as a warez repository</A |
| 2663 | ></DT |
| 2664 | ><DT |
| 2665 | >5. <A |
| 2666 | HREF="#AEN584" |
| 2667 | >Can I rotate files out of an upload directory after upload?</A |
| 2668 | ></DT |
| 2669 | ><DT |
| 2670 | >6. <A |
| 2671 | HREF="#AEN589" |
| 2672 | >How can I hide a directory from anonymous clients.</A |
| 2673 | ></DT |
| 2674 | ><DT |
| 2675 | >7. <A |
| 2676 | HREF="#AEN597" |
| 2677 | >File/Directory hiding isn't working for me!</A |
| 2678 | ></DT |
| 2679 | ><DT |
| 2680 | >8. <A |
| 2681 | HREF="#AEN602" |
| 2682 | >I want to prevent users from accessing a hidden directory</A |
| 2683 | ></DT |
| 2684 | ><DT |
| 2685 | >9. <A |
| 2686 | HREF="#AEN607" |
| 2687 | >How do I setup a virtual FTP server?</A |
| 2688 | ></DT |
| 2689 | ><DT |
| 2690 | >10. <A |
| 2691 | HREF="#AEN614" |
| 2692 | >I only want to allow anonymous access to a virtual server.</A |
| 2693 | ></DT |
| 2694 | ><DT |
| 2695 | >11. <A |
| 2696 | HREF="#AEN620" |
| 2697 | >How does <Limit LOGIN> work, and where should I use it?</A |
| 2698 | ></DT |
| 2699 | ><DT |
| 2700 | >12. <A |
| 2701 | HREF="#AEN630" |
| 2702 | >How can I limit users to a particular directory tree?</A |
| 2703 | ></DT |
| 2704 | ><DT |
| 2705 | >13. <A |
| 2706 | HREF="#AEN651" |
| 2707 | >How do I create individual anonymous FTP sites for my users?</A |
| 2708 | ></DT |
| 2709 | ><DT |
| 2710 | >14. <A |
| 2711 | HREF="#AEN665" |
| 2712 | >I want to support normal login and Anonymous under a particular |
| 2713 | user</A |
| 2714 | ></DT |
| 2715 | ><DT |
| 2716 | >15. <A |
| 2717 | HREF="#AEN673" |
| 2718 | >Why doesn't Anonymous ftp work (550 login incorrect)?</A |
| 2719 | ></DT |
| 2720 | ><DT |
| 2721 | >16. <A |
| 2722 | HREF="#AEN687" |
| 2723 | >Bandwidth control</A |
| 2724 | ></DT |
| 2725 | ><DT |
| 2726 | >17. <A |
| 2727 | HREF="#AEN693" |
| 2728 | >CHMOD isn't working</A |
| 2729 | ></DT |
| 2730 | ><DT |
| 2731 | >18. <A |
| 2732 | HREF="#AEN698" |
| 2733 | >How can I limit the size of uploaded files?</A |
| 2734 | ></DT |
| 2735 | ><DT |
| 2736 | >19. <A |
| 2737 | HREF="#AEN703" |
| 2738 | >Can I disable Anonymous logins?</A |
| 2739 | ></DT |
| 2740 | ><DT |
| 2741 | >20. <A |
| 2742 | HREF="#AEN708" |
| 2743 | >Limiting the connections per loginID</A |
| 2744 | ></DT |
| 2745 | ><DT |
| 2746 | >21. <A |
| 2747 | HREF="#AEN713" |
| 2748 | >How do I configure proftpd to allow transfer |
| 2749 | resumption (for downloads and uploads)?</A |
| 2750 | ></DT |
| 2751 | ><DT |
| 2752 | >22. <A |
| 2753 | HREF="#AEN720" |
| 2754 | >When should the Bind directive be used?</A |
| 2755 | ></DT |
| 2756 | ></DL |
| 2757 | ><P |
| 2758 | >Problems encountered in trying to make the server behave |
| 2759 | exactly as required after compilation and installation are |
| 2760 | complete and the server is running.</P |
| 2761 | ><DIV |
| 2762 | CLASS="QANDAENTRY" |
| 2763 | ><DIV |
| 2764 | CLASS="QUESTION" |
| 2765 | ><P |
| 2766 | ><A |
| 2767 | NAME="AEN558" |
| 2768 | ></A |
| 2769 | ><B |
| 2770 | >1. </B |
| 2771 | >How do I add another anonymous login or guest account?</P |
| 2772 | ></DIV |
| 2773 | ><DIV |
| 2774 | CLASS="ANSWER" |
| 2775 | ><P |
| 2776 | ><B |
| 2777 | > </B |
| 2778 | >You should look in the sample-configurations/ directory from |
| 2779 | your distribution tarball. Basically, you'll need to create another |
| 2780 | user on your system for the guest/anonymous ftp login. For security |
| 2781 | reasons, it's very important that you make sure the user account |
| 2782 | either has a password or has an "unmatchable" password. The root |
| 2783 | directory of the guest/anonymous account doesn't have to be the user's |
| 2784 | directory, but it makes sense to do so. After you have created the |
| 2785 | account, put something like the following in your /etc/proftpd.conf |
| 2786 | file (assuming the new user/group name is private/private):</P |
| 2787 | ><PRE |
| 2788 | CLASS="PROGRAMLISTING" |
| 2789 | ><Anonymous ~private> |
| 2790 | AnonRequirePassword off |
| 2791 | User private |
| 2792 | Group private |
| 2793 | RequireValidShell off |
| 2794 | <Directory *> |
| 2795 | <Limit WRITE> |
| 2796 | DenyAll |
| 2797 | </Limit> |
| 2798 | </Directory> |
| 2799 | </Anonymous> |
| 2800 | </PRE |
| 2801 | ><P |
| 2802 | >This will allow ftp clients to login to your site with the username |
| 2803 | "private" and their e-mail address as a password. You can change the |
| 2804 | AnonRequirePassword directive to "on" if you want clients to be |
| 2805 | forced to transmit the correct password for the "private" account. |
| 2806 | This sample configuration allows clients to change into, list and read |
| 2807 | all directories, but denies write access of any kind.</P |
| 2808 | ></DIV |
| 2809 | ></DIV |
| 2810 | ><DIV |
| 2811 | CLASS="QANDAENTRY" |
| 2812 | ><DIV |
| 2813 | CLASS="QUESTION" |
| 2814 | ><P |
| 2815 | ><A |
| 2816 | NAME="AEN565" |
| 2817 | ></A |
| 2818 | ><B |
| 2819 | >2. </B |
| 2820 | >How do I ftp as root?</P |
| 2821 | ></DIV |
| 2822 | ><DIV |
| 2823 | CLASS="ANSWER" |
| 2824 | ><P |
| 2825 | ><B |
| 2826 | > </B |
| 2827 | >First off this is a <SPAN |
| 2828 | CLASS="emphasis" |
| 2829 | ><I |
| 2830 | CLASS="EMPHASIS" |
| 2831 | >bad</I |
| 2832 | ></SPAN |
| 2833 | > idea ftping as root is insecure, |
| 2834 | there are better more secure ways of shifting files as root.</P |
| 2835 | ><P |
| 2836 | >To enable root ftp ensure that the directive "RootLogin on" is |
| 2837 | included in your configuration.</P |
| 2838 | ></DIV |
| 2839 | ></DIV |
| 2840 | ><DIV |
| 2841 | CLASS="QANDAENTRY" |
| 2842 | ><DIV |
| 2843 | CLASS="QUESTION" |
| 2844 | ><P |
| 2845 | ><A |
| 2846 | NAME="AEN572" |
| 2847 | ></A |
| 2848 | ><B |
| 2849 | >3. </B |
| 2850 | >How do I provide a secure upload facility?</P |
| 2851 | ></DIV |
| 2852 | ><DIV |
| 2853 | CLASS="ANSWER" |
| 2854 | ><P |
| 2855 | ><B |
| 2856 | > </B |
| 2857 | >The following snippet from a sample configuration file |
| 2858 | illustrates how to protect an "upload" directory in such a fashion |
| 2859 | (which is a very good idea if you don't want people using your site |
| 2860 | for "warez"):</P |
| 2861 | ><PRE |
| 2862 | CLASS="PROGRAMLISTING" |
| 2863 | ><Anonymous /home/ftp> |
| 2864 | # All files uploaded are set to username.usergroup ownership |
| 2865 | User username |
| 2866 | Group usergroup |
| 2867 | UserAlias ftp username |
| 2868 | AuthAliasOnly on |
| 2869 | RequireValidShell off |
| 2870 | |
| 2871 | <Directory pub/incoming/> |
| 2872 | <Limit STOR CWD> |
| 2873 | AllowAll |
| 2874 | </Limit> |
| 2875 | <Limit READ RMD DELE MKD> |
| 2876 | DenyAll |
| 2877 | </Limit> |
| 2878 | </Directory> |
| 2879 | </Anonymous> |
| 2880 | </PRE |
| 2881 | ><P |
| 2882 | >This denies all write operations to the anonymous root directory |
| 2883 | and sub-directories, except "incoming/" where the permissions are |
| 2884 | reversed and the client can store but not read. If you used <Limit |
| 2885 | WRITE> instead of <Limit STOR> on <Directory incoming>, |
| 2886 | ftp clients would be allowed to perform all write operations to the |
| 2887 | sub-dir, including deleting, renaming and creating directories.</P |
| 2888 | ></DIV |
| 2889 | ></DIV |
| 2890 | ><DIV |
| 2891 | CLASS="QANDAENTRY" |
| 2892 | ><DIV |
| 2893 | CLASS="QUESTION" |
| 2894 | ><P |
| 2895 | ><A |
| 2896 | NAME="AEN579" |
| 2897 | ></A |
| 2898 | ><B |
| 2899 | >4. </B |
| 2900 | >How can I stop my users from using their space as a warez repository</P |
| 2901 | ></DIV |
| 2902 | ><DIV |
| 2903 | CLASS="ANSWER" |
| 2904 | ><P |
| 2905 | ><B |
| 2906 | > </B |
| 2907 | >The above fragment will control anonymous users however if a local |
| 2908 | user with a full account with up and download capability is abusing |
| 2909 | their space then the technical measures which can be taken are |
| 2910 | limited. Applying a sane system quota is a good start, using the |
| 2911 | mod_quota and mod_ratio modules may control the rates of |
| 2912 | upload/download making it less useful as a warez repository. In the |
| 2913 | end it comes down to system monitoring and good site AUP's and |
| 2914 | enforcement.</P |
| 2915 | ></DIV |
| 2916 | ></DIV |
| 2917 | ><DIV |
| 2918 | CLASS="QANDAENTRY" |
| 2919 | ><DIV |
| 2920 | CLASS="QUESTION" |
| 2921 | ><P |
| 2922 | ><A |
| 2923 | NAME="AEN584" |
| 2924 | ></A |
| 2925 | ><B |
| 2926 | >5. </B |
| 2927 | >Can I rotate files out of an upload directory after upload?</P |
| 2928 | ></DIV |
| 2929 | ><DIV |
| 2930 | CLASS="ANSWER" |
| 2931 | ><P |
| 2932 | ><B |
| 2933 | > </B |
| 2934 | >Yes. You'll need to write a script which either checks the |
| 2935 | contents of the directory regularly and moves once it's detected no |
| 2936 | size change in a file for xyz seconds. Or a script which monitors an |
| 2937 | upload log. There is no automatic method for doing this.</P |
| 2938 | ></DIV |
| 2939 | ></DIV |
| 2940 | ><DIV |
| 2941 | CLASS="QANDAENTRY" |
| 2942 | ><DIV |
| 2943 | CLASS="QUESTION" |
| 2944 | ><P |
| 2945 | ><A |
| 2946 | NAME="AEN589" |
| 2947 | ></A |
| 2948 | ><B |
| 2949 | >6. </B |
| 2950 | >How can I hide a directory from anonymous clients.</P |
| 2951 | ></DIV |
| 2952 | ><DIV |
| 2953 | CLASS="ANSWER" |
| 2954 | ><P |
| 2955 | ><B |
| 2956 | > </B |
| 2957 | >Use the HideUser or HideGroup directive in combination with the |
| 2958 | proper user/group ownership on the directive. For example, if you |
| 2959 | have the follow directory in your anonymous ftp directory tree:</P |
| 2960 | ><PRE |
| 2961 | CLASS="PROGRAMLISTING" |
| 2962 | >drwxrwxr-x 3 ftp staff 6144 Apr 21 16:40 private |
| 2963 | </PRE |
| 2964 | ><P |
| 2965 | >You can use a directive such as "HideGroup staff" to hide the private |
| 2966 | directory from a directory listing. For example:</P |
| 2967 | ><PRE |
| 2968 | CLASS="PROGRAMLISTING" |
| 2969 | ><Anonymous ~ftp> |
| 2970 | ... |
| 2971 | <Directory Private> |
| 2972 | HideGroup staff |
| 2973 | </Directory> |
| 2974 | ... |
| 2975 | </Anonymous> |
| 2976 | </PRE |
| 2977 | ></DIV |
| 2978 | ></DIV |
| 2979 | ><DIV |
| 2980 | CLASS="QANDAENTRY" |
| 2981 | ><DIV |
| 2982 | CLASS="QUESTION" |
| 2983 | ><P |
| 2984 | ><A |
| 2985 | NAME="AEN597" |
| 2986 | ></A |
| 2987 | ><B |
| 2988 | >7. </B |
| 2989 | >File/Directory hiding isn't working for me!</P |
| 2990 | ></DIV |
| 2991 | ><DIV |
| 2992 | CLASS="ANSWER" |
| 2993 | ><P |
| 2994 | ><B |
| 2995 | > </B |
| 2996 | >You need to make sure that the group you are hiding isn't the |
| 2997 | anonymous ftp user's primary group, or HideGroup won't apply.</P |
| 2998 | ></DIV |
| 2999 | ></DIV |
| 3000 | ><DIV |
| 3001 | CLASS="QANDAENTRY" |
| 3002 | ><DIV |
| 3003 | CLASS="QUESTION" |
| 3004 | ><P |
| 3005 | ><A |
| 3006 | NAME="AEN602" |
| 3007 | ></A |
| 3008 | ><B |
| 3009 | >8. </B |
| 3010 | >I want to prevent users from accessing a hidden directory</P |
| 3011 | ></DIV |
| 3012 | ><DIV |
| 3013 | CLASS="ANSWER" |
| 3014 | ><P |
| 3015 | ><B |
| 3016 | > </B |
| 3017 | >You can either change the permissions on the directory to prevent |
| 3018 | the anonymous FTP user from accessing it, or if you want to make it |
| 3019 | appear completely invisible (as though there is no such directory), |
| 3020 | use the IgnoreHidden directive inside a <Limit> block for one or |
| 3021 | more commands that you want to completely ignore the hidden directory |
| 3022 | entries (ignore = act as if the directory entry does not exist).</P |
| 3023 | ></DIV |
| 3024 | ></DIV |
| 3025 | ><DIV |
| 3026 | CLASS="QANDAENTRY" |
| 3027 | ><DIV |
| 3028 | CLASS="QUESTION" |
| 3029 | ><P |
| 3030 | ><A |
| 3031 | NAME="AEN607" |
| 3032 | ></A |
| 3033 | ><B |
| 3034 | >9. </B |
| 3035 | >How do I setup a virtual FTP server?</P |
| 3036 | ></DIV |
| 3037 | ><DIV |
| 3038 | CLASS="ANSWER" |
| 3039 | ><P |
| 3040 | ><B |
| 3041 | > </B |
| 3042 | >You'll need to configure your host to be able to handle multiple IP |
| 3043 | addresses. This is often called "aliasing", and can generally be |
| 3044 | configured through an IP alias or dummy interface. You need to read |
| 3045 | your operating system documentation to figure out how to do this. Once |
| 3046 | your have the host configured to accept the additional IP address that |
| 3047 | you wish to offer a virtual FTP server on, use the <VirtualHost> |
| 3048 | configuration directive to create the virtual server:</P |
| 3049 | ><PRE |
| 3050 | CLASS="PROGRAMLISTING" |
| 3051 | ><VirtualHost 10.0.0.1> |
| 3052 | ServerName "My virtual FTP server" |
| 3053 | </VirtualHost> |
| 3054 | </PRE |
| 3055 | ><P |
| 3056 | >You can add additional directive blocks into the <VirtualHost> block |
| 3057 | in order to create anonymous/guest logins and the like which are only |
| 3058 | available on the virtual host.</P |
| 3059 | ></DIV |
| 3060 | ></DIV |
| 3061 | ><DIV |
| 3062 | CLASS="QANDAENTRY" |
| 3063 | ><DIV |
| 3064 | CLASS="QUESTION" |
| 3065 | ><P |
| 3066 | ><A |
| 3067 | NAME="AEN614" |
| 3068 | ></A |
| 3069 | ><B |
| 3070 | >10. </B |
| 3071 | >I only want to allow anonymous access to a virtual server.</P |
| 3072 | ></DIV |
| 3073 | ><DIV |
| 3074 | CLASS="ANSWER" |
| 3075 | ><P |
| 3076 | ><B |
| 3077 | > </B |
| 3078 | >Use a <Limit LOGIN> block to deny access at the top-level of |
| 3079 | the virtual host, then use <Limit LOGIN> again in your |
| 3080 | <Anonymous> block to allow access to the anonymous login. This |
| 3081 | permits logins to a virtual anonymous server, but denies to everything |
| 3082 | else. Example:</P |
| 3083 | ><PRE |
| 3084 | CLASS="PROGRAMLISTING" |
| 3085 | ><VirtualHost 10.0.0.1> |
| 3086 | ServerName "My virtual FTP server" |
| 3087 | <Limit LOGIN> |
| 3088 | DenyAll |
| 3089 | </Limit> |
| 3090 | <Anonymous /usr/local/private> |
| 3091 | User private |
| 3092 | Group private |
| 3093 | <Limit LOGIN> |
| 3094 | AllowAll |
| 3095 | </Limit> |
| 3096 | ... |
| 3097 | </Anonymous> |
| 3098 | </VirtualHost> |
| 3099 | </PRE |
| 3100 | ></DIV |
| 3101 | ></DIV |
| 3102 | ><DIV |
| 3103 | CLASS="QANDAENTRY" |
| 3104 | ><DIV |
| 3105 | CLASS="QUESTION" |
| 3106 | ><P |
| 3107 | ><A |
| 3108 | NAME="AEN620" |
| 3109 | ></A |
| 3110 | ><B |
| 3111 | >11. </B |
| 3112 | >How does <Limit LOGIN> work, and where should I use it?</P |
| 3113 | ></DIV |
| 3114 | ><DIV |
| 3115 | CLASS="ANSWER" |
| 3116 | ><P |
| 3117 | ><B |
| 3118 | > </B |
| 3119 | >The <LOGIN> directive is used to control connection or login |
| 3120 | access to a particular context (the directive block which contains |
| 3121 | it). When a client initially connects to ProFTPD, the daemon searches |
| 3122 | the configuration tree for <Limit LOGIN> directives, and |
| 3123 | attached parameters (such as Allow, Deny, etc). If it determines that |
| 3124 | there is no possible way for the client to ever be allowed to login, |
| 3125 | such as a "Deny from" matching the client's source address, without an |
| 3126 | overriding "Allow from" at a lower level, the client is disconnected |
| 3127 | without being offered the opportunity to transmit a user and password.</P |
| 3128 | ><P |
| 3129 | >However, if it is possible for the client to be allowed a login, |
| 3130 | ProFTPD continues as per normal, allowing the client to login only if |
| 3131 | the proper <Limit LOGIN> applies. Normally, <Limit> directive blocks |
| 3132 | are allowed in the server config, <VirtualHost>, <Anonymous> |
| 3133 | and <Directory> contexts. However, <Limit LOGIN> should not be |
| 3134 | used in a <Directory> context, as clients do not connect/login to a |
| 3135 | directory (and thus it is meaningless).</P |
| 3136 | ><P |
| 3137 | >By way of example, the following configuration snippet illustrates a |
| 3138 | <Limit LOGIN> deny which will cause any incoming connections from the |
| 3139 | 10.1.1.x subnet to be immediately disconnected, without a welcome |
| 3140 | message:</P |
| 3141 | ><PRE |
| 3142 | CLASS="PROGRAMLISTING" |
| 3143 | >... |
| 3144 | <Limit LOGIN> |
| 3145 | Order deny,allow |
| 3146 | Deny from 10.1.1. |
| 3147 | Allow from all |
| 3148 | </Limit> |
| 3149 | ... |
| 3150 | </PRE |
| 3151 | ><P |
| 3152 | >Next, an example of a configuration using <Limit LOGIN> that will not |
| 3153 | immediately disconnect an incoming client, but will return "Login |
| 3154 | invalid" for all login attempts except anonymous.</P |
| 3155 | ><PRE |
| 3156 | CLASS="PROGRAMLISTING" |
| 3157 | >... |
| 3158 | <Limit LOGIN> |
| 3159 | DenyAll |
| 3160 | </Limit> |
| 3161 | <Anonymous ~ftp> |
| 3162 | ... |
| 3163 | <Limit LOGIN> |
| 3164 | AllowAll |
| 3165 | </Limit> |
| 3166 | ... |
| 3167 | </PRE |
| 3168 | ></DIV |
| 3169 | ></DIV |
| 3170 | ><DIV |
| 3171 | CLASS="QANDAENTRY" |
| 3172 | ><DIV |
| 3173 | CLASS="QUESTION" |
| 3174 | ><P |
| 3175 | ><A |
| 3176 | NAME="AEN630" |
| 3177 | ></A |
| 3178 | ><B |
| 3179 | >12. </B |
| 3180 | >How can I limit users to a particular directory tree?</P |
| 3181 | ></DIV |
| 3182 | ><DIV |
| 3183 | CLASS="ANSWER" |
| 3184 | ><P |
| 3185 | ><B |
| 3186 | > </B |
| 3187 | >For general open access you can use an <Anonymous> directive context block, |
| 3188 | possibly in combination with a UserPassword/AnonRequirePassword directive. </P |
| 3189 | ><P |
| 3190 | >However if you wish to jail an entire group (or groups) of users, |
| 3191 | you can use the DefaultRoot directive. DefaultRoot lets you specify a |
| 3192 | root jailed directory (or "~" for the user's home directory), and an |
| 3193 | optional group-expression argument which can be used to control which |
| 3194 | groups of users the jail will be applied to. For example:</P |
| 3195 | ><PRE |
| 3196 | CLASS="PROGRAMLISTING" |
| 3197 | >... |
| 3198 | <VirtualHost myhost.mynet.foo> |
| 3199 | DefaultRoot ~ |
| 3200 | ... |
| 3201 | </VirtualHost> |
| 3202 | </PRE |
| 3203 | ><P |
| 3204 | >This creates a configuration where all users who log into |
| 3205 | myhost.mynet.foo are jailed into their home directories (cannot chdir |
| 3206 | into a higher level directory). Alternatively, you could:</P |
| 3207 | ><PRE |
| 3208 | CLASS="PROGRAMLISTING" |
| 3209 | >... |
| 3210 | <VirtualHost myhost.mynet.foo> |
| 3211 | DefaultRoot /u2/public users,!staff |
| 3212 | ... |
| 3213 | </VirtualHost> |
| 3214 | </PRE |
| 3215 | ><P |
| 3216 | >In this example, all users who are members of group "users", but |
| 3217 | not members of group "staff" are jailed into /u2/public. If a user |
| 3218 | does not meet the group-expression requirements, they login as per |
| 3219 | normal (not jailed, default directory is their home). You can use |
| 3220 | multiple DefaultRoot directives to create multiple jails inside the |
| 3221 | same directive context. If two DefaultRoot directives apply to the |
| 3222 | same user, ProFTPD arbitrarily chooses one (based on how the |
| 3223 | configuration file was parsed).</P |
| 3224 | ><A |
| 3225 | NAME="AEN639" |
| 3226 | ></A |
| 3227 | ><BLOCKQUOTE |
| 3228 | CLASS="BLOCKQUOTE" |
| 3229 | ><H3 |
| 3230 | CLASS="BRIDGEHEAD" |
| 3231 | ><A |
| 3232 | NAME="AEN640" |
| 3233 | ></A |
| 3234 | >Security Implications</H3 |
| 3235 | ><P |
| 3236 | >The DefaultRoot directive is implemented using the chroot(2) system |
| 3237 | call. This moves the "/" (or root) directory to a specified point |
| 3238 | within the file system and jails the user into this sub-tree. However |
| 3239 | this is not the holy grail of security, a chroot jail can be broken, |
| 3240 | it is not a trivial matter but it's nowhere near impossible. |
| 3241 | DefaultRoot should be used as part of a general system of security not |
| 3242 | the only security measure.</P |
| 3243 | ><P |
| 3244 | >A more detailed <A |
| 3245 | HREF="http://www.bpfh.net/simes/computing/chroot-break.html" |
| 3246 | TARGET="_top" |
| 3247 | >http://www.bpfh.net/simes/computing/chroot-break.html</A |
| 3248 | > on this subject and on the breaking of chroot jails has been written by Simon Burr</P |
| 3249 | ><H3 |
| 3250 | CLASS="BRIDGEHEAD" |
| 3251 | ><A |
| 3252 | NAME="AEN644" |
| 3253 | ></A |
| 3254 | >Non-root server issues</H3 |
| 3255 | ><P |
| 3256 | >The chroot() system call will not work under a non-root ftp server |
| 3257 | process, the call requires root privaliges. Without them it simply |
| 3258 | doesn't work, there doesn't appear to be any checking in the code of |
| 3259 | the uid/gid before calling chroot so using DefaultRoot in such a setup |
| 3260 | will cause the server to fail.</P |
| 3261 | ><H3 |
| 3262 | CLASS="BRIDGEHEAD" |
| 3263 | ><A |
| 3264 | NAME="AEN646" |
| 3265 | ></A |
| 3266 | >Symlinks</H3 |
| 3267 | ><P |
| 3268 | >Symlinks will not work from within a chrooted area. The reason |
| 3269 | should be clear from a casual inspection of the nature of |
| 3270 | the chroot command. It is not possible to have a symbolic |
| 3271 | link to a directory which can"t be reached beacuse it's |
| 3272 | outside of the current chroot. Work arounds to allow |
| 3273 | access to other parts of the file system include exporting |
| 3274 | the part of the filesystem to be accessed from inside the |
| 3275 | chroot and mounting via NFS, using hard file links or (on |
| 3276 | Solaris) using lofs to mount the directory via the loopback. |
| 3277 | </P |
| 3278 | ><PRE |
| 3279 | CLASS="PROGRAMLISTING" |
| 3280 | >mount -Flofs /home/data1 /ftp/data1 |
| 3281 | mount -Flofs /home/data2 /ftp/data2 |
| 3282 | </PRE |
| 3283 | ><P |
| 3284 | >As of the 2.4.x Linux kernel tree it is possible to mount filesystems |
| 3285 | multiple times and to mount subdirectories of filesystems elsewhere on |
| 3286 | the filesystem.</P |
| 3287 | ></BLOCKQUOTE |
| 3288 | ></DIV |
| 3289 | ></DIV |
| 3290 | ><DIV |
| 3291 | CLASS="QANDAENTRY" |
| 3292 | ><DIV |
| 3293 | CLASS="QUESTION" |
| 3294 | ><P |
| 3295 | ><A |
| 3296 | NAME="AEN651" |
| 3297 | ></A |
| 3298 | ><B |
| 3299 | >13. </B |
| 3300 | >How do I create individual anonymous FTP sites for my users?</P |
| 3301 | ></DIV |
| 3302 | ><DIV |
| 3303 | CLASS="ANSWER" |
| 3304 | ><P |
| 3305 | ><B |
| 3306 | > </B |
| 3307 | >There are two methods of accomplishing this (possibly more). |
| 3308 | First, you can create a directory structure inside your anonymous FTP |
| 3309 | root directory, creating a single directory for each user and setting |
| 3310 | ownership/permissions as appropriate. Then, either create a symlink |
| 3311 | from each user's home directory into the FTP site, or instruct your |
| 3312 | users on how to access their directory.</P |
| 3313 | ><P |
| 3314 | >The alternate method (and more versatile) of accomplishing per-user |
| 3315 | anonymous FTP is to use AnonymousGroup in combination with the |
| 3316 | DefaultRoot directory. You'll probably want to do this inside a |
| 3317 | <VirtualHost>, otherwise none of your users will be able to access |
| 3318 | your system without being stuck inside their per-user FTP site. |
| 3319 | Additionally, you'll want to use a deferred <Directory> block to |
| 3320 | carefully limit outside access to each user's site.</P |
| 3321 | ><P |
| 3322 | ></P |
| 3323 | ><OL |
| 3324 | TYPE="1" |
| 3325 | ><LI |
| 3326 | ><P |
| 3327 | >Create a new unix group on your system named `anonftp". Please |
| 3328 | each user who will have per-user anonymous FTP in this group.</P |
| 3329 | ></LI |
| 3330 | ><LI |
| 3331 | ><P |
| 3332 | >Create an `anon-ftp" and `anon-ftp/incoming" directory in each |
| 3333 | user's home directory.</P |
| 3334 | ></LI |
| 3335 | ><LI |
| 3336 | ><P |
| 3337 | >Modify your /etc/proftpd.conf file to look something like this |
| 3338 | (you'll probably want to customize this to your needs):</P |
| 3339 | ><PRE |
| 3340 | CLASS="PROGRAMLISTING" |
| 3341 | > <VirtualHost my.per-user.virtual.host.address> |
| 3342 | |
| 3343 | # the next line limits all logins to this virtual host, so that only |
| 3344 | anonftp users can connect |
| 3345 | |
| 3346 | <Limit LOGIN> |
| 3347 | DenyGroup !anonftp |
| 3348 | </Limit> |
| 3349 | |
| 3350 | # limit access to each user's anon-ftp directory, we want read-only |
| 3351 | except on incoming |
| 3352 | |
| 3353 | <Directory ~/anon-ftp> |
| 3354 | |
| 3355 | <Limit WRITE> |
| 3356 | DenyAll |
| 3357 | </Limit> |
| 3358 | |
| 3359 | </Directory> |
| 3360 | |
| 3361 | # permit stor access to each user's anon-ftp/incoming directory, |
| 3362 | but deny everything else |
| 3363 | |
| 3364 | <Directory ~/anon-ftp/incoming> |
| 3365 | |
| 3366 | <Limit STOR> |
| 3367 | AllowAll |
| 3368 | </Limit> |
| 3369 | <Limit READ WRITE> |
| 3370 | DenyAll |
| 3371 | </Limit> |
| 3372 | |
| 3373 | </Directory> |
| 3374 | |
| 3375 | # provide a default root for all logins to this virtual host. |
| 3376 | DefaultRoot ~/anon-ftp |
| 3377 | # Finally, force all logins to be anonymous for the anonftp group |
| 3378 | AnonymousGroup anonftp |
| 3379 | |
| 3380 | </VirtualHost> |
| 3381 | </PRE |
| 3382 | ></LI |
| 3383 | ></OL |
| 3384 | ></DIV |
| 3385 | ></DIV |
| 3386 | ><DIV |
| 3387 | CLASS="QANDAENTRY" |
| 3388 | ><DIV |
| 3389 | CLASS="QUESTION" |
| 3390 | ><P |
| 3391 | ><A |
| 3392 | NAME="AEN665" |
| 3393 | ></A |
| 3394 | ><B |
| 3395 | >14. </B |
| 3396 | >I want to support normal login and Anonymous under a particular |
| 3397 | user</P |
| 3398 | ></DIV |
| 3399 | ><DIV |
| 3400 | CLASS="ANSWER" |
| 3401 | ><P |
| 3402 | ><B |
| 3403 | > </B |
| 3404 | >You can use the AuthAliasOnly directive to control how and |
| 3405 | where real usernames get authenticated (as opposed to aliased names, |
| 3406 | via the UserAlias directive). Note that it is still impossible to |
| 3407 | have two identical aliased names login to different anonymous sites; |
| 3408 | for that you would need <VirtualHost>.</P |
| 3409 | ><P |
| 3410 | >Example:</P |
| 3411 | ><PRE |
| 3412 | CLASS="PROGRAMLISTING" |
| 3413 | >... |
| 3414 | <Anonymous ~jrluser> |
| 3415 | |
| 3416 | User jrluser |
| 3417 | Group jrluser |
| 3418 | UserAlias ftp jrluser |
| 3419 | UserAlias anonymous jrluser |
| 3420 | AuthAliasOnly on |
| 3421 | ... |
| 3422 | |
| 3423 | </Anonymous> |
| 3424 | </PRE |
| 3425 | ><P |
| 3426 | >Here, the <Anonymous> configuration for ~jrluser is set to allow |
| 3427 | alias authentication only. Thus, if a client attempts to authenticate |
| 3428 | as "jrluser", the anonymous config will be ignored and the client will |
| 3429 | be authenticated as if they were a normal user (typically resulting in |
| 3430 | `jrluser" logging in normally). However, if the client uses the |
| 3431 | aliased username `ftp" or `anonymous", the anonymous block is applied.</P |
| 3432 | ></DIV |
| 3433 | ></DIV |
| 3434 | ><DIV |
| 3435 | CLASS="QANDAENTRY" |
| 3436 | ><DIV |
| 3437 | CLASS="QUESTION" |
| 3438 | ><P |
| 3439 | ><A |
| 3440 | NAME="AEN673" |
| 3441 | ></A |
| 3442 | ><B |
| 3443 | >15. </B |
| 3444 | >Why doesn't Anonymous ftp work (550 login incorrect)?</P |
| 3445 | ></DIV |
| 3446 | ><DIV |
| 3447 | CLASS="ANSWER" |
| 3448 | ><P |
| 3449 | ><B |
| 3450 | > </B |
| 3451 | >Things to check</P |
| 3452 | ><P |
| 3453 | ></P |
| 3454 | ><P |
| 3455 | ><B |
| 3456 | >Check the following first:</B |
| 3457 | ></P |
| 3458 | ><UL |
| 3459 | ><LI |
| 3460 | ><P |
| 3461 | >Make sure the user/group you specified inside the <Anonymous> |
| 3462 | block actually exists. This must be a real user and group, as it is |
| 3463 | used to control whom the daemon runs as and authenticates as.</P |
| 3464 | ></LI |
| 3465 | ><LI |
| 3466 | ><P |
| 3467 | >If RequireValidShell is not specifically turned off, make sure |
| 3468 | that your "ftp user" (as specified by the User directive inside an |
| 3469 | <Anonymous> block), has a valid shell listed in /etc/shells. If you do |
| 3470 | not wish to give the user a valid shell, you can always use |
| 3471 | "RequireValidShell off" to disable this check.</P |
| 3472 | ></LI |
| 3473 | ><LI |
| 3474 | ><P |
| 3475 | >If UseFtpUsers is not specifically turned off, make sure that |
| 3476 | your "ftp user" is not listed in /etc/ftpusers.</P |
| 3477 | ></LI |
| 3478 | ></UL |
| 3479 | ><P |
| 3480 | >If all else fails, you should check your syslog. When authentication |
| 3481 | fails for any reason, ProFTPD uses the syslog mechanism to log the |
| 3482 | reason for failure; using the AUTH (or AUTHPRIV) facility. If you need |
| 3483 | further assistance, you can send email, including related syslog |
| 3484 | entries and your configuration file, to the ProFTPD mailing list |
| 3485 | mentioned elsewhere in this FAQ.</P |
| 3486 | ></DIV |
| 3487 | ></DIV |
| 3488 | ><DIV |
| 3489 | CLASS="QANDAENTRY" |
| 3490 | ><DIV |
| 3491 | CLASS="QUESTION" |
| 3492 | ><P |
| 3493 | ><A |
| 3494 | NAME="AEN687" |
| 3495 | ></A |
| 3496 | ><B |
| 3497 | >16. </B |
| 3498 | >Bandwidth control</P |
| 3499 | ></DIV |
| 3500 | ><DIV |
| 3501 | CLASS="ANSWER" |
| 3502 | ><P |
| 3503 | ><B |
| 3504 | > </B |
| 3505 | >A new patch providing the TransferRate directive has |
| 3506 | been provided and is slated for inclusion in 1.2.8, this |
| 3507 | gives per-connection bandwidth limits with Class support. |
| 3508 | The limits are more effective against downloads than |
| 3509 | uploads.</P |
| 3510 | ><P |
| 3511 | >There is no method to control the total bandwidth a |
| 3512 | single VirtualHost context can use.</P |
| 3513 | ></DIV |
| 3514 | ></DIV |
| 3515 | ><DIV |
| 3516 | CLASS="QANDAENTRY" |
| 3517 | ><DIV |
| 3518 | CLASS="QUESTION" |
| 3519 | ><P |
| 3520 | ><A |
| 3521 | NAME="AEN693" |
| 3522 | ></A |
| 3523 | ><B |
| 3524 | >17. </B |
| 3525 | >CHMOD isn't working</P |
| 3526 | ></DIV |
| 3527 | ><DIV |
| 3528 | CLASS="ANSWER" |
| 3529 | ><P |
| 3530 | ><B |
| 3531 | > </B |
| 3532 | >AllowChmod is deprecated and has been replaced with |
| 3533 | the SITE_CHMOD expansion for controlling this |
| 3534 | functionality.</P |
| 3535 | ></DIV |
| 3536 | ></DIV |
| 3537 | ><DIV |
| 3538 | CLASS="QANDAENTRY" |
| 3539 | ><DIV |
| 3540 | CLASS="QUESTION" |
| 3541 | ><P |
| 3542 | ><A |
| 3543 | NAME="AEN698" |
| 3544 | ></A |
| 3545 | ><B |
| 3546 | >18. </B |
| 3547 | >How can I limit the size of uploaded files?</P |
| 3548 | ></DIV |
| 3549 | ><DIV |
| 3550 | CLASS="ANSWER" |
| 3551 | ><P |
| 3552 | ><B |
| 3553 | > </B |
| 3554 | >As of 1.2.7rc1 there are two new directives |
| 3555 | MaxRetrieveFileSize and MaxStoreFileSize to control the |
| 3556 | maximum size of files being transfered to or from the |
| 3557 | server.</P |
| 3558 | ></DIV |
| 3559 | ></DIV |
| 3560 | ><DIV |
| 3561 | CLASS="QANDAENTRY" |
| 3562 | ><DIV |
| 3563 | CLASS="QUESTION" |
| 3564 | ><P |
| 3565 | ><A |
| 3566 | NAME="AEN703" |
| 3567 | ></A |
| 3568 | ><B |
| 3569 | >19. </B |
| 3570 | >Can I disable Anonymous logins?</P |
| 3571 | ></DIV |
| 3572 | ><DIV |
| 3573 | CLASS="ANSWER" |
| 3574 | ><P |
| 3575 | ><B |
| 3576 | > </B |
| 3577 | >Yes, just remove all the <Anonymous> sections |
| 3578 | from your configuration file and reload the daemon.</P |
| 3579 | ></DIV |
| 3580 | ></DIV |
| 3581 | ><DIV |
| 3582 | CLASS="QANDAENTRY" |
| 3583 | ><DIV |
| 3584 | CLASS="QUESTION" |
| 3585 | ><P |
| 3586 | ><A |
| 3587 | NAME="AEN708" |
| 3588 | ></A |
| 3589 | ><B |
| 3590 | >20. </B |
| 3591 | >Limiting the connections per loginID</P |
| 3592 | ></DIV |
| 3593 | ><DIV |
| 3594 | CLASS="ANSWER" |
| 3595 | ><P |
| 3596 | ><B |
| 3597 | > </B |
| 3598 | >As of 1.2.7rc1 MaxClientsPerUser has been |
| 3599 | implemented.</P |
| 3600 | ></DIV |
| 3601 | ></DIV |
| 3602 | ><DIV |
| 3603 | CLASS="QANDAENTRY" |
| 3604 | ><DIV |
| 3605 | CLASS="QUESTION" |
| 3606 | ><P |
| 3607 | ><A |
| 3608 | NAME="AEN713" |
| 3609 | ></A |
| 3610 | ><B |
| 3611 | >21. </B |
| 3612 | >How do I configure proftpd to allow transfer |
| 3613 | resumption (for downloads and uploads)?</P |
| 3614 | ></DIV |
| 3615 | ><DIV |
| 3616 | CLASS="ANSWER" |
| 3617 | ><P |
| 3618 | ><B |
| 3619 | > </B |
| 3620 | >To allow downloads to be resumed, you need to use the |
| 3621 | AllowRetrieveRestart configuration directive.</P |
| 3622 | ><P |
| 3623 | >To allow uploads to be resumed, you need to use both the |
| 3624 | AllowOverwrite and AllowStoreRestart directives. The reason that both |
| 3625 | need to be allowed is that a restarted/resumed upload is a form of |
| 3626 | overwriting the file.</P |
| 3627 | ><P |
| 3628 | >Also note that using HiddenStor and AllowStoreRestart is incompatible, |
| 3629 | as mentioned in the documentation for the AllowStoreRestart |
| 3630 | and HiddenStor directives.</P |
| 3631 | ></DIV |
| 3632 | ></DIV |
| 3633 | ><DIV |
| 3634 | CLASS="QANDAENTRY" |
| 3635 | ><DIV |
| 3636 | CLASS="QUESTION" |
| 3637 | ><P |
| 3638 | ><A |
| 3639 | NAME="AEN720" |
| 3640 | ></A |
| 3641 | ><B |
| 3642 | >22. </B |
| 3643 | >When should the Bind directive be used?</P |
| 3644 | ></DIV |
| 3645 | ><DIV |
| 3646 | CLASS="ANSWER" |
| 3647 | ><P |
| 3648 | ><B |
| 3649 | > </B |
| 3650 | >The Bind directive is used to specify additional interfaces (addresses) |
| 3651 | for a given server; it is *not* used to configure the main interface |
| 3652 | for the server. For <VirtualHost> servers, this is not a problem, as |
| 3653 | the main interface for the server is set in the <VirtualHost> line.</P |
| 3654 | ><P |
| 3655 | >For the main "default" server, however, the controlling of the main |
| 3656 | interface is more problematic. There is currently a bug report |
| 3657 | opened for this issue:</P |
| 3658 | ><P |
| 3659 | ><A |
| 3660 | HREF="http://bugs.proftpd.org/show_bug.cgi?id=1253" |
| 3661 | TARGET="_top" |
| 3662 | >http://bugs.proftpd.org/show_bug.cgi?id=1253</A |
| 3663 | ></P |
| 3664 | ></DIV |
| 3665 | ></DIV |
| 3666 | ></DIV |
| 3667 | ></DIV |
| 3668 | ><DIV |
| 3669 | CLASS="CHAPTER" |
| 3670 | ><HR><H1 |
| 3671 | ><A |
| 3672 | NAME="AEN727" |
| 3673 | ></A |
| 3674 | >Chapter 6. Security</H1 |
| 3675 | ><DIV |
| 3676 | CLASS="QANDASET" |
| 3677 | ><DL |
| 3678 | ><DT |
| 3679 | >1. <A |
| 3680 | HREF="#AEN731" |
| 3681 | >General</A |
| 3682 | ></DT |
| 3683 | ><DT |
| 3684 | >2. <A |
| 3685 | HREF="#AEN741" |
| 3686 | >Surely running ProFTPD as non-root will help?</A |
| 3687 | ></DT |
| 3688 | ><DT |
| 3689 | >3. <A |
| 3690 | HREF="#AEN748" |
| 3691 | >How can I control what commands the server accepts?</A |
| 3692 | ></DT |
| 3693 | ><DT |
| 3694 | >4. <A |
| 3695 | HREF="#AEN753" |
| 3696 | >How can I prevent the server version from being displayed?</A |
| 3697 | ></DT |
| 3698 | ><DT |
| 3699 | >5. <A |
| 3700 | HREF="#AEN759" |
| 3701 | >I want to show a message prior to login</A |
| 3702 | ></DT |
| 3703 | ><DT |
| 3704 | >6. <A |
| 3705 | HREF="#AEN765" |
| 3706 | >I want to display a message after login</A |
| 3707 | ></DT |
| 3708 | ><DT |
| 3709 | >7. <A |
| 3710 | HREF="#AEN771" |
| 3711 | >Can I have a custom welcome response?</A |
| 3712 | ></DT |
| 3713 | ><DT |
| 3714 | >8. <A |
| 3715 | HREF="#AEN778" |
| 3716 | >External Programs</A |
| 3717 | ></DT |
| 3718 | ><DT |
| 3719 | >9. <A |
| 3720 | HREF="#AEN783" |
| 3721 | >Why do I see "No certificates found!"? </A |
| 3722 | ></DT |
| 3723 | ><DT |
| 3724 | >10. <A |
| 3725 | HREF="#AEN791" |
| 3726 | >I can delete files owned by root. Why is this?</A |
| 3727 | ></DT |
| 3728 | ></DL |
| 3729 | ><DIV |
| 3730 | CLASS="QANDAENTRY" |
| 3731 | ><DIV |
| 3732 | CLASS="QUESTION" |
| 3733 | ><P |
| 3734 | ><A |
| 3735 | NAME="AEN731" |
| 3736 | ></A |
| 3737 | ><B |
| 3738 | >1. </B |
| 3739 | >General</P |
| 3740 | ></DIV |
| 3741 | ><DIV |
| 3742 | CLASS="ANSWER" |
| 3743 | ><P |
| 3744 | ><B |
| 3745 | > </B |
| 3746 | >As with all software there have been a number of security issues |
| 3747 | during the life of the project. The most recent information can |
| 3748 | always be found on http://www.proftpd.org/security.html</P |
| 3749 | ><P |
| 3750 | >Versions 1.2.0 and above should be considered to be production code |
| 3751 | and few if any new features will be added to this code branch to |
| 3752 | maintain stability.</P |
| 3753 | ><A |
| 3754 | NAME="AEN736" |
| 3755 | ></A |
| 3756 | ><BLOCKQUOTE |
| 3757 | CLASS="BLOCKQUOTE" |
| 3758 | ><H3 |
| 3759 | CLASS="BRIDGEHEAD" |
| 3760 | ><A |
| 3761 | NAME="AEN737" |
| 3762 | ></A |
| 3763 | >What about using Stackguard?</H3 |
| 3764 | ><P |
| 3765 | >Stackguard (<A |
| 3766 | HREF="http://immunix.org" |
| 3767 | TARGET="_top" |
| 3768 | >http://immunix.org</A |
| 3769 | >) is a gcc variant which can protect programs from stack-smashing attacks, programs compiled using Stackguard dies without executing the stack code. While this approach is a good first line of defense against future problems it"s not a complete cure-all. Some of the buffer overflows were found on static variables, which are not protected by stack protection mechanisms. </P |
| 3770 | ></BLOCKQUOTE |
| 3771 | ></DIV |
| 3772 | ></DIV |
| 3773 | ><DIV |
| 3774 | CLASS="QANDAENTRY" |
| 3775 | ><DIV |
| 3776 | CLASS="QUESTION" |
| 3777 | ><P |
| 3778 | ><A |
| 3779 | NAME="AEN741" |
| 3780 | ></A |
| 3781 | ><B |
| 3782 | >2. </B |
| 3783 | >Surely running ProFTPD as non-root will help?</P |
| 3784 | ></DIV |
| 3785 | ><DIV |
| 3786 | CLASS="ANSWER" |
| 3787 | ><P |
| 3788 | ><B |
| 3789 | > </B |
| 3790 | >Running ProFTPD as a non-root user gives only a marginal security |
| 3791 | improvement on the normal case and adds some functional problems. |
| 3792 | Such as not being able to bind to ports 20 or 21, unless it's spawned |
| 3793 | from inetd.</P |
| 3794 | ><P |
| 3795 | >ProFTPD takes a middle road in terms of security. It only uses |
| 3796 | root privileges where required and drops to the UID defined in the |
| 3797 | config file at all other times. Times when root is required include, |
| 3798 | binding to ports < 1024, setting resource limits, reading |
| 3799 | configuration information and some network code.</P |
| 3800 | ><P |
| 3801 | >For Linux 2.2.x kernel systems there is the POSIX style |
| 3802 | mod_linuxprivs module which allows very fine grain control over |
| 3803 | privileges. This is highly recommended for security-conscious admins.</P |
| 3804 | ></DIV |
| 3805 | ></DIV |
| 3806 | ><DIV |
| 3807 | CLASS="QANDAENTRY" |
| 3808 | ><DIV |
| 3809 | CLASS="QUESTION" |
| 3810 | ><P |
| 3811 | ><A |
| 3812 | NAME="AEN748" |
| 3813 | ></A |
| 3814 | ><B |
| 3815 | >3. </B |
| 3816 | >How can I control what commands the server accepts?</P |
| 3817 | ></DIV |
| 3818 | ><DIV |
| 3819 | CLASS="ANSWER" |
| 3820 | ><P |
| 3821 | ><B |
| 3822 | > </B |
| 3823 | >Use a sane Allow/DenyFilter, these directives use regular |
| 3824 | expressions to control all text sent over the control socket. (If |
| 3825 | anyone has some good examples please let me know.) </P |
| 3826 | ></DIV |
| 3827 | ></DIV |
| 3828 | ><DIV |
| 3829 | CLASS="QANDAENTRY" |
| 3830 | ><DIV |
| 3831 | CLASS="QUESTION" |
| 3832 | ><P |
| 3833 | ><A |
| 3834 | NAME="AEN753" |
| 3835 | ></A |
| 3836 | ><B |
| 3837 | >4. </B |
| 3838 | >How can I prevent the server version from being displayed?</P |
| 3839 | ></DIV |
| 3840 | ><DIV |
| 3841 | CLASS="ANSWER" |
| 3842 | ><P |
| 3843 | ><B |
| 3844 | > </B |
| 3845 | >Setting SeverIdent to "off" should turn off the information about |
| 3846 | what type of server is running. To have maximum effect this directive |
| 3847 | should either be in the Global context or included in every virtual |
| 3848 | host block and the default block.</P |
| 3849 | ><PRE |
| 3850 | CLASS="PROGRAMLISTING" |
| 3851 | >ServerIdent On "Linux.co.uk server" |
| 3852 | |
| 3853 | ServerIdent Off |
| 3854 | </PRE |
| 3855 | ></DIV |
| 3856 | ></DIV |
| 3857 | ><DIV |
| 3858 | CLASS="QANDAENTRY" |
| 3859 | ><DIV |
| 3860 | CLASS="QUESTION" |
| 3861 | ><P |
| 3862 | ><A |
| 3863 | NAME="AEN759" |
| 3864 | ></A |
| 3865 | ><B |
| 3866 | >5. </B |
| 3867 | >I want to show a message prior to login</P |
| 3868 | ></DIV |
| 3869 | ><DIV |
| 3870 | CLASS="ANSWER" |
| 3871 | ><P |
| 3872 | ><B |
| 3873 | > </B |
| 3874 | >Use the DisplayConnect directive to specify a file containing a |
| 3875 | message to be displayed prior to login.</P |
| 3876 | ><PRE |
| 3877 | CLASS="PROGRAMLISTING" |
| 3878 | >DisplayConnect /ftp/ftp.virtualhost/login.msg |
| 3879 | </PRE |
| 3880 | ></DIV |
| 3881 | ></DIV |
| 3882 | ><DIV |
| 3883 | CLASS="QANDAENTRY" |
| 3884 | ><DIV |
| 3885 | CLASS="QUESTION" |
| 3886 | ><P |
| 3887 | ><A |
| 3888 | NAME="AEN765" |
| 3889 | ></A |
| 3890 | ><B |
| 3891 | >6. </B |
| 3892 | >I want to display a message after login</P |
| 3893 | ></DIV |
| 3894 | ><DIV |
| 3895 | CLASS="ANSWER" |
| 3896 | ><P |
| 3897 | ><B |
| 3898 | > </B |
| 3899 | >Use the DisplayLogin directive, this sends a specified ASCII file to the |
| 3900 | connected user.</P |
| 3901 | ><PRE |
| 3902 | CLASS="PROGRAMLISTING" |
| 3903 | >DisplayLogin /etc/proftp.msg |
| 3904 | </PRE |
| 3905 | ></DIV |
| 3906 | ></DIV |
| 3907 | ><DIV |
| 3908 | CLASS="QANDAENTRY" |
| 3909 | ><DIV |
| 3910 | CLASS="QUESTION" |
| 3911 | ><P |
| 3912 | ><A |
| 3913 | NAME="AEN771" |
| 3914 | ></A |
| 3915 | ><B |
| 3916 | >7. </B |
| 3917 | >Can I have a custom welcome response?</P |
| 3918 | ></DIV |
| 3919 | ><DIV |
| 3920 | CLASS="ANSWER" |
| 3921 | ><P |
| 3922 | ><B |
| 3923 | > </B |
| 3924 | >Use the AccessGrantMsg directive, this sends a simple single line |
| 3925 | message back to the user after a successful authentication. Magic |
| 3926 | cookies appear to be honoured in this directive.</P |
| 3927 | ><PRE |
| 3928 | CLASS="PROGRAMLISTING" |
| 3929 | >AccessGrantMsg "Guest access granted for %u." |
| 3930 | </PRE |
| 3931 | ><P |
| 3932 | >Note, this directive has an overriding default and needs to be |
| 3933 | specified in both VirtualHost and Anonymous blocks.</P |
| 3934 | ></DIV |
| 3935 | ></DIV |
| 3936 | ><DIV |
| 3937 | CLASS="QANDAENTRY" |
| 3938 | ><DIV |
| 3939 | CLASS="QUESTION" |
| 3940 | ><P |
| 3941 | ><A |
| 3942 | NAME="AEN778" |
| 3943 | ></A |
| 3944 | ><B |
| 3945 | >8. </B |
| 3946 | >External Programs</P |
| 3947 | ></DIV |
| 3948 | ><DIV |
| 3949 | CLASS="ANSWER" |
| 3950 | ><P |
| 3951 | ><B |
| 3952 | > </B |
| 3953 | >ProFTPD has been designed to run as a secure ftp server, this means |
| 3954 | that it tries to keep as much as possible under it's control. An |
| 3955 | external program is a security risk in itself because it's behaviour |
| 3956 | is not controllable from within the ftpd code.</P |
| 3957 | ></DIV |
| 3958 | ></DIV |
| 3959 | ><DIV |
| 3960 | CLASS="QANDAENTRY" |
| 3961 | ><DIV |
| 3962 | CLASS="QUESTION" |
| 3963 | ><P |
| 3964 | ><A |
| 3965 | NAME="AEN783" |
| 3966 | ></A |
| 3967 | ><B |
| 3968 | >9. </B |
| 3969 | >Why do I see "No certificates found!"? </P |
| 3970 | ></DIV |
| 3971 | ><DIV |
| 3972 | CLASS="ANSWER" |
| 3973 | ><P |
| 3974 | ><B |
| 3975 | > </B |
| 3976 | >This message is generated by mod_tls, the third-party module that can |
| 3977 | be used to encrypt both the control and data connections with TLS |
| 3978 | (Transport Layer Security), the next generation of SSL. Certificates |
| 3979 | are used to establish the security context for this secure transport.</P |
| 3980 | ><P |
| 3981 | >Generation of certifications is beyond the scope of this document; |
| 3982 | however, more information can be found here:</P |
| 3983 | ><P |
| 3984 | > <A |
| 3985 | HREF="http://en.tldp.org/HOWTO/SSL-Certificates-HOWTO/" |
| 3986 | TARGET="_top" |
| 3987 | >http://en.tldp.org/HOWTO/SSL-Certificates-HOWTO/</A |
| 3988 | ></P |
| 3989 | ></DIV |
| 3990 | ></DIV |
| 3991 | ><DIV |
| 3992 | CLASS="QANDAENTRY" |
| 3993 | ><DIV |
| 3994 | CLASS="QUESTION" |
| 3995 | ><P |
| 3996 | ><A |
| 3997 | NAME="AEN791" |
| 3998 | ></A |
| 3999 | ><B |
| 4000 | >10. </B |
| 4001 | >I can delete files owned by root. Why is this?</P |
| 4002 | ></DIV |
| 4003 | ><DIV |
| 4004 | CLASS="ANSWER" |
| 4005 | ><P |
| 4006 | ><B |
| 4007 | > </B |
| 4008 | >ProPTPD follows the UNIX file permission rules when determining the level of access and/or control a user is granted when working with a file. UNIX systems divide the world into three classes when determining the permissions that a user is granted for a particular file: |
| 4009 | <P |
| 4010 | ></P |
| 4011 | ><UL |
| 4012 | ><LI |
| 4013 | ><P |
| 4014 | >User - the owner of the file</P |
| 4015 | ></LI |
| 4016 | ><LI |
| 4017 | ><P |
| 4018 | >Group - a collection of users defined in /etc/group</P |
| 4019 | ></LI |
| 4020 | ><LI |
| 4021 | ><P |
| 4022 | >Others - neither the owner, nor a member of the group</P |
| 4023 | ></LI |
| 4024 | ></UL |
| 4025 | ></P |
| 4026 | ><P |
| 4027 | >Every file in a Unix filesystem has a permission definition associated with it. At a minimum, the permission established for a file will determine whether a particular user may READ, WRITE, or EXECUTE the file in question. A directory listing will show the permissions associated with a file in the format shown below: |
| 4028 | <PRE |
| 4029 | CLASS="PROGRAMLISTING" |
| 4030 | > rwx r-x r-x |
| 4031 | | | | |
| 4032 | | | |_____________ Others: READ/NO WRITE/EXECUTE |
| 4033 | | |__________________ Group: READ/NO WRITE/EXECUTE |
| 4034 | |_______________________ User: READ/WRITE/EXECUTE </PRE |
| 4035 | ></P |
| 4036 | ><P |
| 4037 | >In the sample directory listing shown below, READ/WRITE/EXECUTE privileges are granted to the owner of the directory, and READ/EXECUTE privileges are granted to members of the <TT |
| 4038 | CLASS="COMPUTEROUTPUT" |
| 4039 | >users</TT |
| 4040 | > group and everyone else. Note the letter "d" at the beginning of each entry, denoting that the entry is actually a directory. |
| 4041 | |
| 4042 | <PRE |
| 4043 | CLASS="PROGRAMLISTING" |
| 4044 | > prince> ls -l /home/ftp |
| 4045 | |
| 4046 | total 8 |
| 4047 | drwxr-xr-x 2 andrea users 4096 May 3 00:40 andrea |
| 4048 | drwxr-xr-x 2 eve users 4096 May 3 00:40 eve |
| 4049 | |
| 4050 | prince> ls -l /home/ftp/andrea |
| 4051 | |
| 4052 | total 156 |
| 4053 | -rw-r--r-- 1 andrea users 85991 May 3 01:12 bland.txt |
| 4054 | -rwxr-xr-x 1 root root 65107 May 3 01:12 secret.txt </PRE |
| 4055 | ></P |
| 4056 | ><P |
| 4057 | >The answer to this question is shown in the above example. When describing the permissions associated with a directory, WRITE means that permission is granted to modify the contents of a directory by adding or deleting files. Thus, the user <TT |
| 4058 | CLASS="COMPUTEROUTPUT" |
| 4059 | >andrea</TT |
| 4060 | > may delete the file <TT |
| 4061 | CLASS="COMPUTEROUTPUT" |
| 4062 | >secret.txt</TT |
| 4063 | >, even though she cannot modify the file itself.</P |
| 4064 | ><P |
| 4065 | >Refer to the documentation for the <SPAN |
| 4066 | CLASS="emphasis" |
| 4067 | ><I |
| 4068 | CLASS="EMPHASIS" |
| 4069 | >IgnoreHidden</I |
| 4070 | ></SPAN |
| 4071 | > and <SPAN |
| 4072 | CLASS="emphasis" |
| 4073 | ><I |
| 4074 | CLASS="EMPHASIS" |
| 4075 | >HideNoAccess</I |
| 4076 | ></SPAN |
| 4077 | > directives for a method to mitigate this hazard.</P |
| 4078 | ></DIV |
| 4079 | ></DIV |
| 4080 | ></DIV |
| 4081 | ></DIV |
| 4082 | ><DIV |
| 4083 | CLASS="CHAPTER" |
| 4084 | ><HR><H1 |
| 4085 | ><A |
| 4086 | NAME="AEN813" |
| 4087 | ></A |
| 4088 | >Chapter 7. User Authentication</H1 |
| 4089 | ><DIV |
| 4090 | CLASS="QANDASET" |
| 4091 | ><DL |
| 4092 | ><DT |
| 4093 | >1. <A |
| 4094 | HREF="#AEN818" |
| 4095 | >Why is PAM the default authentication system?</A |
| 4096 | ></DT |
| 4097 | ><DT |
| 4098 | >2. <A |
| 4099 | HREF="#AEN823" |
| 4100 | >Authentication methods supported</A |
| 4101 | ></DT |
| 4102 | ><DT |
| 4103 | >3. <A |
| 4104 | HREF="#AEN841" |
| 4105 | >Problems with non-PAM authentication</A |
| 4106 | ></DT |
| 4107 | ><DT |
| 4108 | >4. <A |
| 4109 | HREF="#AEN847" |
| 4110 | >AuthPAMAuthorative is an unknown directive!</A |
| 4111 | ></DT |
| 4112 | ><DT |
| 4113 | >5. <A |
| 4114 | HREF="#AEN852" |
| 4115 | >Configuring PAM</A |
| 4116 | ></DT |
| 4117 | ><DT |
| 4118 | >6. <A |
| 4119 | HREF="#AEN867" |
| 4120 | >pam_sm_open_session errors</A |
| 4121 | ></DT |
| 4122 | ><DT |
| 4123 | >7. <A |
| 4124 | HREF="#AEN872" |
| 4125 | >Normal users can't login, only anon.</A |
| 4126 | ></DT |
| 4127 | ><DT |
| 4128 | >8. <A |
| 4129 | HREF="#AEN877" |
| 4130 | >AuthPAMAuthoritative</A |
| 4131 | ></DT |
| 4132 | ><DT |
| 4133 | >9. <A |
| 4134 | HREF="#AEN885" |
| 4135 | >LDAP</A |
| 4136 | ></DT |
| 4137 | ><DT |
| 4138 | >10. <A |
| 4139 | HREF="#AEN891" |
| 4140 | >Encrypted passwords</A |
| 4141 | ></DT |
| 4142 | ><DT |
| 4143 | >11. <A |
| 4144 | HREF="#AEN896" |
| 4145 | >SecureID</A |
| 4146 | ></DT |
| 4147 | ><DT |
| 4148 | >12. <A |
| 4149 | HREF="#AEN901" |
| 4150 | >One time passwords</A |
| 4151 | ></DT |
| 4152 | ><DT |
| 4153 | >13. <A |
| 4154 | HREF="#AEN910" |
| 4155 | >RADIUS</A |
| 4156 | ></DT |
| 4157 | ><DT |
| 4158 | >14. <A |
| 4159 | HREF="#AEN915" |
| 4160 | >Anonymous password checking</A |
| 4161 | ></DT |
| 4162 | ><DT |
| 4163 | >15. <A |
| 4164 | HREF="#AEN920" |
| 4165 | >Why do I see "PAM(name): Authentication failure", but I can login |
| 4166 | anyway?</A |
| 4167 | ></DT |
| 4168 | ></DL |
| 4169 | ><P |
| 4170 | >This section is being re-written due to major structural changes to the SQL module prior to 1.2.0</P |
| 4171 | ><DIV |
| 4172 | CLASS="QANDAENTRY" |
| 4173 | ><DIV |
| 4174 | CLASS="QUESTION" |
| 4175 | ><P |
| 4176 | ><A |
| 4177 | NAME="AEN818" |
| 4178 | ></A |
| 4179 | ><B |
| 4180 | >1. </B |
| 4181 | >Why is PAM the default authentication system?</P |
| 4182 | ></DIV |
| 4183 | ><DIV |
| 4184 | CLASS="ANSWER" |
| 4185 | ><P |
| 4186 | ><B |
| 4187 | > </B |
| 4188 | >Security, pure and simple. PAM is the most secure (or securable) |
| 4189 | of the available authentication systems. Many of the issues and |
| 4190 | configuration hints for PAM are contained in README.PAM which is |
| 4191 | bundled with the server source and in the various packaged builds. To |
| 4192 | use /etc/passwd manual compilation will be required with the configure |
| 4193 | script being run with the --without-pam flag. Unless the PAM |
| 4194 | subsystem is properly configured authentication will fail.</P |
| 4195 | ></DIV |
| 4196 | ></DIV |
| 4197 | ><DIV |
| 4198 | CLASS="QANDAENTRY" |
| 4199 | ><DIV |
| 4200 | CLASS="QUESTION" |
| 4201 | ><P |
| 4202 | ><A |
| 4203 | NAME="AEN823" |
| 4204 | ></A |
| 4205 | ><B |
| 4206 | >2. </B |
| 4207 | >Authentication methods supported</P |
| 4208 | ></DIV |
| 4209 | ><DIV |
| 4210 | CLASS="ANSWER" |
| 4211 | ><P |
| 4212 | ><B |
| 4213 | > </B |
| 4214 | ><LI |
| 4215 | ><P |
| 4216 | >PAM</P |
| 4217 | ></LI |
| 4218 | ><LI |
| 4219 | ><P |
| 4220 | >Standard /etc/passwd lookups</P |
| 4221 | ></LI |
| 4222 | ><LI |
| 4223 | ><P |
| 4224 | >NIS</P |
| 4225 | ></LI |
| 4226 | ><LI |
| 4227 | ><P |
| 4228 | >Shadow passwords</P |
| 4229 | ></LI |
| 4230 | ><LI |
| 4231 | ><P |
| 4232 | >Indvidual passwd/group files for each virtual</P |
| 4233 | ></LI |
| 4234 | ><LI |
| 4235 | ><P |
| 4236 | >SQL databases</P |
| 4237 | ></LI |
| 4238 | ></P |
| 4239 | ><P |
| 4240 | >If these don't fit in with your system then writing a custom module |
| 4241 | or using such as the "ld.so.preload" approach to intercept |
| 4242 | getpwbynam() system calls works happily with ProFTPD.</P |
| 4243 | ></DIV |
| 4244 | ></DIV |
| 4245 | ><DIV |
| 4246 | CLASS="QANDAENTRY" |
| 4247 | ><DIV |
| 4248 | CLASS="QUESTION" |
| 4249 | ><P |
| 4250 | ><A |
| 4251 | NAME="AEN841" |
| 4252 | ></A |
| 4253 | ><B |
| 4254 | >3. </B |
| 4255 | >Problems with non-PAM authentication</P |
| 4256 | ></DIV |
| 4257 | ><DIV |
| 4258 | CLASS="ANSWER" |
| 4259 | ><P |
| 4260 | ><B |
| 4261 | > </B |
| 4262 | >Generally these problems will be cured by either disabling PAM |
| 4263 | completely or by ensuring that these directives are set</P |
| 4264 | ><PRE |
| 4265 | CLASS="PROGRAMLISTING" |
| 4266 | >PersistentPasswd off |
| 4267 | AuthPAMAuthoritative off |
| 4268 | </PRE |
| 4269 | ></DIV |
| 4270 | ></DIV |
| 4271 | ><DIV |
| 4272 | CLASS="QANDAENTRY" |
| 4273 | ><DIV |
| 4274 | CLASS="QUESTION" |
| 4275 | ><P |
| 4276 | ><A |
| 4277 | NAME="AEN847" |
| 4278 | ></A |
| 4279 | ><B |
| 4280 | >4. </B |
| 4281 | >AuthPAMAuthorative is an unknown directive!</P |
| 4282 | ></DIV |
| 4283 | ><DIV |
| 4284 | CLASS="ANSWER" |
| 4285 | ><P |
| 4286 | ><B |
| 4287 | > </B |
| 4288 | >Check the spelling it should be AuthPAMAuthoritative not |
| 4289 | AuthPAMAuthorative or any other variation.</P |
| 4290 | ></DIV |
| 4291 | ></DIV |
| 4292 | ><DIV |
| 4293 | CLASS="QANDAENTRY" |
| 4294 | ><DIV |
| 4295 | CLASS="QUESTION" |
| 4296 | ><P |
| 4297 | ><A |
| 4298 | NAME="AEN852" |
| 4299 | ></A |
| 4300 | ><B |
| 4301 | >5. </B |
| 4302 | >Configuring PAM</P |
| 4303 | ></DIV |
| 4304 | ><DIV |
| 4305 | CLASS="ANSWER" |
| 4306 | ><P |
| 4307 | ><B |
| 4308 | > </B |
| 4309 | >There is a README.Pam in the top directory of the ProFTPD install |
| 4310 | directory :</P |
| 4311 | ><A |
| 4312 | NAME="AEN856" |
| 4313 | ></A |
| 4314 | ><BLOCKQUOTE |
| 4315 | CLASS="BLOCKQUOTE" |
| 4316 | ><H3 |
| 4317 | CLASS="BRIDGEHEAD" |
| 4318 | ><A |
| 4319 | NAME="AEN857" |
| 4320 | ></A |
| 4321 | >Redhat Linux</H3 |
| 4322 | ><PRE |
| 4323 | CLASS="PROGRAMLISTING" |
| 4324 | >#%PAM-1.0 |
| 4325 | auth required /lib/security/pam_listfile.so item=user |
| 4326 | sense=deny file=/etc/ftpusers onerr=succeed |
| 4327 | auth required /lib/security/pam_pwdb.so shadow nullok |
| 4328 | account required /lib/security/pam_pwdb.so |
| 4329 | session required /lib/security/pam_pwdb.so |
| 4330 | </PRE |
| 4331 | ><H3 |
| 4332 | CLASS="BRIDGEHEAD" |
| 4333 | ><A |
| 4334 | NAME="AEN859" |
| 4335 | ></A |
| 4336 | >SuSE Linux</H3 |
| 4337 | ><P |
| 4338 | >SuSE appears to uses pam_unix rather than pam_pwdb which is the |
| 4339 | Redhat approach. All references to pam_pwdb should be replaced with |
| 4340 | "pam_unix" on SuSE systems.</P |
| 4341 | ><P |
| 4342 | >The following fragment is reported to work fine on SuSE 6.2</P |
| 4343 | ><PRE |
| 4344 | CLASS="PROGRAMLISTING" |
| 4345 | >/etc/pam.d/ftpd |
| 4346 | #%PAM-1.0 |
| 4347 | |
| 4348 | # Uncomment this to achieve what used to be ftpd -A. |
| 4349 | # auth required /lib/security/pam_listfile.so item=user sense=allow file=/etc/ftpchroot onerr=fail |
| 4350 | |
| 4351 | auth required /lib/security/pam_listfile.so item=user |
| 4352 | sense=deny file=/etc/ftpusers onerr=succeed |
| 4353 | auth sufficient /lib/security/pam_ftp.so |
| 4354 | auth required /lib/security/pam_unix.so |
| 4355 | auth required /lib/security/pam_shells.so |
| 4356 | account required /lib/security/pam_unix.so |
| 4357 | password required /lib/security/pam_unix.so |
| 4358 | session required /lib/security/pam_unix.so |
| 4359 | </PRE |
| 4360 | ><H3 |
| 4361 | CLASS="BRIDGEHEAD" |
| 4362 | ><A |
| 4363 | NAME="AEN863" |
| 4364 | ></A |
| 4365 | >FreeBSD</H3 |
| 4366 | ><P |
| 4367 | >FreeBSD does not support PAM session directives. If you remove the |
| 4368 | following line from the FreeBSD section of README.PAM, PAM should work |
| 4369 | properly under recent versions of FreeBSD.</P |
| 4370 | ><PRE |
| 4371 | CLASS="PROGRAMLISTING" |
| 4372 | > ftp session required pam_unix.so try_first_pass |
| 4373 | </PRE |
| 4374 | ></BLOCKQUOTE |
| 4375 | ></DIV |
| 4376 | ></DIV |
| 4377 | ><DIV |
| 4378 | CLASS="QANDAENTRY" |
| 4379 | ><DIV |
| 4380 | CLASS="QUESTION" |
| 4381 | ><P |
| 4382 | ><A |
| 4383 | NAME="AEN867" |
| 4384 | ></A |
| 4385 | ><B |
| 4386 | >6. </B |
| 4387 | >pam_sm_open_session errors</P |
| 4388 | ></DIV |
| 4389 | ><DIV |
| 4390 | CLASS="ANSWER" |
| 4391 | ><P |
| 4392 | ><B |
| 4393 | > </B |
| 4394 | >ProFTPD requires PAM version 0.59 or better. pam_sm_open_session |
| 4395 | is not part of previous versions.</P |
| 4396 | ></DIV |
| 4397 | ></DIV |
| 4398 | ><DIV |
| 4399 | CLASS="QANDAENTRY" |
| 4400 | ><DIV |
| 4401 | CLASS="QUESTION" |
| 4402 | ><P |
| 4403 | ><A |
| 4404 | NAME="AEN872" |
| 4405 | ></A |
| 4406 | ><B |
| 4407 | >7. </B |
| 4408 | >Normal users can't login, only anon.</P |
| 4409 | ></DIV |
| 4410 | ><DIV |
| 4411 | CLASS="ANSWER" |
| 4412 | ><P |
| 4413 | ><B |
| 4414 | > </B |
| 4415 | >Check that the /etc/pam.d/ftp file exists on the system and is |
| 4416 | configured as detailed in README.PAM</P |
| 4417 | ></DIV |
| 4418 | ></DIV |
| 4419 | ><DIV |
| 4420 | CLASS="QANDAENTRY" |
| 4421 | ><DIV |
| 4422 | CLASS="QUESTION" |
| 4423 | ><P |
| 4424 | ><A |
| 4425 | NAME="AEN877" |
| 4426 | ></A |
| 4427 | ><B |
| 4428 | >8. </B |
| 4429 | >AuthPAMAuthoritative</P |
| 4430 | ></DIV |
| 4431 | ><DIV |
| 4432 | CLASS="ANSWER" |
| 4433 | ><P |
| 4434 | ><B |
| 4435 | > </B |
| 4436 | >Currently AuthPAMAuthoritative defaults on "ON" resulting in login |
| 4437 | failures if PAM cannot authenticate the user. This breaks the |
| 4438 | AuthUserFile directive as it never gets a chance to authenticate the |
| 4439 | user unless the AuthPAMAuthoritative directive is set to "OFF"</P |
| 4440 | ><P |
| 4441 | >The reasoning behind the current default is to ensure that the |
| 4442 | system is secure by default requiring that the admin explicitly and |
| 4443 | knowingly has to disable it. There are discussions underway which |
| 4444 | may result in the directive flipping to a default of "Off" if |
| 4445 | AuthUserFile is specified.</P |
| 4446 | ><P |
| 4447 | ><SPAN |
| 4448 | CLASS="emphasis" |
| 4449 | ><I |
| 4450 | CLASS="EMPHASIS" |
| 4451 | >Note:</I |
| 4452 | ></SPAN |
| 4453 | > as of the current CVS and the forthcoming pre9 |
| 4454 | release the default has changed to "Off"</P |
| 4455 | ></DIV |
| 4456 | ></DIV |
| 4457 | ><DIV |
| 4458 | CLASS="QANDAENTRY" |
| 4459 | ><DIV |
| 4460 | CLASS="QUESTION" |
| 4461 | ><P |
| 4462 | ><A |
| 4463 | NAME="AEN885" |
| 4464 | ></A |
| 4465 | ><B |
| 4466 | >9. </B |
| 4467 | >LDAP</P |
| 4468 | ></DIV |
| 4469 | ><DIV |
| 4470 | CLASS="ANSWER" |
| 4471 | ><P |
| 4472 | ><B |
| 4473 | > </B |
| 4474 | >mod_ldap is currently stable; there were a couple bugs that were |
| 4475 | squashed after release 1.0 of the module. it is still udner |
| 4476 | development , check the <A |
| 4477 | HREF="http://horde.net/~jwm/software/mod_ldap/" |
| 4478 | TARGET="_top" |
| 4479 | >http://horde.net/~jwm/software/mod_ldap/</A |
| 4480 | > for |
| 4481 | more information. There is an example config fragment on the author's |
| 4482 | site which gives a reasonable idea on how to use this module.</P |
| 4483 | ></DIV |
| 4484 | ></DIV |
| 4485 | ><DIV |
| 4486 | CLASS="QANDAENTRY" |
| 4487 | ><DIV |
| 4488 | CLASS="QUESTION" |
| 4489 | ><P |
| 4490 | ><A |
| 4491 | NAME="AEN891" |
| 4492 | ></A |
| 4493 | ><B |
| 4494 | >10. </B |
| 4495 | >Encrypted passwords</P |
| 4496 | ></DIV |
| 4497 | ><DIV |
| 4498 | CLASS="ANSWER" |
| 4499 | ><P |
| 4500 | ><B |
| 4501 | > </B |
| 4502 | >There are patches which are being merged in at the moment to provide |
| 4503 | SHA encryption. The plan is to have the server get all user information |
| 4504 | except passwords via an anonymous bind. The server will then reconnect |
| 4505 | as a user is logging in and attempt to get the password via an encrypted |
| 4506 | connection. This should be in the next major release (2.5)</P |
| 4507 | ></DIV |
| 4508 | ></DIV |
| 4509 | ><DIV |
| 4510 | CLASS="QANDAENTRY" |
| 4511 | ><DIV |
| 4512 | CLASS="QUESTION" |
| 4513 | ><P |
| 4514 | ><A |
| 4515 | NAME="AEN896" |
| 4516 | ></A |
| 4517 | ><B |
| 4518 | >11. </B |
| 4519 | >SecureID</P |
| 4520 | ></DIV |
| 4521 | ><DIV |
| 4522 | CLASS="ANSWER" |
| 4523 | ><P |
| 4524 | ><B |
| 4525 | > </B |
| 4526 | >No support yet</P |
| 4527 | ></DIV |
| 4528 | ></DIV |
| 4529 | ><DIV |
| 4530 | CLASS="QANDAENTRY" |
| 4531 | ><DIV |
| 4532 | CLASS="QUESTION" |
| 4533 | ><P |
| 4534 | ><A |
| 4535 | NAME="AEN901" |
| 4536 | ></A |
| 4537 | ><B |
| 4538 | >12. </B |
| 4539 | >One time passwords</P |
| 4540 | ></DIV |
| 4541 | ><DIV |
| 4542 | CLASS="ANSWER" |
| 4543 | ><P |
| 4544 | ><B |
| 4545 | > </B |
| 4546 | >This is possible using either PAM or the Opie modules. The module |
| 4547 | passes back a challenge which the user puts into a key generator along |
| 4548 | with their "pass phrase" and it gives them back 5 words which get sent |
| 4549 | as the password. As long as you do it correctly it will never repeat.</P |
| 4550 | ><P |
| 4551 | >It requires <A |
| 4552 | HREF="http://inner.net/opie/" |
| 4553 | TARGET="_top" |
| 4554 | >http://inner.net/opie/</A |
| 4555 | > to be installed on the server. There are key gen clients for win95/98, *nix, mac.</P |
| 4556 | ><P |
| 4557 | ><A |
| 4558 | HREF="ftp://ftp.urbanrage.com/pub/c/mod_opie.c" |
| 4559 | TARGET="_top" |
| 4560 | >ftp://ftp.urbanrage.com/pub/c/mod_opie.c</A |
| 4561 | ></P |
| 4562 | ></DIV |
| 4563 | ></DIV |
| 4564 | ><DIV |
| 4565 | CLASS="QANDAENTRY" |
| 4566 | ><DIV |
| 4567 | CLASS="QUESTION" |
| 4568 | ><P |
| 4569 | ><A |
| 4570 | NAME="AEN910" |
| 4571 | ></A |
| 4572 | ><B |
| 4573 | >13. </B |
| 4574 | >RADIUS</P |
| 4575 | ></DIV |
| 4576 | ><DIV |
| 4577 | CLASS="ANSWER" |
| 4578 | ><P |
| 4579 | ><B |
| 4580 | > </B |
| 4581 | >The new mod_radius module provides RADIUS authentication |
| 4582 | and accounting support to ProFTPD. </P |
| 4583 | ></DIV |
| 4584 | ></DIV |
| 4585 | ><DIV |
| 4586 | CLASS="QANDAENTRY" |
| 4587 | ><DIV |
| 4588 | CLASS="QUESTION" |
| 4589 | ><P |
| 4590 | ><A |
| 4591 | NAME="AEN915" |
| 4592 | ></A |
| 4593 | ><B |
| 4594 | >14. </B |
| 4595 | >Anonymous password checking</P |
| 4596 | ></DIV |
| 4597 | ><DIV |
| 4598 | CLASS="ANSWER" |
| 4599 | ><P |
| 4600 | ><B |
| 4601 | > </B |
| 4602 | >Is it possible to check an offered email address in an anonymous |
| 4603 | login before allowing access. Simple answer, not a hope in hell, |
| 4604 | anonymous access is pretty much designed to be freely open without |
| 4605 | checks and restrictions other than those placed on upload/download |
| 4606 | from the site. The best that can be hoped for is decent logging and |
| 4607 | tracking of accesses, and the requesting IP.</P |
| 4608 | ></DIV |
| 4609 | ></DIV |
| 4610 | ><DIV |
| 4611 | CLASS="QANDAENTRY" |
| 4612 | ><DIV |
| 4613 | CLASS="QUESTION" |
| 4614 | ><P |
| 4615 | ><A |
| 4616 | NAME="AEN920" |
| 4617 | ></A |
| 4618 | ><B |
| 4619 | >15. </B |
| 4620 | >Why do I see "PAM(name): Authentication failure", but I can login |
| 4621 | anyway?</P |
| 4622 | ></DIV |
| 4623 | ><DIV |
| 4624 | CLASS="ANSWER" |
| 4625 | ><P |
| 4626 | ><B |
| 4627 | > </B |
| 4628 | >If the operating system supports PAM (Pluggable Authentication Modules) |
| 4629 | proftpd will perform PAM authentication by default. However, this |
| 4630 | authentication is not "authoritative" by default, meaning that |
| 4631 | a PAM authentication failure will not necessary cause a login to |
| 4632 | fail. The use of PAM can be configured using the AuthPAM configuration |
| 4633 | directive; the "authoritativeness" of any PAM checks is controlled via |
| 4634 | the AuthPAMAuthoritative configuration directive.</P |
| 4635 | ></DIV |
| 4636 | ></DIV |
| 4637 | ></DIV |
| 4638 | ></DIV |
| 4639 | ><DIV |
| 4640 | CLASS="CHAPTER" |
| 4641 | ><HR><H1 |
| 4642 | ><A |
| 4643 | NAME="AEN924" |
| 4644 | ></A |
| 4645 | >Chapter 8. FAQ Notes</H1 |
| 4646 | ><DIV |
| 4647 | CLASS="QANDASET" |
| 4648 | ><DL |
| 4649 | ><DT |
| 4650 | >1. <A |
| 4651 | HREF="#AEN928" |
| 4652 | >History</A |
| 4653 | ></DT |
| 4654 | ><DT |
| 4655 | >2. <A |
| 4656 | HREF="#AEN934" |
| 4657 | >Acknowledgements and Thanks</A |
| 4658 | ></DT |
| 4659 | ></DL |
| 4660 | ><DIV |
| 4661 | CLASS="QANDAENTRY" |
| 4662 | ><DIV |
| 4663 | CLASS="QUESTION" |
| 4664 | ><P |
| 4665 | ><A |
| 4666 | NAME="AEN928" |
| 4667 | ></A |
| 4668 | ><B |
| 4669 | >1. </B |
| 4670 | >History</P |
| 4671 | ></DIV |
| 4672 | ><DIV |
| 4673 | CLASS="ANSWER" |
| 4674 | ><P |
| 4675 | ><B |
| 4676 | > </B |
| 4677 | >The original text for this document was based on the |
| 4678 | configuration FAQ on www.proftpd.org. It was taken over in |
| 4679 | Sept 1999 when the maintainer of the software changed.</P |
| 4680 | ><P |
| 4681 | >The faq is maintained by a group of people (usually |
| 4682 | lurking on irc or on proftpd-docs) using CVS and Docbook.</P |
| 4683 | ></DIV |
| 4684 | ></DIV |
| 4685 | ><DIV |
| 4686 | CLASS="QANDAENTRY" |
| 4687 | ><DIV |
| 4688 | CLASS="QUESTION" |
| 4689 | ><P |
| 4690 | ><A |
| 4691 | NAME="AEN934" |
| 4692 | ></A |
| 4693 | ><B |
| 4694 | >2. </B |
| 4695 | >Acknowledgements and Thanks</P |
| 4696 | ></DIV |
| 4697 | ><DIV |
| 4698 | CLASS="ANSWER" |
| 4699 | ><P |
| 4700 | ><B |
| 4701 | > </B |
| 4702 | >Thanks to the developers, anyone who's posted useful information to |
| 4703 | the mailing lists and those who've mailed me direct.</P |
| 4704 | ><P |
| 4705 | >This document couldn't have been maintained without the Sgml Tools |
| 4706 | package and the document layout defined by the Linux HOWTO |
| 4707 | maintainers. </P |
| 4708 | ><P |
| 4709 | >Some specific mentions, in no particular order, and I've missed |
| 4710 | anyone please drop me a line.</P |
| 4711 | ><P |
| 4712 | ></P |
| 4713 | ><TABLE |
| 4714 | BORDER="0" |
| 4715 | ><TBODY |
| 4716 | ><TR |
| 4717 | ><TD |
| 4718 | >Updates to the SQL section, Michael Grabenstein |
| 4719 | <[email protected]></TD |
| 4720 | ></TR |
| 4721 | ><TR |
| 4722 | ><TD |
| 4723 | >Matt Mozur, who's been cleaning up some of my mess |
| 4724 | and generally stuffing patches in my direction.</TD |
| 4725 | ></TR |
| 4726 | ><TR |
| 4727 | ><TD |
| 4728 | >TJ Saunders, for the HOWTOs and other docs.</TD |
| 4729 | ></TR |
| 4730 | ></TBODY |
| 4731 | ></TABLE |
| 4732 | ><P |
| 4733 | ></P |
| 4734 | ></DIV |
| 4735 | ></DIV |
| 4736 | ></DIV |
| 4737 | ></DIV |
| 4738 | ></DIV |
| 4739 | ></BODY |
| 4740 | ></HTML |
| 4741 | > |