FTP Perment Mount

http://www.linuxnix.com/2011/03/mount-ftp-server-linux.html

https://wiki.archlinux.org/index.php/Mount_FTP

Step 1: Installing package on Linux

On Ubuntu/Debian

apt-get install curlftpfs

On Redhat/CentOS/Fedora

rpm -ivh fuse-curlftpfs-0.9.1-1.el5.rf.i386.rpm

Step 2: Once the package installed we have to create a mount point and mount our ftp server data using curlftpfs command, for which we must have ftp username/password. Here are my details..

My ftp User: surendra_a

My ftp password: redhat

My ftp Server: ftp2.linuxnix.com

My mount point: /ftpmount

Now create the mount point and mount ftp account data.

#mkdir /ftpmount

#curlftpfs -o allow_other surendra_a:redhat@ftp2.linuxnix.com /ftpmount

Here option allow_others is used to Allow access to other users. By default the mount point is only accessible to the user who mounted it and not even to root. The remaining command is self explanatory.

sudo curlftpfs -o umask=0777,uid=1000,gid=1000,allow_other ftp://username:password@your.ftpserver.here /media/ftpmountedhere

Step 3: Testing our set-up

Check if you are able to see the ftp data

#cd /ftpmount

#ls

Sample output

2010-08-16.txt common-auth-ubuntu fulll12.txt

What about df -hs command output?

Sample output

Filesystem Size Used Avail Use% Mounted on

/dev/sda1 23G 5.4G 17G 25% /

none 1.5G 300K 1.5G 1% /dev

none 1.5G 2.9M 1.5G 1% /dev/shm

none 1.5G 128K 1.5G 1% /var/run

none 1.5G 0 1.5G 0% /var/lock

/dev/sda7 404G 88G 296G 23% /data

/dev/sda5 23G 10G 12G 46% /home

/dev/sr0 3.2G 3.2G 0 100% /media/My Disc

curlftpfs#ftp://surendra_a:redhat@ftp2.linuxnix.com/ 7.5T 0 7.5T 0% /ftpmount

Step 4: So what about mounting it permanently?. We can do it by editing fstab file in /etc folder

#vi /etc/fstab

go to last line and type below line

curlftpfs#ftp://surendra_a:redhat@ftp2.linuxnix.com/ /ftpmount fuse defaults 0 0

Let me explain what the above line indicates..

We are mentioning mount user surendra_a data which is on ftp2.linuxnix.com server on to /ftpmount using fuse file system with default settings.

or

curlftpfs#USER:PASSWORD@ftp.domain.org /mnt/mydomainorg fuse auto,user,uid=1000,allow_other,_netdev 0 0

Advertisements

About bpn4it

Feel Free in Linux. Bipin Patel bpn4it@gmail.com Ahmadabad, Gujarat, India
This entry was posted in Uncategorized and tagged , , , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s