Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question
    
What about sudo mount -o loop FTPMount/BigFile /target? –  speakr Jun 14 '12 at 10:04
    
It's a LUKS-encrypted file, so mount doesn't work directly. –  moatPylon Jun 14 '12 at 10:08
add comment

1 Answer

up vote 2 down vote accepted

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.

share|improve this answer
    
impossible or impractical? –  Bobby Jun 14 '12 at 11:16
1  
impractical, with a little bit of impossible. If the only operation supported is to retrieve the entire file, then the entire image could be retrieved once and cached in memory or disk; but then it wouldn't really be "over FTP" anymore... –  grawity Jun 14 '12 at 11:19
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.