Vsftpd

From Amahi Wiki
Jump to: navigation, search

This is being migrated into the installable apps soon.

Install webmin module

   wget http://provider4u.de/images/stories/DOWNLOADS/vsftpd.tar.gz

Open webmin, click webmin, webmin configuration, webmin modules, make sure "local file is checked, click '...' point to vsftpd.tar.gz then goto ok. You should now see vsftpd in the servers in webmin, however it doesn't work. you need to click on the edit config and change the path to the vsftpd.conf to /etc/vsftpd/vsftpd.conf

 

 

Optional, but recommended

At this point you should be able to FTP to your HDA, but all you get access to is your /home folder. To make the FTP server more useful you need a way to access your Shares through FTP. The best way to do this unclear at the time of this writing. This would depend on wether you use greyhole or not.

I use greyhole and used the following to successfully access my shares through FTP. I don't see why this wouldn't work with a "non-greyhole" setup. But I have no way to test it. *Attempt at your own risk*

I am currently looking into and testing other ways to accomplish this.


The following instructions are paraphrased and/or quoted from Mount_Shares_Locally

"Mounting your Samba shares locally is useful when you are using Greyhole, and want to write or in any way work with those files locally. Greyhole data should only be accessed through shares, so mounting those shares locally is an easy way to work with Greyhole data safely."


I run my HDA headless and ssh in to perform any administration. If you are doing this from the HDA desktop then the steps will be virtually the same. Simply open a terminal, and use whatever text editor you want to edit the files.

You will see references to your_username, your_password, and your_domain
Obviously you need to change these to match your setup.
  • your_username should be the Amahi user that you normally use for remote access to the HDA.
  • your_password should be the Amahi password of that user.
  • your_domain will most likely be HOME (unless you know otherwise use HOME)


First we need to install the mount_shares_locally initd script
Open an ssh connection to your HDA, or open a terminal.

Login in to the regular user account.

In the console type su then hit enter
enter your root password and hit enter

Now run the following commands

curl -o /etc/init.d/mount_shares_locally http://dl.dropbox.com/u/3022105/Amahi/mount_shares_locally
chmod +x /etc/init.d/mount_shares_locally
chkconfig --add mount_shares_locally

Now edit mount_shares_locally with the following

nano /etc/init.d/mount_shares_locally

go down to line 12 and replace your_username with your hda username

Press ctrl+x then Y to confirm saving changes
press enter

Now we need to make a .smb_credentials file

Issue the following command

nano /home/your_username/.smb_credentials

enter following lines

username=your_username
password=your_password
domain=your_domain (probably HOME)

Press ctrl+x then Y to confirm saving changes
make sure File Name to Write is /home/your_username/.smb_credentials
press enter


Now you should test your new mounts using the following

service mount_shares_locally start
cd /mnt/samba
ls or dir

You should see your Shares listed

"Note: if you used /etc/rc.local and /etc/fstab to mount shares locally in the past, you can remove what you added in those files now. The above initd script replaces all this."

Now you have 2 options for accessing the shares with your FTP client

  1. If you want access to your /home directory AND the shares then do the following command
    • ln -s /mnt/samba /home/your_username/Shares

  2. If you only wish to access the shares then you should set your default remote directory in your FTP client to /mnt/samba


That's it your all set