| 1 | <!DOCTYPE html> |
| 2 | <html> |
| 3 | <head> |
| 4 | <title>ProFTPD: .ftpaccess Files</title> |
| 5 | </head> |
| 6 | |
| 7 | <body bgcolor=white> |
| 8 | |
| 9 | <hr> |
| 10 | <center><h2><b>ProFTPD: <code>.ftpaccess</code> Files</b></h2></center> |
| 11 | <hr> |
| 12 | |
| 13 | <p> |
| 14 | A <code>.ftpaccess</code> file is meant to function like Apache's |
| 15 | <code>.htaccess</code> file: a file that acts as free-floating section of the |
| 16 | server's configuration file. If a <code>.ftpaccess</code> file is present in |
| 17 | a directory in which ProFTPD performs some action, ProFTPD will parse that |
| 18 | <code>.ftpaccess</code> file as a configuration file, and act accordingly. |
| 19 | Note that only <i>some</i> configuration directives are allowed in the |
| 20 | <code>.ftpaccess</code> section, though. |
| 21 | |
| 22 | <p> |
| 23 | The advantage of having this capability is that users can customize how the |
| 24 | server treats directories that are under the user's control, by using files |
| 25 | placed in those directories, instead of allowing the user to modify the main |
| 26 | server configuration file itself. The disadvantage is that a user is |
| 27 | capable of possibly overriding a configuration value that was set in the main |
| 28 | configuration file for a specific purpose. |
| 29 | |
| 30 | <p> |
| 31 | ProFTPD treats a directory that contains a <code>.ftpaccess</code> file |
| 32 | exactly as if the configuration directives in that file had been placed in |
| 33 | a <code><Directory></code> section in the main <code>proftpd.conf</code> |
| 34 | file. For example, if there is a <code>/home/users/bob</code> directory on |
| 35 | your system, and in that directory there was a <code>.ftpaccess</code> file |
| 36 | that contained: |
| 37 | <pre> |
| 38 | DirFakeUser on ~ |
| 39 | DirFakeGroup on ~ |
| 40 | Umask 0077 |
| 41 | </pre> |
| 42 | it would be treated exactly as if: |
| 43 | <pre> |
| 44 | <Directory /home/users/bob> |
| 45 | DirFakeUser on ~ |
| 46 | DirFakeGroup on ~ |
| 47 | Umask 0077 |
| 48 | </Directory> |
| 49 | </pre> |
| 50 | was written into <code>proftpd.conf</code>. |
| 51 | |
| 52 | <p> |
| 53 | The <a href="../modules/mod_core.html#AllowOverride"><code>AllowOverride</code></a> directive can be used to disable ProFTPD's support for <code>.ftpaccess</code> files. |
| 54 | |
| 55 | <p> |
| 56 | <hr> |
| 57 | <font size=2><b><i> |
| 58 | © Copyright 2017 The ProFTPD Project<br> |
| 59 | All Rights Reserved<br> |
| 60 | </i></b></font> |
| 61 | <hr> |
| 62 | |
| 63 | </body> |
| 64 | </html> |