Re: [Proftpd-user] Wrong ordering of mod_auth_file and mod_sql breaks AuthFile user authentication
"TJ Saunders" <[email protected]> Sun, 09 Jul 2023 08:30:58 -0700
| Newsgroups | gmane.network.proftpd.user |
|---|---|
| Message-ID | <[email protected]> |
> 2023-07-09 11:31:40,139 mod_sql/4.5[857014]: error opening SQLite > database '/var/lib/proftpd.db': unable to open database file (No such > file or directory) > 2023-07-09 11:31:40,139 mod_sql/4.5[857014]: exiting sqlite > cmd_open > 2023-07-09 11:31:40,139 mod_sql/4.5[857014]: exiting sqlite > cmd_select > 2023-07-09 11:31:40,139 mod_sql/4.5[857014]: unrecoverable backend > error > 2023-07-09 11:31:40,139 mod_sql/4.5[857014]: error: > 'mod_sql_sqlite/0.4' > 2023-07-09 11:31:40,139 mod_sql/4.5[857014]: message: 'unable to > open database file (No such file or directory)' > > This happens because chroot() is called before the file is opened, as > the config contains `DefaultRoot ~`. Therefore, the issue does not occur > when that setting is absent. > > A couple of things interest me: > > - Why is the user looked up using mod_sql used when authenticating with > a valid AuthUser? I would expect ProFTPD to exit on the first match, > according to the AuthOrder. And with the 'broken' AuthOrder, AuthFile > comes first. > - Why is chroot() called during authentication? Can you provide the full ProFTPD configuration you are using, so that we can see everything that might be relevant to this question? Cheers, TJ _______________________________________________ ProFTPD Users List <[email protected]> Unsubscribe problems? http://www.proftpd.org/list-unsub.html