Günter Merz | 10 Dec 13:49 2013

loopback image via sshfs

Hello list,

I'm mounting (via autofs, but that shouldn't make a difference) a path  
via sshfs that contains a file that is a loopback image.

The loopback image contains a luks-crypt on top of which sits an ext4  

I usually do the following to get to my encrypted ext4 filesystem:

    losetup /dev/loop0 /mnt/sshfs/volume.img
    cryptsetup luksOpen /dev/loop0 volume
    mount /dev/mapper/volume /mnt/volume

I found another description of my problem here:

In general, this works

Sponsored by Intel(R) XDK 
Develop, test and display web and hybrid apps with a single code base.
Download it for free now!
Ross Lagerwall | 8 Nov 11:02 2013

rmdir on not-empy dir returns EPERM

Removing a non-empty directory returns EPERM which confuses applications
which expect ENOTEMPTY or EEXIST[1].  It would be great if sshfs could
map SSH2_FX_FAILURE to ENOTEMPTY for rmdir.

If there is somewhere else I should report this, please let me know.

See the bug report at https://bugzilla.gnome.org/show_bug.cgi?id=541714
Specifically, comments 7 and 11.

Many thanks

Ross Lagerwall

November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most 
from the latest Intel processors and coprocessors. See abstracts and register
송호철 | 14 Oct 09:58 2013

I don't know whether it's bug or not, but I have a problem with sshfs.

I'm getting error message like "type of file differs from mount point" repeatedly,
what's the problem?
Hochul Song,  M.S candidate
Computational Materials Research Group
Department of Materials Science and Engineering 
Seoul National University
Seoul 151-744, Korea
Phone: +82-2-880-1542
E-mail: nr2327shc <at> snu.ac.kr

October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
Simeon Bird | 7 Sep 23:02 2013

access syscall always returns permission allowed on sshfs mounts


I have noticed that the access syscall, if executed on sshfs mounts,
always seems to return 0 (ie, "permission allowed"), even if I do not
actually have the required permissions. I am using sshfs 2.4 and fuse 2.9.3.

This was my test program:

#include <unistd.h>
#include <stdio.h>

int main()
    int read =  access("some_file",R_OK);
    int write = access("some_file",W_OK);
    int exec =  access("some_file",X_OK);
    printf("executable: %d %d %d\n",read, write, exec);
    return 0;

where some_file had previously had "chmod 0" done to it.

I notice also that man 2 access states:

"access() may not work correctly on NFS file systems with UID mapping
enabled, because UID mapping  is  done  on  the server and hidden from
the client, which checks permissions.  Similar problems can occur to
FUSE mounts."

However, access returns 0 whether uid mapping is enabled or disabled,
(Continue reading)

aniket singh | 5 Sep 11:27 2013

problem in installing fuse

i followed the procedure as outlined on

when i do sudo make i get,
*Making all in include*
*make[1]: Entering directory
*make  all-am*
*make[2]: Entering directory
*make[2]: Leaving directory
*make[1]: Leaving directory
*Making all in lib*
*make[1]: Entering directory
*  CCLD     libfuse.la*
*/usr/bin/ld: error: symbol __fuse_process_cmd has undefined version*
*collect2: ld returned 1 exit status*
*make[1]: *** [libfuse.la] Error 1*
*make[1]: Leaving directory
*make: *** [all-recursive] Error 1*

(Continue reading)

Antonio Russo | 21 Aug 18:36 2013

Automatically unmount in network failure condition

In the event of a network failure, sshfs can become
network-starved, causing programs accessing the sshfs
mount to enter uninterruptible sleep. The solution is
to kill the sshfs process; in contrast to some user
expectations, "fusermount -u /mountpoint" does not
work, since the mountpoint is still busy.

Killing sshfs is annoying at best, and impossible in some
cases (e.g., if $HOME is an sshfs, all new shells will
immediately enter uninterruptible sleep). This scenario
may be related to [1], but that bug appears to also be
associated with an issue on the kernel side.

The attached patch addresses this issue by providing a
new configuration option "-oread_timeout=N" which causes
sshfs to die (or attempt to remount if combined with
"-oremount") if its network connection becomes starved
for N seconds (in reality, the delay may be as long as
2N; eliminating this factor of two would complicate this

This simple patch protects the critical read() call to the
network socket with a select(). The call must fail only in
the event that sshfs is actually expecting network input,
which is determined by checking if the request tab
"sshfs.reqtab" is nonempty.

I have set a default value of "0" for this option, since
that changes things the least (i.e., it disables the
timeout). It may be best for this default to be nonzero.
(Continue reading)

jon | 5 Aug 05:19 2013

slow sshfs performance

I find that sshfs performs too slowly for my tastes. In particular, it does not seem to cache any data. On
sshfs-mounted directory doing an 'ls' multiple times always takes the same amount of time.

Even in a completely empty remote directory ls takes a significant amount of time. These commands were done
immediately after the preceeding one finished, so its not like there was a cache timeout.

~/x $ time ls
real    0m1.309s
user    0m0.000s
sys     0m0.004s

~/x $ time ls
real    0m1.328s
user    0m0.004s
sys     0m0.000s

I was hoping the second ls could take a fraction of the time. I tried playing with all the -o cache options to no avail.

Also I see some very strange things in the debug log. These entries make no sense to me

LOOKUP /.Trash
getattr /.Trash
unique: 4, opcode: OPENDIR (27), nodeid: 1, insize: 48, pid: 2654
   unique: 4, success, outsize: 32
   unique: 2, success, outsize: 96
   unique: 3, error: -2 (No such file or directory), outsize: 16
unique: 5, opcode: GETATTR (3), nodeid: 1, insize: 56, pid: 2674
unique: 6, opcode: LOOKUP (1), nodeid: 1, insize: 57, pid: 31744
getattr /
LOOKUP /.xdg-volume-info
(Continue reading)

Rob Browning | 31 Jul 20:25 2013

Could sshfs be returning EPERM for a non-empty rmdir()?

This may be something else, but it looked like sshfs might be returning
EPERM if you try to rmdir() a directory that's not empty.  But according
to rmdir(2), I would have expected ENOTEMPTY or EEXIST.

Bear in mind that this might just be a problem on our end, and I can
investigate further, but I thought I'd check with you first, in case it
was a known issue.

Here's the original thread:



Rob Browning
rlb  <at> defaultvalue.org and  <at> debian.org
GPG as of 2011-07-10 E6A9 DA3C C9FD 1FF8 C676 D2C4 C0F0 39E9 ED1B 597A
GPG as of 2002-11-03 14DD 432F AE39 534D B592 F9A0 25C8 D377 8C7E 73A4

Get your SQL database under version control now!
Version control is standard for application code, but databases havent 
caught up. So what steps can you take to put your SQL databases under 
version control? Why should you start doing it? Read more to find out.
Matthieu Pepin | 18 Jul 00:36 2013

SSHFS and suspend/hibernate

Is there any progress on the fuse-sshfs issue preventing system suspend/hibernation? If I have a SSHFS
mount and I try to suspend the system, it will hang with the following message: "Freezing userspace
processes" and about 20 seconds later, I'm back to the desktop. I found an old thread dating back to 2010
mentioning it was on the todo list.
Thanks :) 		 	   		  
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
Bil Morris | 7 Jul 05:41 2013

Strange mount bug

I'm having an issue when I mount a directory on a server via ssh/fuse in
Ubuntu 12.04 and
then try to make it available to Windows 7 as a guest running inside vmware.

The directory shows up as a file in windows, but seems to work mostly
fine in Ubuntu.
I'm wondering if the file attributes are not getting set properly or

user <at> host:~$ sshfs user <at> server:/data /home/user/data -o idmap=user        
user <at> host:~$ lsattr -d /home/user/data
lsattr: Inappropriate ioctl for device While reading flags on

It doesn't seem to be permissions, because everything works fine if I
mount the directory
in Ubuntu via cifs before trying to make it available.


See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
Florian Eyben | 4 Jul 22:44 2013

Sshfs automatic reconnect and open files


I've just come across a "problem" I encounter with sshfs and using the "-o
reconnect" option. The reconnect does work fine, however all open files on
the mountpoint are closed when ssh is disconnected and an error is returned
to the application opening the files. After the reconnect the files
(must/can) be reopened again.

Now, this behaviour makes sense on the one hand to ensure data integrity
(the files might have changed on the server during the disconnect).

However, I'm using sshfs to mount a single large truecrypt container on a
remote machine. Obviously the disconnect and closing of open files brakes
the truecrypt mount and can potentially corrupt the filesystem in the
mounted container.

My question now:  Is it somehow possible/feasible to add a
"blocking/no-close" option to keep all currently open files open during a
reconnect and have all i/o operations on these files block until we are
Data integrity is no problem in my use case, as I'm the only person
acessing the remote truecrypt container, so nothing will have changed after
the reboot  (and of course these problems and potential dangers could be
documented alongside this option).

I would also be willing to help developing this option, if I could get some
help from someone with a good understanding of the sshfs code where to look
in the code or how such a thing might potentially be implemented.

(Continue reading)