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 Tue May 26 11:31:48 -0700 2009 Put the license into its own file. [bernd]
file README.textile Tue May 26 11:44:09 -0700 2009 Merge branch 'master' of git@git.office.bytemin... [bernd]
directory app/ Tue May 26 10:06:05 -0700 2009 Establish one-to-one association between User a... [bernd]
directory db/ Tue May 26 10:04:30 -0700 2009 Rename the user column to users. [bernd]
file init.rb Tue May 26 11:46:38 -0700 2009 Bump to version 1.0. [bernd]
directory lang/ Tue May 26 09:21:09 -0700 2009 Import empty redmine plugin. [bernd]
directory lib/ Tue May 26 10:06:05 -0700 2009 Establish one-to-one association between User a... [bernd]
directory test/ Tue May 26 09:25:27 -0700 2009 Add a PureftpdUser model. [bernd]
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>