Changes

From Amahi Wiki
Jump to: navigation, search
3,578 bytes added ,  02:11, 24 January 2011
no edit summary
=== Install vsftpd === yum -y install vsftpd=== Start This is being migrated into the FTP service === service vsftpd startinstallable apps soon.
=== Install webmin module ===
As root, from root folder
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
 
I intend to include instructions on how to implement this, however I have not started yet, but http://wiki.amahi.org/index.php/Mount_Shares_Locally would mount all the shares which would be nice as the homedir for the ftp.
[[Image:vsftpd-ss.png]]
[[Image:vsftpd-logo.png]]
====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
 
<div style="border: 1px solid #A3B1BF; padding: .5em 1em; color: #000; background-color: #E6F2FF; margin: 3px 3px 1em 3px; overflow: scroll">
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
</div>
 
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
<div style="border: 1px solid #A3B1BF; padding: .5em 1em; color: #000; background-color: #E6F2FF; margin: 3px 3px 1em 3px;">
username=your_username
password=your_password
domain=your_domain (probably HOME)
</div>
 
Press ''ctrl+x'' then ''Y'' to confirm saving changes<br>
make sure ''File Name to Write'' is ''/home/your_username/.smb_credentials''<br>
press ''enter''
 
 
Now you should test your new mounts using the following
<div style="border: 1px solid #A3B1BF; padding: .5em 1em; color: #000; background-color: #E6F2FF; margin: 3px 3px 1em 3px;">
service mount_shares_locally start
cd /mnt/samba
ls or dir
</div>
 
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
 
#If you want access to your /home directory AND the shares then do the following command
#*''ln -s /mnt/samba /home/''your_username''/Shares''<br><br>
#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
2

edits