You are not logged in.

#1 2012-02-29 11:45:57

Lockheed
Member
Registered: 2010-03-16
Posts: 1,521

Mounting ftp shares as folders

I need to mount an ftp account with curlftpfs, but the ftp username has @ in it, and I think it throws the fstab out of sorts as I cannot mount it.
Is there some other way to write down @ symbol that would work?

Last edited by Lockheed (2012-02-29 20:30:46)

Offline

#2 2012-02-29 13:08:06

DerFlob
Member
From: Munich, Germany
Registered: 2011-09-18
Posts: 21

Re: Mounting ftp shares as folders

I actually don't know, this is just a guess, but have you tried escaping it with a back slash?

Offline

#3 2012-02-29 13:12:46

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Mounting ftp shares as folders

Use ~/.netrc to store the username and password - then you'll just need the hostname in fstab.

That said, a username with '@' in it seems like a very bad idea imo.

Offline

#4 2012-02-29 13:31:06

Lockheed
Member
Registered: 2010-03-16
Posts: 1,521

Re: Mounting ftp shares as folders

tomk wrote:

Use ~/.netrc to store the username and password - then you'll just need the hostname in fstab.

But since the mount/fstab is executed with sudo, would the location of .netrc in user's home folder not interfere with it?

Offline

#5 2012-02-29 15:23:20

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Mounting ftp shares as folders

You don't need sudo, just use the correct fstab options.

Offline

#6 2012-02-29 15:26:48

David Batson
Member
Registered: 2011-10-13
Posts: 640

Re: Mounting ftp shares as folders

Perhaps %40 would work?  Not sure in your application.

http://www.w3schools.com/tags/ref_urlencode.asp

Offline

#7 2012-02-29 16:30:16

Lockheed
Member
Registered: 2010-03-16
Posts: 1,521

Re: Mounting ftp shares as folders

tomk wrote:

You don't need sudo, just use the correct fstab options.

$ mount /mnt/ftp/
mount: only root can mount curlftpfs#......

Also, how should a fstab entry look after removing the login details?

Offline

#8 2012-02-29 18:26:53

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Mounting ftp shares as folders

I just added, and successfully tested, this fstab entry:

curlftpfs#ftp.heanet.ie         /home/tomk/heanet fuse user,noauto,exec,uid=1000,gid=100,allow_other,umask=022 0 0

Note the 'user' option, check man fstab for details.

The above is a public ftp that requires no authentication - the entry for your ftp server will look similar, when the credentials are transferred to ~/.netrc.

Finally, let me point out once again that using the '@' character in a username is not a good idea.

Offline

#9 2012-02-29 18:51:17

Lockheed
Member
Registered: 2010-03-16
Posts: 1,521

Re: Mounting ftp shares as folders

1. I can only mount stuff through sudo

2. This is my fstab line:

curlftpfs#ftp.locktar.com /mnt/ftplocktar fuse user,rw,allow_other,uid=juha 0 0
curlftpfs#ftp.hammack.com /mnt/ftpbackup fuse user,rw,allow_other,uid=juha 0 0

All it does is mount the server as anonymous, so I can only access what everybody else can, even though my .netrc looks like that:

machine ftp.locktar.com
    login hiro
    password hito
    
machine ftp.hammack.com
    login main@hakuna.com
    password matata

It is either being ignored or is malformed.
At this point, I am only talking about locktar server, cause I first want to get the easier one to work.

tomk wrote:

Finally, let me point out once again that using the '@' character in a username is not a good idea.

Tell it to tmdhosting.com

Offline

#10 2012-02-29 20:08:32

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Mounting ftp shares as folders

Try /root/.netrc instead of your user's one.

Offline

#11 2012-02-29 20:28:49

Lockheed
Member
Registered: 2010-03-16
Posts: 1,521

Re: Mounting ftp shares as folders

Excellent, it its working now for both. Thanks.
Is curlftpfs/FUSE the best/fastest way to connect to FTP shares? Is it as fast as connecting to it with regular FTP clients?

Last edited by Lockheed (2012-02-29 20:32:29)

Offline

Board footer

Powered by FluxBB