IT Department | 13 May 00:04 2014

Issue mounting SSHFS'd home folder during login

I've been using sshfs controlled by pam_mount to mount user's remote home
folder to the local home folder on diskless terminals.  This was working
fine using the version of ssh and sshfs included in Ubuntu 11.10, however
using the version in 14.04 (sshfs 2.5, OpenSSH 6.6p1) the mount process
locks up.

Activating debug, and testing using the following test pattern it locks up
after printing "executing <ssh> ...."

# Test reproduction #
Here's how I was able to test the situation, eliminating pam_mount and many
other variables: (Caveat, I'm typing these commands into this email by hand
- if there's typos, please correct!)
1. Create a test user (skip if you already have one) - for this procedure
I'll call the username 'test'
2. Create the a user with the same name on a server.
3. Remove the test user's home folder: `rm -r /home/test`
4. Create an empty home folder, thus simulating what pam_mount does
automatically: `mkdir /home/test; chown test:test /home/test`
5. Log in as the test user: `su - test`
6. Mount the user's home folder: `sshfs test <at> myserver:/home/test /home/test
-o workaround=rename,nonempty,allow_other,nodev,nosuid`
7. Observe to see if the mount completes.

The process hangs at step 7, thankfully a CTRL-C cancels it testing this
way.  If pam_mount calls it during login...  that's another story.

Note that after pressing CTL-C to cancel the process, you must execute
`umount /home/test` to test again.

(Continue reading)

Kirk Sefchik | 15 Apr 17:39 2014
Picon

<file> file is damaged

When I try to open binary files over SSHFS, I often get an error “<file> is damaged and can’t be opened.
You should move it to the Trash”, with an option to trash or cancel. But if I copy the file from the virtual
drive over to my desktop, it mysteriously works fine. Any idea why this might be happening? 
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
Milton Woods | 9 Apr 08:40 2014
Picon
Picon

Patch for interrupt handling [SEC=UNCLASSIFIED]

Hi sshfs developers,

I have noticed problems with interrupt handling in sshfs/2.5 and earlier. Even though the "intr" option
causes signals to be sent to request threads in sshfs, some operations become uninterruptible if a remote
host stops responding.

The "reconnect" option can help if there is a communication problem between hosts, but there are
situations where a reconnect will not be triggered, such as when the remote filesystem is itself mounted
over a network (e.g. NFS) from a failed server.

The attached patch file contains a number of code changes (relative to sshfs-fuse-2.5/sshfs.c) that are
intended to make interrupt handling more robust. Although it may have been better to use the low-level
fuse API, I decided to stick with the high-level API so that fewer changes were required.

Please consider the patch for inclusion in the next release (2.6?) of sshfs.

Regards,
Milton.
Attachment (sshfs-intr.patch): application/octet-stream, 17 KiB
------------------------------------------------------------------------------
Put Bad Developers to Shame
Dominate Development with Jenkins Continuous Integration
Continuously Automate Build, Test & Deployment 
Start a new project now. Try Jenkins in the cloud.
http://p.sf.net/sfu/13600_Cloudbees
_______________________________________________
Fuse-sshfs mailing list
(Continue reading)

Daniel Hahler | 1 Apr 11:14 2014
Picon

sshfs hangs/blocks often after suspend/resume cycle: configurable timeout?

Hello,

I am using the following commands to mount a remote file system via sshfs:

sshfs -o reconnect -o ro -o allow_other -o user=www-data host:/remote/path1 /mnt/sshfs-ro/local1
sshfs -o reconnect -o ro -o allow_other -o user=www-data host:/remote/path2 /mnt/sshfs-ro/local2

The problem is that after resuming the laptop, accessing /mnt/union/local1 (or /mnt/sshfs-ro/local1)
might block for a long time. That means that a simle `ls` will hang for minutes, and is not interruptable
using Ctrl-C.
This also might happen when changing networks (from wired to wifi).

Is it possible to make sshfs behave better when resuming from suspend or changing networks?

I could not find an option to set/lower a timeout sshfs would use to re-connect to the remote host.

FWIW, I am using unionfs-fuse on top of sshfs, but the blocking appears to result from sshfs.

Thanks,
Daniel.

--

-- 
http://daniel.hahler.de/

------------------------------------------------------------------------------
_______________________________________________
(Continue reading)

David Raymond | 11 Mar 20:28 2014

writing with wrong permissions


I have been experimenting with using sshfs as a replacement for nfs,
given the lack of client authentication with the latter.  I start
sshfs on the client as root with something like this in the fstab:

root <at> gryphon:/home.gryphon /home.gryphon fuse.sshfs \
      defaults,_netdev,allow_other,default_permissions 0 0

The allow_other allows users other than root to access files in the
mounted file system and the default_permissions enforces server
permissions.  (UIDs and GIDs are the same on server and client.)
This all works, but when I create a file as a non-root user,
for example,

      echo "some stuff" > junk

"junk" ends up with root permissions.  Oops!

Am I missing something?  Is this a bug or a feature?  Or am I
trying to make sshfs do something it wasn't intended to do?

I am using sshfs 2.5-1 and fuse 2.9.3-2 on Arch linux.

Thanks,

Dave Raymond

--

-- 
David J. Raymond
Prof. of Physics
(Continue reading)

Sencer Selcuk | 27 Feb 05:02 2014
Picon

Bug with SSFS

Hi,

I probably found a bug of sshfs, and wanted to report it. First let me
explain the problem & how you can reproduce it:

I mount a remote folder, to my local computer without any options:

    sshfs server:. ~/mnt

And I have only these lines in my .ssh/config file -when I remove these lines
problem is fixed, but I don't want to do this.

    Host *
      ControlMaster auto
      ControlPath /tmp/%r <at> %h:%p
      ControlPersist 60

Now when I go to ~/mnt folder and run an ssh command (which is much faster for
many cases, though not for this example) like this:

    ssh server "ls" > list.txt

it stays without any response forever. I can stop the command issuing Ctrl+C,
but then I cannot even make a simple `ls` in my home directory nor in mnt folder
till I kill sshfs with `kill -9`.

I don't have this problem if I issue the above "ssh server "ls" > list.txt"
command outside the mnt folder, nor I do if I don't redirect the output to a
file. Here is ssh debug output:

(Continue reading)

Luis Perez | 28 Jan 21:27 2014
Picon

Unable to lock database file in Cadence

Hello,

I am having an issue when using SSHFS and try to edit my Cadence files.
When mounting, do I need to specify "edit"mode?

Below is the command line that I currently using:

sshfs perxxx <at> eevlsifs.xxxx.edu:/home/perxxxx /home/perexxxx/xxxx

Thanks!

luis
------------------------------------------------------------------------------
WatchGuard Dimension instantly turns raw network data into actionable 
security intelligence. It gives you real-time visual feedback on key
security issues and trends.  Skip the complicated setup - simply import
a virtual appliance and go from zero to informed in seconds.
http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk
Miklos Szeredi | 14 Jan 15:31 2014
Picon

sshfs 2.5

Version 2.5 is out there:

  http://sourceforge.net/projects/fuse/files/sshfs-fuse/2.5/

The list of changes is pretty short:

    * Add -o disable_hardlink option (debian bug #670926).  Reported
    by Louis-David Mitterrand

    * Optimize readdir by sending multiple requests in parallel.  Add
    -o sync_readdir to restore old behavior.  Patch by Alexander
    Neumann

    * Map SSH2_FX_FAILURE to ENOTEMPTY for rmdir.  Reported by Ross
    Lagerwall

    * When checking root directory use LSTAT not STAT.  This prevents
    I/O error being returned after a successful mount if a symlink is
    mounted.  Reported by Bart Friederichs

Cheers,
Miklos

------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
(Continue reading)

Alexander Neumann | 22 Dec 21:25 2013
Picon

PATCH: Implement asynchronous readdir

Hi,

please see the attached patch which implements asynchronous readdir.
This enormously speeds up listing directories with 100k files on a
remote server (before: about 3 minutes 32 seconds, after: ~1.6 seconds).

The patch can also be found in the branch "speedup-large-directories" on
https://github.com/fd0/sshfs

I highly appreciate merging this patch into mainline sshfs. Comments are
more than welcome.

Happy Holidays and greetings from Germany,
Alex
------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
Fuse-sshfs mailing list
Fuse-sshfs <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fuse-sshfs
fuse-sshfs | 19 Dec 19:51 2013

Possible Bug


$ sshfs -p 2222 -o umask=022,uid=1234,gid=1234
sshserverusername <at> sshserver.com:/home/sshserverusername /sshfilesystem/

$ ls -lash / | grep 'sshfilesystem'
4.0K drwxr-xr-x 1 username username 4.0K Dec 19 2013 sshfilesystem
$ ls -lash /sshfilesystem/zzzz/blah
4.0K -rwxr-xr-x 1 username username 34 Dec 19 13:32
/sshfilesystem/zzzz/blah
$ ls -lash /sshfilesystem/ | grep 'zzzz'
4.0K drwxr-xr-x 1 username username 4.0K Dec 19 2013 zzzz

When I edit the file 'blah' with gedit, nano, or vi, and then try to save
the file it says I don't have permission. 
Is this a bug or is this user error?
I can remove the file without error:

$ rm /sshfilesystem/zzzz/blah
$ ls /sshfilesystem/zzzz/blah
ls: cannot access /sshfilesystem/zzzz/blah: No such file or directory

and can make a new file without error:

$ echo 'asdhjksdhgjkahdjkshjdhjs' > /sshfilesystem/zzzz/blah
$ cat /sshfilesystem/zzzz/blah
asdhjksdhgjkahdjkshjdhjs

Any ideas?
------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
(Continue reading)

Günter Merz | 10 Dec 14:03 2013
Picon
Picon

loopback image via sshfs

Sorry for (almost) double posting.  I hit the send button accidentally.

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  
filesystem.

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

In general, this works.  I can access, read, write files.
However, some files have erroneous content, that, when mounted  
locally, are absolutely fine. They're not always the same files.
The filesystem quite often has (many) "block bitmap differences"  
errors which I can fix but they reappear on remount.

My sshfs mount options are:

allow_other,dev,workaround=all,idmap=user,intr,reconnect,gid=users,ServerAliveInterval=5,ServerAliveCountMax=1

I played around with "dev" and different "workaround" options without  
any notable change to my problem.

Is sshfs known not to work properly in the setup I've described?
(Continue reading)


Gmane