Linux – Why is the curlftpfs write only

curlftplinuxmountpermissions

I have mounted a FTP backup solution to /opt/backup and it seems to be write only (even as root, as shown).

# touch foo
# ls -l
-rw-r--r-- 1 root root 0 Feb 19 16:00 foo
# cat foo
cat: foo: Permission denied
# rm foo
# ls
#

Mountpoint looks like this:

drwxr-xr-x  1 root fuse 1.0K Jan  1  1970 /opt/backup

Fstab line is:

curlftpfs#user:pass@user.backup.tld /opt/backup     fuse    allow_other,uid=0,gid=116,noatime       0 0

GID 116 is the fuse group.

PS: It's not an issue with the FTP server, since it works fine in midnight commander.

What is going wrong here?


Edit 2013-02-19:
Debugging curlftpfs (with -f -d flags) gave the following output when trying to cat:

unique: 19, opcode: OPEN (14), nodeid: 3, insize: 48, pid: 30167
open flags: 0x8000 /foo
ftpfs: operation ftpfs_open failed because Permission denied
   unique: 19, error: -13 (Permission denied), outsize: 16

Again, using an client program such as midnight commander, no such problem occurs.


Edit 2013-06-25
I have now changed to using CIFS, which works properly.
This is obviously not a solution, though.

Best Answer

Just to solve this: As someone mentioned before, the problem was related to ipv6, to fix it simply add "ipv4" to the parameters to disable ipv6:

# cat /etc/fstab

curlftpfs#SERVER /mnt/ftp-backup fuse disable_eprt,noauto,nodev,noexec,ipv4
curlftpfs#SERVER /mnt/ftp-backup fuse.curlftpfs disable_eprt,noauto,nodev,noexec,ipv4