LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Mounting FTP server as /backup (https://www.linuxquestions.org/questions/linux-server-73/mounting-ftp-server-as-backup-785060/)

replica88 01-27-2010 08:23 AM

Mounting FTP server as /backup
 
I want to be able to mount an ftp account to a local folder, I have set up a ftp server that is working fine, I have tested it with a few windows ftp clients and it works fine.

I am trying to use CurlFtpFS to mount it to /backup as I know it is supported but am running into an error I cant get around.

I have tested that my box can access the server using the ftp command, see below

Code:

root@Fileserver:/# ftp 192.168.1.254
Connected to 192.168.1.254.
220 (vsFTPd 2.0.6)
Name (192.168.1.254:root): ftpuser
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp>
ftp> exit
221 Goodbye.

but when I try to use CurlFtpFS I get a Error connecting to ftp: Access denied: 530" error, see below

Code:

root@Fileserver:/# curlftpfs ftp://192.168.1.254
Error connecting to ftp: Access denied: 530
root@Fileserver:/# curlftpfs ftpuser:ftpPa$$w0rd@192.168.1.254 /backup
Error connecting to ftp: Access denied: 530

I have looked this up but not have found anything useful, can anyone help??

macemoneta 01-27-2010 10:44 AM

curlftpfs doesn't appear to be maintained for the last 2.5 years. I suggest you use sshfs instead, as you can use your standard ssh server and don't need clear text passwords.

replica88 01-27-2010 04:22 PM

Problem solved

CurlFtpFS does not seem to support $ in passwords, I used the -v option to debug, see below

Code:

root@Fileserver:~# curlftpfs -v ftp://ftpuser:ftpPa$$w0rd@192.168.1.254 /backup
* Couldn't find host 192.168.1.254 in the .netrc file, using defaults
* About to connect() to 192.168.1.254 port 21 (#0)
*  Trying 192.168.1.254... * connected
* Connected to 192.168.1.254 (192.168.1.254) port 21 (#0)
< 220 (vsFTPd 2.0.6)
> USER ftpuser
< 331 Please specify the password.
> PASS ftpPa4150w0rd
< 530 Login incorrect.
* Access denied: 530
* Closing connection #0
Error connecting to ftp: Access denied: 530

Notice the password I entered and the password that was sent is different. I used a simple password and it worked, see below

Code:

root@Fileserver:~# curlftpfs -v ftp://test:test@192.168.1.254 /backup
* Couldn't find host 192.168.1.254 in the .netrc file, using defaults
* About to connect() to 192.168.1.254 port 21 (#0)
*  Trying 192.168.1.254... * connected
* Connected to 192.168.1.254 (192.168.1.254) port 21 (#0)
< 220 (vsFTPd 2.0.6)
> USER test
< 331 Please specify the password.
> PASS test
< 230 Login successful.
> PWD
< 257 "/"
* Entry path is '/'
* Remembering we are in dir ""
* Connection #0 to host 192.168.1.254 left intact


beadyallen 01-27-2010 06:10 PM

Your problem was that '$$' is a bash variable which expands to the current process id (that'd be the pid of your bash shell as you ran it, which looks to have been 4150) You could try enclosing the username/password in single quotes to prevent it getting expanded. You should probably quote it anyway to prevent other problems like this.


All times are GMT -5. The time now is 11:31 AM.