LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-15-2014, 09:51 AM   #1
thirstonlinux
Member
 
Registered: Jul 2011
Posts: 62

Rep: Reputation: Disabled
auto mounting ftp


I am trying to Auto mount the remote ftp home directory in a system. I am trying to do it in the following manner. correct me if I am wrong.

vi /etc/fstab

ftp://<serverip>/pub/ /mnt/temp ext4 defaults 0 0


Let me know if this is correct..
 
Old 07-15-2014, 11:07 AM   #2
wizard10000
LQ Newbie
 
Registered: Jun 2014
Location: midwestern us
Distribution: debian unstable
Posts: 17

Rep: Reputation: Disabled
Quote:
Originally Posted by thirstonlinux View Post
I am trying to Auto mount the remote ftp home directory in a system. I am trying to do it in the following manner. correct me if I am wrong.

vi /etc/fstab

ftp://<serverip>/pub/ /mnt/temp ext4 defaults 0 0

Let me know if this is correct..
ftp isn't a filesystem, it's a network protocol. Also, fstab is read before networking starts, so it's not possible to connect to an ftp server the way you laid out, I'm afraid.

If you want to mount it in fstab you need fuse and curlftpfs installed and the line would look a little more like this:

Code:
curlftpfs#USER:PASSWORD@<serverip>/pub/ /mnt/temp fuse auto,user,uid=1000,allow_other,_netdev 0 0
Unless your system has the netfs service installed the mount will still fail; if so, issue a 'mount -a' as root.

Hope this helps -
 
Old 07-15-2014, 11:31 AM   #3
thirstonlinux
Member
 
Registered: Jul 2011
Posts: 62

Original Poster
Rep: Reputation: Disabled
Ok. Could you tell me the best way to do this
 
Old 07-15-2014, 12:55 PM   #4
wizard10000
LQ Newbie
 
Registered: Jun 2014
Location: midwestern us
Distribution: debian unstable
Posts: 17

Rep: Reputation: Disabled
Quote:
Originally Posted by thirstonlinux View Post
Ok. Could you tell me the best way to do this
I think I just did
 
Old 07-15-2014, 01:07 PM   #5
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 9,189

Rep: Reputation: 2673Reputation: 2673Reputation: 2673Reputation: 2673Reputation: 2673Reputation: 2673Reputation: 2673Reputation: 2673Reputation: 2673Reputation: 2673Reputation: 2673
just ask you: are you sure you want to do that? probably there is a better way to reach that filesystem. (?)
 
Old 07-15-2014, 01:14 PM   #6
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fc-15/ fc-20-live-usb/ aix
Posts: 5,106

Rep: Reputation: 873Reputation: 873Reputation: 873Reputation: 873Reputation: 873Reputation: 873Reputation: 873
since ftp is old, insecure and deprecated, mite i suggest using sshfs which is designed for mounting remote filesystems using the ssh encrypted protocol.
 
Old 07-15-2014, 02:12 PM   #7
michaelk
Moderator
 
Registered: Aug 2002
Posts: 15,716

Rep: Reputation: 1750Reputation: 1750Reputation: 1750Reputation: 1750Reputation: 1750Reputation: 1750Reputation: 1750Reputation: 1750Reputation: 1750Reputation: 1750Reputation: 1750
Quote:
Originally Posted by thirstonlinux View Post
Ok. Could you tell me the best way to do this
What are you trying to accomplish?
 
Old 07-18-2014, 01:16 AM   #8
thirstonlinux
Member
 
Registered: Jul 2011
Posts: 62

Original Poster
Rep: Reputation: Disabled
Ok, Let me tell what exactly I am trying to do.
I have two RHEL 6 VMs - Server and Client.

FTP is configured in Server.learn.com and I am able to see the contents of /var/ftp/pub from Client.learn.com.

I want to mount /var/ftp/pub from Server.learn.com to /mnt/ on Client.learn.com across reboot. How can I achieve this?
 
Old 07-18-2014, 02:29 PM   #9
michaelk
Moderator
 
Registered: Aug 2002
Posts: 15,716

Rep: Reputation: 1750Reputation: 1750Reputation: 1750Reputation: 1750Reputation: 1750Reputation: 1750Reputation: 1750Reputation: 1750Reputation: 1750Reputation: 1750Reputation: 1750
There are several ways to see/mount the contents of /var/ftp/pub.

CurlFtpFs is a fuse file system that uses the FTP network protocol.
nfs is a native linux network protocol.
sshfs is a fuse file system that uses the sftp network protocol.
samba is a network protocol that is an implementation of the Microsoft SMB/CIFS network protocol

All of them can be used in /etc/fstab. nfs would probably be the simplest.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
USB pen drives not auto prompting or auto mounting on KDE3.5 (PCLOS) k.king Linux - General 1 03-17-2009 03:16 PM
Not auto mounting amnesty_puppy Linux - General 9 08-07-2005 08:27 PM
Auto Mounting IcoNyx Linux - Software 2 03-30-2003 08:04 PM
Auto-mounting X11 Slackware 1 07-07-2002 01:19 AM
Auto Mounting? erichard2000 Linux - Newbie 12 02-23-2001 10:49 AM


All times are GMT -5. The time now is 04:48 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration