Can we create FTP users within Rails?

Hi All,

I plan to use the vsftpd FTP damon in Ubuntu Linux server running my
rails website. My website needs automatically create new FTP accounts
everytime a new registration occurs.

I have done basic homework of googling and search this forum and cannot
find any sugestion or good examples. Can someone please give me some
idea on what steps I need to program (rails code example)?

I am new to Linux / rails world. Thanks.



That's easy, simply make a system call within your Rails app using
backticks, and pass the command to create new ftp accounts. You MUST
make sure the passed is safe and has been sanitized.

Does anybody else get the heebie-jeebies at the thought of running a web app under a user account w/perms enough to create FTP users? :wink:

Have you considered other methods for empowering your users to move files back & forth to your server (e.g., attachment_fu)? If that would suit, you'll probably wind up w/a more secure app...



Agreed. Giving Rails any FTP privileges beyond read is a disaster waiting to
happen. Go with something that will allow Rails to handle file transfer on
it's own.

JB, take a look at Boxroom. This is what I use
for sharing files between clients and friends. I run it as it's own
application, but with a little tinkering you can integrate it into whatever
you're doing.