curlftpfs doesn't work for a username with a "@"

6

1

My hosting company makes all my usernames with a "@" in them.

curlftpfs user="user@domain.com:pass" ftp://ftp.domain.com/ ~/domain/

For some reason I get in response

Error connecting to ftp: Couldn't resolve host 'domain.com:pass'

I think that it's trying to connect to user@domain.com without the password
(because of the @ sign)

Asaf

Posted 2011-04-10T11:07:47.813

Reputation: 959

Answers

5

cURL is interpreting everything after the first @ sign as the domain to connect to. What you need to do is either fool cURL into working without the first @ sign, or find some other way of telling CurlFtpFS your username.

The former may possibly be done by replacing the @ with the URL encoded %40 - it may or may not work - try it and see.

The other way can be to see if there is a --username or --user parameter to CurlFtpFS that can be used instead of including it in the URL. I am not familiar enough with CurlFtpFS to know if there is or not off hand. The manual pages should tell you if there is or not.

Majenko

Posted 2011-04-10T11:07:47.813

Reputation: 29 007

holy crap, I did this command sudo curlftpfs -o allow_other ftp://user%40domain.com:pass@domain.com/ ~/domain/ And now for some reason I can't do an "ls" on my home directory! – Asaf – 2011-04-10T11:44:00.027

2@Asaf: When you run ls, it calls stat() on each item in the directory; when it reaches ~/domain, it has to wait until curlftpfs responds. (For this problem, I usually put all remote mountpoints in a separate directory, such as ~/fs/ or ~/mnt/.) Since curlftpfs is FUSE-based, you can kill its process if it hangs for too long. – user1686 – 2011-04-10T13:19:30.590

3

I'm wondering if you are missing the -o switch, so that your example above of:

curlftpfs user="user@domain.com:pass" ftp://ftp.domain.com/ ~/domain/

should be:

curlftpfs -o user="user@domain.com:pass" ftp://ftp.domain.com/ ~/domain/

Does that work?

Gaff

Posted 2011-04-10T11:07:47.813

Reputation: 16 863