public
Description: This Redmine plugin maintains a table with pureftpd compatible users.
Homepage:
Clone URL: git://github.com/bytemine/redmine_pureftpd_user.git
name age message
file LICENSE Loading commit data...
file README.textile
directory app/
directory db/
file init.rb
directory lang/
directory lib/
directory test/
README.textile

Redmine Pureftpd User

This is a plugin for Redmine that maintains a separate
user table with passwords encrypted by crypt(3).

That table can be queried by pureftpd.

Installing

  1. Run script/plugin install git://github.com/bytemine/redmine_pureftpd_user
  2. Run rake db:migrate_plugins
  3. Restart your web server

Usage

The plugin will transparently maintain the extra table.

Just point pureftpd to the pureftpd_users table.

Example pureftpd configuration

Here’s an example pureftpd-mysql.conf:

MYSQLSocket     /var/lib/mysql/mysql.sock
MYSQLUser       ftpuser
MYSQLPassword   insertyourpassword
MYSQLDatabase   your_redmine_database
MYSQLCrypt      crypt
MYSQLGetPW      SELECT password FROM pureftpd_users WHERE username="\L"
MYSQLDefaultUID 1000
MYSQLDefaultGID 1000
MYSQLGetDir     SELECT "/ftp"

Hint: Don’t use your rails user to access the Redmine database.

Create a pureftpd user who can only access the pureftpd_users table.

GRANT SELECT ON your_redmine_database.pureftpd_users TO 'ftpuser'@'localhost' IDENTIFIED BY 'insertyourpassword';

Caveats

Since it’s not possible to decrypt Redmine’s user passwords (which is good),
it’s not possible to create pureftpd users for existing user accounts.

You have to change the user’s password to create a pureftpd user.

TODO

  • Add tests!
  • Locked users shouldn’t be able to login via ftp.

License

See LICENSE file.

Author

Bernd Ahlers <ahlers@bytemine.net>