Highland Linux User Group

Linux Community
It is currently Sun May 20, 2012 4:32 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: Mon Jun 06, 2011 9:28 pm 
Offline
Moderator
User avatar

Joined: Tue Oct 03, 2006 12:27 pm
Posts: 167
Location: Inverness UK
CurlFtpFS differentiates itself from other FTP filesystems because it features:

* SSLv3 and TLSv1 support
* connecting through tunneling HTTP proxies
* automatically reconnection if the server times out
* transform absolute symlinks to point back into the ftp file system

Install CurlFtpFS in Ubuntu

Code:
 sudo apt-get install curlftpfs


Replacing the appropriate settings, mount the share with
Code:
sudo curlftpfs -o umask=0777,uid=500,gid=500,allow_other ftp://username:password@your.ftpserver.here /media/ftpmountedhere


Make sure that the location to mount to is already created and readable and writable by all users.

A better way is use mount and umount. To do this the following lines need to be added to /etc/fstab:
File: /etc/fstab

Code:
#mount
curlftpfs#user:password@server.tld/remote/path /mount/point fuse user,disable_eprt,rw,uid=500,allow_other,noauto 0 0
#un-mount
curlftpfs#user:password@server.tld/remote/path /mount/point fuse.curlftpfs user,disable_eprt,noauto


The first line allows mount to work, the second umount to work. Additional options are:

Code:
User and password : ftp://user:password@ftp/

Specific port : ftp://ftp:8585


Now, you should be able to:

Code:
mount /path/to/mountpoint


and
Code:
umount /path/to/mountpoint


Security Issues
Try to run the command line below:

Code:
ps aux | grep curlftpfs


OMG! my username and password of my ftp host is visible. I am very sensitive about this, I don’t want it to be so visible, what should I do?

You can create .netrc under root directory and modified the mount line in /etc/fstab.

1. Create /root/.netrc and paste these lines in it.

Code:
machine ftp.byexamples.com
login myusername
password mypassword


2. Modified the user mode of the file

Code:
sudo chmod o-rw /root/.netrc


if you have more than one ftp server just need to change each server login to each line

Code:
machine 192.168.0.1 login xxxx password 12345
machine 192.168.0.2 login xxxx password 12345


3. Modified /etc/fstab

Code:
#mount
curlftpfs#user:password@server.tld/remote/path /mount/point fuse user,disable_eprt,rw,uid=500,allow_other,noauto 0 0
#un-mount
curlftpfs#user:password@server.tld/remote/path /mount/point fuse.curlftpfs user,disable_eprt,noauto


Although your /root/.netrc is in plain text, but you will need to gain root privilege in order to access the file.

update /etc/rc.local
Code:
curlftpfs -o umask=0777,uid=500,gid=500,allow_other ftp.server.com /mount/path


All the best

_________________
Computers are like air conditioners, They stop working properly when you open Windows!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group