This site has been archived and will no longer be updated.
You can find my new profile at neilpahl.com. My new blog is at 808.ninja.
It's a lot nicer to upload/download files when they are mounted into your filesystem
curlftpfs can be downloaded, and built from source from their sourceforge site, but on ubuntu its easy enough to just
sudo apt-get install curlftpfs
create a folder which will act as a symlink to the remote ftp (recomend in your ~ directory so you dont have to use sudo to access /mnt/)
mkdir /path/to/my/folder
then you can temporarily (untill restart or power down) mount that location using
curlftpfs ftp_un:ftp_pw@address_of_ftp /path/to/my/folder
Now, the above is not that great because you never want to type cleartext passwords in the command line. They get stored into the command history and could be potientially seen by other users. Even though FTP isn't that safe in the first place (passwords and everything get transmitted in cleartext), we don't want to make matters worse. I would never use ftp if i did't have to, haha.
With smb mounts, we should use a credential file. similarly, with curlftp mounts we will use the /root/.netrc file
we can create a /root/.netrc file to hold our ftp credentials:
sudo vi /root/.netrc
and put the following in it:
machine address_of_ftp login ftp_un password ftp_pw
then change the permissions so that noone can read it:
sudo chmod 600 /root/.netrc
check your uid and gid with
id
in this case, my uid is 1000 and gid is 1000
and in the /etc/fstab file, add the line:
curlftpfs#address_of_ftp /path/to/my/folder fuse allow_other,uid=1000,gid=1000,umask=0022 0 0
Since its in the fstab, it will mount when we restart. If we want to mount it right away, use:
sudo mount -a
and you are done!
PLEASE let me know if I'm doing something wrong, or if you have any suggestions or requests~
blog comments powered by Disqus