0

Using curlftpfs, is it possible to mount a file available through FTP on a loop device? I get a Permission denied error when I try it:

$ sudo losetup /dev/loop0 FTPMount/BigFile
losetup: failed to setup loop device: Permission denied

Permissions are OK, /dev/loop0 is free, and losetup works as intended on any other files. If this problem is with curlftpfs, how would I mount a file in a remote FTP server on a loop device?

Oliver Salzburg
  • 89,072
  • 65
  • 269
  • 311
moatPylon
  • 118

1 Answers1

3

First, by default FUSE – which curlftpfs is based on – denies access to all other users, even to root, for security reasons. This has to be disabled using -o allow_root.

Second, mounting a filesystem requires support for random access to any part of the file. FTP does not support this properly (although there are extensions), and curlftpfs does not seem to support such extensions at all ­– it will RETR the entire file even if only a few bytes are desired. Because of this, mounting disk images over FTP is pretty much impossible.

grawity
  • 501,077