1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> 2<HTML> 3<HEAD> 4 <META NAME="GENERATOR" CONTENT="LinuxDoc-Tools 0.9.21"> 5 <TITLE>bftpd documentation: Configuration</TITLE> 6 <LINK HREF="bftpddoc-en-4.html" REL=next> 7 <LINK HREF="bftpddoc-en-2.html" REL=previous> 8 <LINK HREF="bftpddoc-en.html#toc3" REL=contents> 9</HEAD> 10<BODY> 11<A HREF="bftpddoc-en-4.html">Next</A> 12<A HREF="bftpddoc-en-2.html">Previous</A> 13<A HREF="bftpddoc-en.html#toc3">Contents</A> 14<HR> 15<H2><A NAME="s3">3.</A> <A HREF="bftpddoc-en.html#toc3">Configuration</A></H2> 16 17<H2><A NAME="ss3.1">3.1</A> <A HREF="bftpddoc-en.html#toc3.1">User management</A> 18</H2> 19 20<P>You can manage the users simply by editing /etc/passwd and, if your system supports it, /etc/shadow. Any user existent in /etc/passwd can connect to the FTP server if he has a usable password and meets certain configurable criteria. Having anonymous users is possible by setting a configuration variable called ANONYMOUS_USER to yes. PAM is also supported.</P> 21<H2><A NAME="ss3.2">3.2</A> <A HREF="bftpddoc-en.html#toc3.2">The configuration file</A> 22</H2> 23 24<H3>The global structure</H3> 25 26<P>In the "global" structure, you can assign values to configuration options. The syntax is like the following: 27<BLOCKQUOTE><CODE> 28<PRE> 29global { 30 name1="value1" 31 name2="value2" 32} 33</PRE> 34</CODE></BLOCKQUOTE> 35</P> 36<H3>User structures</H3> 37 38<P>There are also user structures, in which you can override the global settings for particular users. Example: 39<BLOCKQUOTE><CODE> 40<PRE> 41global { 42 name1="value1" 43 name2="value2" 44} 45user foo { 46 name1="value3" 47} 48</PRE> 49</CODE></BLOCKQUOTE> 50 51If the user foo is logged in, name1 will be value3. If another user is logged in, name1 will be value1. name2 is always value2.</P> 52<H3>Group structures</H3> 53 54<P>You can also define options for groups of users. It is just as it would be for one user, but you can put more than one user in a group. You can also put system groups into them by using the @ character. Example: 55<BLOCKQUOTE><CODE> 56<PRE> 57group foo,bar,@baz { 58 name1="value1" 59} 60</PRE> 61</CODE></BLOCKQUOTE> 62 63This options affect the users foo and bar and every user who is in the system group baz. A supplementary membership is sufficient.</P> 64<H3>Directory structures</H3> 65 66<P>You can set options which affects only the users who are in a certain directory, or in any subdirectory of it, recursively. Note that you must put these structures <EM>inside</EM> the global, user and group structures. This way, you can also override directory-specific settings for particular users. Example: 67<BLOCKQUOTE><CODE> 68<PRE> 69global { 70 name1="value1" 71 directory "/foo" { 72 name1="value2" 73 } 74} 75user bar { 76 directory "/foo" { 77 name1="value3" 78 } 79} 80</PRE> 81</CODE></BLOCKQUOTE> 82 83In this example, name1 will be value3 if the user bar is in the directory /foo. It will be value2 if another user is in the directory /foo. In any other case, it will be value1.</P> 84<P>An explanation of the name/value pairs is in the example configuration file supplied with bftpd (if you are not upgrading, this file has already been copied to /etc on your system). Modify it so that it fits your needs. The defaults should be OK though.</P> 85<HR> 86<A HREF="bftpddoc-en-4.html">Next</A> 87<A HREF="bftpddoc-en-2.html">Previous</A> 88<A HREF="bftpddoc-en.html#toc3">Contents</A> 89</BODY> 90</HTML> 91