# mount ftp site

## queen

I am trying to mount a ftp site with lufs and then share it on dc++.

I created a directory lufis and it appears fine in /mnt. 

```
ls -l

total 2

drwxr-xr-x 2 root root   48 Mar 10 11:41 camera

dr-xr-xr-x 3 root root 2048 Jun 18 20:09 cdrom

drwx------ 2 root root   72 Aug  3  2006 floppy

drwxr-xr-x 2 root root   48 Jun 19 16:51 lufis

drwxr-xr-x 4 root root   96 Apr 29 21:43 usb
```

Now i issue the command 

```

lufis fs=ftpfs,host=ftp.some.adress,port=21,username=anonymous,passwd=anonymous@cs,ftpactive /mnt/lufis/ -s
```

And I get 

```

[6fc9](FTPFS)in constructor

[6fc9](FTPFS)DataConnectionMode set to active

[6fc9](FTPConnection)in constructor

[6fc9](do_mount)

[6fc9](connect)trying to connect to <some-ip>...

[6fc9](connect)connect succeded...

[6fc9](get_response)line: 220 (vsFTPd 1.2.1)

[6fc9](execute)executing USER anonymous

[6fc9](get_response)line: 331 Please specify the password.

[6fc9](execute)executing PASS user@sourceforge.net

[6fc9](get_response)line: 230 Login successful.

[6fc9](execute)executing SYST

[6fc9](connect)logged in. system type is UNIX.

[6fc9](do_mount)list command: LIST -al

[6fc9](do_open)

[6fc9](do_read)read /etc/passwd, 0, 3bd

[6fc9](execute_open_active)cmd: PORT 192,168,1,100,171,254

[6fc9](execute)executing PORT 192,168,1,100,171,254

[6fc9](get_response)line: 200 PORT command successful. Consider using PASV.

[6fc9](execute)executing TYPE I

[6fc9](get_response)line: 200 Switching to Binary mode.

[6fc9](execute)executing RETR /etc/passwd

[6fc9](get_response)line: 550 Failed to open file.

[6fc9](execute)command failed!

[6fc9](do_read)couldn't open data connection!

[6fc9](do_release)

fuse: bad mount point `/mnt/lufis/': No such file or directory

[6fc9](~FTPFS)in destructor

[6fc9](~FTPConnection)in destructor

```

2 weird happen at this point: 

Sometimes it appears as 

```

ls -l

ls: cannot access lufis: No such file or directory

total 2

drwxr-xr-x 2 root root   48 Mar 10 11:41 camera

dr-xr-xr-x 3 root root 2048 Jun 18 20:09 cdrom

drwx------ 2 root root   72 Aug  3  2006 floppy

?????????? ? ?    ?       ?            ? lufis

drwxr-xr-x 4 root root   96 Apr 29 21:43 usb
```

As you can see lufis appears scrambled and sometimes it appears normal 

Now if i try to go to /mnt/lufis (written in a normal way or scrambled writen) i can see the directories and enter all of them. But when i try to share this in dc++ i can only see the following directories: 

```

camera

cdrom

floppy

usb
```

What am i doing wrong?

I also tried to install  curlftpfs but it's masked. I unmasked it in /etc/portage/package.unmask

```

media-video/avidemux

net-libs/libjingle

x11-base/x11-drm ~x86

net-fs/curlftpfs ~x86

```

but i can't install it. it refers me to man emerge over again. ;-(

----------

## Tatewaki

when i unmask i put them file in: /etc/portage/package.unmask with out the "~x86" and then i but them in /etc/portage/package.keywords with "~x86"

I don't know if it will help but might be a thing to try

----------

## queen

 *Tatewaki wrote:*   

> when i unmask i put them file in: /etc/portage/package.unmask with out the "~x86" and then i but them in /etc/portage/package.keywords with "~x86"
> 
> I don't know if it will help but might be a thing to try

 

I tried this option.It doesn't work. At some point it required 

```
emerge  curlftpfs

--- Invalid atom in /etc/portage/package.keywords: net-misc/curl-7.16.3_pre20070610

--- Invalid atom in /etc/portage/package.unmask: net-misc/curl-7.16.3_pre20070610

Calculating dependencies /

!!! All ebuilds that could satisfy ">=net-misc/curl-7.16.1" have been masked.

!!! One of the following masked packages is required to complete your request:

- net-misc/curl-7.16.3_pre20070610 (masked by: package.mask, ~x86 keyword)

# Daniel Black <dragonheart@gentoo.org> (09 Dec 2006)

# needs more compatibilty testing - bug #157718 for incompatibilites

- net-misc/curl-7.16.2 (masked by: package.mask, ~x86 keyword)

- net-misc/curl-7.16.3_pre20070418 (masked by: package.mask, ~x86 keyword)

For more information, see MASKED PACKAGES section in the emerge man page or

refer to the Gentoo Handbook.

(dependency required by "net-fs/curlftpfs-0.9.1" [ebuild])

```

I added also the specific version of curl and it still doesn't work. I try also 

```

net-misc/curl-7.16.3_pre20070610 -* ~x86

net-fs/curlftpfs -* ~x86
```

in package keywords,  and with or without ~x86 in package.unmask ( added curl and curlftpfs).

Nothing seems to work. ;-(

I would like at least one of these mounts to work.

----------

## theDOC_23

I have these in my package.unmask

```

net-fs/curlftpfs

>=net-misc/curl-7.16.1

```

And I think, when you use a version-number, you have to set

```

=net-misc/curl-7.16.3_pre20070610 -* ~x86

net-fs/curlftpfs -* ~x86

```

in your package.keywords

----------

## queen

 *theDOC_23 wrote:*   

> I have these in my package.unmask
> 
> ```
> 
> net-fs/curlftpfs
> ...

 

OK. These settings worked. It emerged curlftpfs. Here comes the real trouble with mounting. It managed to mount in a snap 

```

ls -l

ls: cannot access curlftpfs: Transport endpoint is not connected

total 2

drwxr-xr-x 2 root root   48 Mar 10 11:41 camera

dr-xr-xr-x 3 root root 2048 Jun 18 20:09 cdrom

?????????? ? ?    ?       ?            ? curlftpfs

drwx------ 2 root root   72 Aug  3  2006 floppy

drwxr-xr-x 4 root root 4096 Mar  1 08:02 lufis

drwxr-xr-x 4 root root   96 Apr 29 21:43 usb

```

Also, when i tried to change directory to /mnt/curlftpfs the command freezed. I had to kill the process.  I also don't see in dc++ /mnt/curlftpfs.

i used this syntax to mount:

```
curlftpfs ftp://anonymous@ftp.adress.site/ /path/to/mountpoint   
```

----------

## theDOC_23

The right syntax is

```

curlftpfs -o user=anonymous ftp.adress.site /path/to/mountpoint

```

or you can make a .netrc file in $HOME like this:

```

machine ftp.adress.site

    login anonymous

```

and then mount with

```

curlftpfs ftp.adress.site /path/to/mountpoint

```

----------

## queen

 *theDOC_23 wrote:*   

> The right syntax is
> 
> ```
> 
> curlftpfs -o user=anonymous ftp.adress.site /path/to/mountpoint
> ...

 

OK, I created a .netrc file in $HOME chmod 744. created a directory called cs in $HOME. Mounted according to the command you gave me above. The command was executed without problems. I checked with mount and saw that it was mounted. BUT, when i tried to use 

```
cd cs
```

 everything freezed. Also when i tried to open the sharing part in dc++ everything freezed there too. 

I had to kill the process of cd. even if i try to type ls -l it gets stuck. What can be wrong? I need to add something in /etc/group?

----------

## theDOC_23

 *queen wrote:*   

> What can be wrong? I need to add something in /etc/group?

 

Not that I know of. Is the user, you mount the ftp with and try to access it, the same?

There are some options you can try out to see whats goin' on:

```

    -d   -o debug          enable debug output (implies -f)

    -f                     foreground operation

```

or maybe set one of these:

```

    -s                     disable multi-threaded operation

    -o sync_read           perform reads synchronously

```

----------

## Balancer

 *queen wrote:*   

> ls: cannot access curlftpfs: Transport endpoint is not connected

 

I have same problem  :Sad: 

Anybody solved this problem? :-/

----------

## queen

 *Balancer wrote:*   

>  *queen wrote:*   ls: cannot access curlftpfs: Transport endpoint is not connected 
> 
> I have same problem 
> 
> Anybody solved this problem? :-/

 

I managed to mount lufis and see it in mount, but couldn't see it in dc++. 

I disabled long time ago curlftps. Will try to emerge again and see if it works. 

I can think of few things that are problematic:

1. Crappy ftp. Since lufis after mount appeared to be locked and show unknown characters, maybe the same happens to curlftps. If you  have a good ftp which you know that by simple ftp doesn't make you trouble, lets try it.

2. Maybe a user of curlftps needs to be added to /etc/passwd or /etc/group. Because with lufis (although it mounted) I got this error:

```

[36a4](execute)executing TYPE I

[36a4](get_response)line: 200 Switching to Binary mode.

[36a4](execute)executing RETR /etc/passwd

[36a4](get_response)line: 550 Failed to open file.

[36a4](execute)command failed!

[36a4](do_read)couldn't open data connection!

[36a4](do_release)

```

Now I checked /mnt/cdrom and I can see and share in dc++ without problems. cdrom appears in /etc/group. Maybe it's worth trying to add curlftps there.  let me know if you succeed before me.

----------

