Compare commits
19 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 7f56cfc602 | |||
| fd3aa6594f | |||
| 2731a001e5 | |||
| 608e7ab89c | |||
| a73dda48bd | |||
| 7c2550a7e4 | |||
| 71aa3b97f6 | |||
| 14636931ac | |||
| d193b19a8f | |||
| 949d76d1a2 | |||
| 848ff30d90 | |||
| 37c8c1c80b | |||
| 85b950d3c6 | |||
| b32c4a4ca1 | |||
| bc47eeb68c | |||
| e4de7d257f | |||
| 2a818faea5 | |||
| 48cf30d3e2 | |||
| 1f20b5dff5 |
+3
-1
@@ -12,8 +12,10 @@ addons:
|
||||
- clang
|
||||
- gcc
|
||||
- gcc-6
|
||||
- python-docutils
|
||||
- python3-pip
|
||||
before_install:
|
||||
- pip install pip==8.1.1 && pip3 install pip==8.1.1
|
||||
- sudo -H python3 -m pip install pip==8.1.1
|
||||
install: test/travis-install.sh
|
||||
script: test/travis-build.sh
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@ Contributors (autogenerated list)
|
||||
|
||||
Alan Jenkins <alan.christopher.jenkins@gmail.com>
|
||||
Alexander Neumann <alexander@bumpern.de>
|
||||
Anatol Pomozov <anatol.pomozov@gmail.com>
|
||||
Benjamin Fleischer <fleiben@gmail.com>
|
||||
Berserker <berserker.troll@yandex.com>
|
||||
Bill Zissimopoulos <billziss@navimatics.com>
|
||||
@@ -31,6 +32,8 @@ Miklos Szeredi <mszeredi@suse.cz>
|
||||
Nikolaus Rath <Nikolaus@rath.org>
|
||||
Percy Jahn <email@percyjahn.de>
|
||||
Qais Patankar <qaisjp@gmail.com>
|
||||
Reid Wagner <wagnerreid@gmail.com>
|
||||
Rian Hunter <rian@alum.mit.edu>
|
||||
Timo Savola <timo.savola@iki.fi>
|
||||
tpoindessous <thomas@poindessous.com>
|
||||
Zoltan Kuscsik <zoltan.kuscsik@linaro.org>
|
||||
|
||||
@@ -1,3 +1,22 @@
|
||||
Release 3.3.1 (2017-10-25)
|
||||
--------------------------
|
||||
|
||||
* Manpage is now installed in correct directory.
|
||||
* SSHFS now supports (or rather: ignores) some options that it may
|
||||
receive as result of being mounted from ``/etc/mtab``. This includes
|
||||
things like ``user``, ``netdev``, or ``auto``.
|
||||
|
||||
SSHFS 3.3.0 (2017-09-20)
|
||||
------------------------
|
||||
|
||||
* Dropped support for writeback caching (and, as a consequence,
|
||||
"unreliable append" operation). As of kernel 4.14, the FUSE module's
|
||||
writeback implementation is not compatible with network filesystems
|
||||
and there are no imminent plans to change that.
|
||||
* Add support for mounting from /etc/fstab
|
||||
* Dropped support for building with autotools.
|
||||
* Added missing options to man page.
|
||||
|
||||
Release 3.2.0 (2017-08-06)
|
||||
--------------------------
|
||||
|
||||
|
||||
@@ -1,242 +0,0 @@
|
||||
SSHFS FAQ
|
||||
=========
|
||||
|
||||
1. I've found a bug and there's no solution in this FAQ, what
|
||||
should I do?
|
||||
2. Advantage of sshfs over NFS and Samba
|
||||
3. Create the device node
|
||||
4. mv fails with "Operation not permitted"
|
||||
5. Configuring the ssh connection
|
||||
6. What are the no_readahead and sshfs_sync options for?
|
||||
7. Why does df return strange values on partitions mounted via
|
||||
sshfs?
|
||||
8. How do I specify the remote mount point (since the example
|
||||
defaults to the home directory)
|
||||
9. sshfs hangs after a while
|
||||
10. Following symlinks on the server side
|
||||
11. Making absolute symlinks work
|
||||
12. Mounting as root
|
||||
13. Exporting via NFS
|
||||
14. Automatical mounting using /etc/fstab
|
||||
15. Why does SVN (etc...) fail with permission denied?
|
||||
16. Why does SVN (etc...) fail to rename files?
|
||||
17. Is there some neat way to do it in reverse?
|
||||
18. Might it be reasonable to disallow loops?
|
||||
19. How to mount through an intermediary ssh server, eg:
|
||||
localhost -> A -> B; mount B from localhost
|
||||
20. Alternative Solution
|
||||
21. I seem to have successfully mounted a remote directory, but
|
||||
performing an `ls -l` on the directory above the mount point shows
|
||||
the mount point's attributes as `? ? ? ? ? ?`. Nothing shows up in
|
||||
the directory either. What am I doing wrong?
|
||||
|
||||
--------------------------------------------------------------------------
|
||||
|
||||
1. I've found a bug and there's no solution in this FAQ, what should I do?
|
||||
|
||||
Please report the bug in the Github issue tracker:
|
||||
https://github.com/libfuse/sshfs/issues
|
||||
|
||||
Also logs with debugging output can be useful for diagnosing the
|
||||
problem. Try running sshfs with the following options:
|
||||
sshfs -odebug,sshfs_debug,loglevel=debug ...
|
||||
|
||||
Doing strace on the application which fails may also sometimes help:
|
||||
strace -f -o /tmp/strace application args ...
|
||||
|
||||
Note that large messages (over 40k) will be rejected from the mailing
|
||||
list. So try to keep the logs as short as possible.
|
||||
|
||||
|
||||
2. Advantage of sshfs over NFS and Samba
|
||||
|
||||
Users can mount remote resources they already have ssh access to,
|
||||
without requiring the remote machine to export the resource.
|
||||
|
||||
The remote resource can be mounted when it is needed in a location
|
||||
that is convenient for the user at that time, without needing to rely
|
||||
on a central, root-controlled file system table.
|
||||
|
||||
Automatic mounting, if desired, can be added to a shell script such as
|
||||
.bashrc (provided authentication is done using RSA/DSA keys).
|
||||
|
||||
Resources can be mounted over slow and unreliable (distant)
|
||||
connections.
|
||||
|
||||
3. Create the device node
|
||||
|
||||
If you don't use udev, you may get this error message:
|
||||
|
||||
fusermount: failed to open /dev/fuse: No such device or address
|
||||
|
||||
Before loading the fuse kernel module, create the device node
|
||||
manually:
|
||||
|
||||
mknod -m 666 /dev/fuse c 10 229
|
||||
|
||||
4. mv fails with "Operation not permitted".
|
||||
|
||||
Use -o workaround=rename (requires sshfs version >= 1.3).
|
||||
|
||||
5. Configuring the ssh connection
|
||||
|
||||
In addition to flags like -C, -p, and -o SSHOPT...=, you may find it
|
||||
easier to edit your /.ssh/config file. You can add an entry with any
|
||||
customization you want, test it with ssh, and finally use it with
|
||||
sshfs. As a bonus, you get a short mnemonic for your configuration.
|
||||
|
||||
6. What are the no_readahead and sshfs_sync options for?
|
||||
|
||||
These disable read and write optimizations respectively. They don't
|
||||
really make sense unless you're doing something special.
|
||||
|
||||
7. Why does df return strange values on partitions mounted via sshfs?
|
||||
|
||||
Because the SFTP protocol doesn't have a statfs operation this is
|
||||
currently not possible to display proper usage on remote partition.
|
||||
|
||||
8. How do I specfy the remote mount point (since the example defaults to the
|
||||
home directory)
|
||||
|
||||
The example shows:
|
||||
sshfs hostname: mountpoint
|
||||
|
||||
To specify a remote mount point use:
|
||||
sshfs hostname:remotemountpoint mountpoint
|
||||
|
||||
This might be obvious to others, but I ended up looking up the
|
||||
interface to sftp to see if I could learn how to specify the remote
|
||||
mount point, then thought about the way that scp specifies the remote
|
||||
directory, and it worked.
|
||||
|
||||
9. sshfs hangs after a while
|
||||
|
||||
Mounting works fine, I can use the files in Mountpoint as good as any
|
||||
other files on my system, but after bit of time, changing nothing on
|
||||
the remote files sshfs crashes. This means, I can not cd into the
|
||||
Mountpoint (xterm hangs, nautilus hangs... every program trying to
|
||||
access the Mountpoint gets stuck, and won't return).
|
||||
|
||||
Solution: add
|
||||
ServerAliveInterval 15
|
||||
|
||||
in your .ssh/config (or use -o ServerAliveInterval=15 on the sshfs
|
||||
command line but I did not test that solution). This will force the
|
||||
ssh connection to stay alive even if you have no activity.
|
||||
|
||||
10. Following symlinks on the server side
|
||||
|
||||
The -o follow_symlinks option will enable this.
|
||||
|
||||
11. Making absolute symlinks work
|
||||
|
||||
Use the -o transform_symlinks option, which will transform absolute
|
||||
symlinks (ones which point somewhere inside the mount) into relative
|
||||
ones.
|
||||
|
||||
12. Mounting as root
|
||||
|
||||
Generally it's not possible to use an sshfs mount as a "real"
|
||||
filesystem shared between multiple users. Some of this functionality
|
||||
can be enabled with the -o allow_other and -o default_permissions
|
||||
options, but files will not be created with the correct ownership,
|
||||
etc...
|
||||
|
||||
13. Exporting via NFS
|
||||
|
||||
Use the userspace NFS daemon http://sourceforge.net/projects/unfs
|
||||
|
||||
14. Automatical mounting using /etc/fstab
|
||||
|
||||
A line in /etc/fstab has the following format:
|
||||
sshfs#USERNAME@REMOTE_HOST:REMOTE_PATH MOUNT_POINT fuse SSHFS_OPTIONS 0 0
|
||||
|
||||
eg.
|
||||
sshfs#guest@guest.login.com:data /mnt/guest fuse \
|
||||
uid=1003,gid=100,umask=0,allow_other 0 0
|
||||
|
||||
15. Why does SVN (etc...) fail with permission denied?
|
||||
|
||||
This is a bug that happens when an application creates a read-only
|
||||
file opened for writing (e.g. open("foo", O_WRONLY|O_CREAT, 0444))
|
||||
|
||||
It has been fixed in sshfs version 1.3, but also requires FUSE version
|
||||
>=2.5.X and Linux kernel version >=2.6.15.
|
||||
|
||||
16. Why does SVN (etc...) fail to rename files?
|
||||
|
||||
$ svn co svn://anonsvn.kde.org/home/kde/trunk/KDE/kdelibs
|
||||
svn: Can't move 'kdelibs/.svn/tmp/entries' to 'kdelibs/.svn/entries':
|
||||
Operation not permitted
|
||||
|
||||
The reason is that SFTP protocol version 3 (which is implemented by
|
||||
OpenSSH's sftp-server) defines the rename operation slightly
|
||||
differently than POSIX. The difference is that renaming to an existing
|
||||
file or directory will fail instead of atomically replacing the old
|
||||
file.
|
||||
|
||||
The -o workaround=rename option will try to emulate POSIX rename
|
||||
semantics, but it cannot guarantee atomicity. In most of the cases
|
||||
this doesn't matter, and things will work fine with this option.
|
||||
|
||||
17. Is there some neat way to do it in reverse?
|
||||
|
||||
You want to mount a USB thumb drive onto a file server that is rather
|
||||
remote.
|
||||
|
||||
Assuming this is difficult because the laptop with the thumb drive is
|
||||
sitting behind NAT, firewalls, etc. then you need to create a
|
||||
port-forward:
|
||||
client$ ssh -R 2222:localhost:22 server
|
||||
server$ sshfs -p 2222 localhost:/media/usb1 myusb1
|
||||
|
||||
(Now, is there is there a smarter way that does not involve port
|
||||
opening login permissions in an undesireable direction?)
|
||||
|
||||
18. Might it be reasonable to disallow loops?
|
||||
|
||||
sshfs localhost:/mnt /mnt
|
||||
|
||||
This seems to produce undesirable results. --JoshuaRodman
|
||||
|
||||
19. How to mount through an intermediary ssh server, eg: localhost -> A -> B;
|
||||
mount B from localhost
|
||||
|
||||
Start by mounting the folder you need that is on "a" to a folder on
|
||||
"b" then mount the new folder that is on "a" to a folder on localhost.
|
||||
|
||||
IE: (These are NOT real commands, but a sequence of steps.
|
||||
A mounts B:/home/x on /mnt/Bx
|
||||
localhost mounts A:/mnt/Bx on ~/mydir
|
||||
|
||||
20. Alternative Solution:
|
||||
|
||||
1) Create a shell script to wrap the tunneling of one ssh command over
|
||||
another,
|
||||
$ cat >Atunnel <<EOF
|
||||
#!/bin/bash
|
||||
ssh -q A ssh -q "$@"
|
||||
EOF
|
||||
$ chmod u+x Atunnel
|
||||
|
||||
N.B. make sure to put this somewhere on your path. 2) sshfs mount as
|
||||
normal but using this script as the ssh command.
|
||||
$ sshfs -o ssh_command='Atunnel' B: ~/mydir
|
||||
|
||||
21. I seem to have successfully mounted a remote directory, but performing an
|
||||
`ls -l` on the directory above the mount point shows the mount point's
|
||||
attributes as `? ? ? ? ? ?`. Nothing shows up in the directory either. What
|
||||
am I doing wrong?
|
||||
|
||||
You probably specified a remote path with the tilde (~) in it. This
|
||||
doesn't seem to work. Instead, specify an absolute remote path:
|
||||
sshfs username@remote.host:/home/username/whatever my/mount
|
||||
|
||||
What options do i use to make playing media files (music) over sshfs more
|
||||
efficient?
|
||||
|
||||
MacFUSE doesn't seem to let me move files from one directory to another. It
|
||||
first asks for my local user password (i.e. the password on my Macbook Pro)
|
||||
and then produces the error message "The operation cannot be completed
|
||||
because one or more required items cannot be found. (Error code -120).
|
||||
|
||||
-30
@@ -1,30 +0,0 @@
|
||||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
bin_PROGRAMS = sshfs
|
||||
|
||||
SUBDIRS = test
|
||||
|
||||
sshfs_SOURCES = sshfs.c cache.c cache.h
|
||||
if FUSE_OPT_COMPAT
|
||||
sshfs_SOURCES += compat/fuse_opt.c compat/fuse_opt.h
|
||||
endif
|
||||
if DARWIN_COMPAT
|
||||
sshfs_SOURCES += compat/darwin_compat.c compat/darwin_compat.h
|
||||
endif
|
||||
|
||||
sshfs_LDADD = $(SSHFS_LIBS)
|
||||
sshfs_CFLAGS = $(SSHFS_CFLAGS)
|
||||
sshfs_CPPFLAGS = -D_REENTRANT -DFUSE_USE_VERSION=31 -DLIBDIR=\"$(libdir)\" \
|
||||
-DIDMAP_DEFAULT="\"$(IDMAP_DEFAULT)\""
|
||||
|
||||
EXTRA_DIST = sshfs.1.in meson.build ChangeLog.rst
|
||||
CLEANFILES = sshfs.1 sshfs.1.tmp
|
||||
|
||||
dist_man_MANS = sshfs.1
|
||||
|
||||
sshfs.1: sshfs.1.in
|
||||
$(AM_V_GEN)sed \
|
||||
-e 's/[@]IDMAP_DEFAULT@/$(IDMAP_DEFAULT)/g' \
|
||||
-e 's/[@]UNMOUNT_COMMAND@/$(UNMOUNT_COMMAND)/g' \
|
||||
<$(srcdir)/sshfs.1.in >sshfs.1.tmp || exit 1; \
|
||||
mv sshfs.1.tmp sshfs.1
|
||||
-51
@@ -75,57 +75,6 @@ tests requires the `py.test`_ Python module)::
|
||||
.. _Ninja: https://ninja-build.org/
|
||||
.. _`py.test`: http://www.pytest.org/
|
||||
|
||||
Alternate Installation
|
||||
----------------------
|
||||
|
||||
If you are not able to use Meson and Ninja, please report this to the
|
||||
sshfs mailing list. Until the problem is resolved, you may fall back
|
||||
to an in-source build using autotools::
|
||||
|
||||
$ ./configure
|
||||
$ make
|
||||
$ sudo make install
|
||||
|
||||
Note that support for building with autotools may disappear at some
|
||||
point, so if you depend on using autotools for some reason please let
|
||||
the sshfs developers know!
|
||||
|
||||
|
||||
Caveats
|
||||
-------
|
||||
|
||||
Rename
|
||||
~~~~~~
|
||||
|
||||
Some SSH servers do not support atomically overwriting the destination
|
||||
when renaming a file. In this case you will get an error when you
|
||||
attempt to rename a file and the destination already exists. A
|
||||
workaround is to first remove the destination file, and then do the
|
||||
rename. SSHFS can do this automatically if you call it with `-o
|
||||
workaround=rename`. However, in this case it is still possible that
|
||||
someone (or something) recreates the destination file after SSHFS has
|
||||
removed it, but before SSHFS had the time to rename the old file. In
|
||||
this case, the rename will still fail.
|
||||
|
||||
Hardlinks
|
||||
~~~~~~~~~
|
||||
|
||||
If the SSH server supports the *hardlinks* extension, SSHFS will allow
|
||||
you to create hardlinks. However, hardlinks will always appear as
|
||||
individual files when seen through an SSHFS mount, i.e. they will
|
||||
appear to have different inodes and an *st_nlink* value of 1.
|
||||
|
||||
|
||||
O_APPEND
|
||||
~~~~~~~~
|
||||
|
||||
When writeback caching is enabled, SSHFS cannot reliably support the
|
||||
``O_APPEND`` open flag and thus signals an error on open. To enable
|
||||
support for unreliable ``O_APPEND`` (which may overwrite data if the
|
||||
file changes on the server at a bad time), mount the file system with
|
||||
``-o unreliable_append``.
|
||||
|
||||
|
||||
Getting Help
|
||||
------------
|
||||
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
AC_INIT(sshfs, 3.2.0)
|
||||
AC_CANONICAL_TARGET
|
||||
AM_INIT_AUTOMAKE([foreign subdir-objects])
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
|
||||
AC_PROG_CC
|
||||
AM_PROG_CC_C_O
|
||||
CFLAGS="$CFLAGS -Wall -W"
|
||||
LIBS=
|
||||
AC_SEARCH_LIBS(dlsym, [dl])
|
||||
LIBS=
|
||||
|
||||
case "$target_os" in
|
||||
*linux*) osname=linux;;
|
||||
*darwin*) osname=darwin;;
|
||||
*) osname=unknown;;
|
||||
esac
|
||||
|
||||
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH
|
||||
PKG_CHECK_MODULES([SSHFS], [fuse3 >= 3.1 glib-2.0 gthread-2.0])
|
||||
have_fuse_opt_parse=no
|
||||
oldlibs="$LIBS"
|
||||
LIBS="$LIBS $SSHFS_LIBS"
|
||||
AC_CHECK_FUNC([fuse_opt_parse], [have_fuse_opt_parse=yes])
|
||||
LIBS="$oldlibs"
|
||||
if test "$have_fuse_opt_parse" = no -o "$osname" = darwin; then
|
||||
CFLAGS="$CFLAGS -I${srcdir}/compat"
|
||||
fi
|
||||
AM_CONDITIONAL(FUSE_OPT_COMPAT, test "$have_fuse_opt_parse" = no)
|
||||
AM_CONDITIONAL(DARWIN_COMPAT, test "$osname" = darwin)
|
||||
|
||||
AC_CHECK_PROG(UNMOUNT_COMMAND, fusermount, fusermount -u, umount)
|
||||
|
||||
# TODO: Figure out why we special-case this in Darwin. Would be nice if
|
||||
# the default setting was consistent across platforms so we wouldn't need
|
||||
# to care about it here.
|
||||
case "$osname" in
|
||||
darwin) IDMAP_DEFAULT=user ;;
|
||||
*) IDMAP_DEFAULT=none ;;
|
||||
esac
|
||||
AC_SUBST(IDMAP_DEFAULT)
|
||||
|
||||
AC_CONFIG_FILES([Makefile test/Makefile])
|
||||
AC_OUTPUT
|
||||
Executable
+30
@@ -0,0 +1,30 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Create tarball from Git tag, removing and adding
|
||||
# some files.
|
||||
#
|
||||
|
||||
set -e
|
||||
|
||||
if [ -z "$1" ]; then
|
||||
TAG="$(git tag --list 'sshfs-3*' --sort=-taggerdate | head -1)"
|
||||
else
|
||||
TAG="$1"
|
||||
fi
|
||||
|
||||
echo "Creating release tarball for ${TAG}..."
|
||||
|
||||
mkdir "${TAG}"
|
||||
git archive --format=tar "${TAG}" | tar -x "--directory=${TAG}"
|
||||
find "${TAG}" -name .gitignore -delete
|
||||
rm "${TAG}/make_release_tarball.sh" \
|
||||
"${TAG}/.travis.yml" \
|
||||
"${TAG}/test/travis-build.sh" \
|
||||
"${TAG}/test/travis-install.sh"
|
||||
tar -cJf "${TAG}.tar.xz" "${TAG}/"
|
||||
gpg --armor --detach-sign "${TAG}.tar.xz"
|
||||
|
||||
PREV_TAG="$(git tag --list 'sshfs-3*' --sort=-taggerdate --merged "${TAG}^"| head -1)"
|
||||
echo "Contributors from ${PREV_TAG} to ${TAG}:"
|
||||
git log --pretty="format:%an <%aE>" "${PREV_TAG}..${TAG}" | sort -u
|
||||
|
||||
+17
-9
@@ -1,8 +1,8 @@
|
||||
project('sshfs', 'c', version: '3.1.0',
|
||||
project('sshfs', 'c', version: '3.3.1',
|
||||
meson_version: '>= 0.38',
|
||||
default_options: [ 'buildtype=plain' ])
|
||||
default_options: [ 'buildtype=debugoptimized' ])
|
||||
|
||||
add_global_arguments('-D_REENTRANT', '-DHAVE_CONFIG_H', '-O2', '-g',
|
||||
add_global_arguments('-D_REENTRANT', '-DHAVE_CONFIG_H',
|
||||
'-Wall', '-Wextra', '-Wno-sign-compare',
|
||||
'-Wmissing-declarations', '-Wwrite-strings',
|
||||
language: 'c')
|
||||
@@ -25,6 +25,8 @@ if not cc.compiles(code, args: [ '-O0', '-Werror=unused-result' ])
|
||||
endif
|
||||
|
||||
|
||||
rst2man = find_program('rst2man', required: false)
|
||||
|
||||
cfg = configuration_data()
|
||||
|
||||
cfg.set_quoted('PACKAGE_VERSION', meson.project_version())
|
||||
@@ -39,9 +41,6 @@ else
|
||||
cfg.set_quoted('IDMAP_DEFAULT', 'none')
|
||||
endif
|
||||
|
||||
configure_file(input: 'sshfs.1.in',
|
||||
output: 'sshfs.1',
|
||||
configuration : cfg)
|
||||
configure_file(output: 'config.h',
|
||||
configuration : cfg)
|
||||
|
||||
@@ -56,9 +55,18 @@ executable('sshfs', sshfs_sources,
|
||||
install: true,
|
||||
install_dir: get_option('bindir'))
|
||||
|
||||
# This is a little ugly. Is there a better way to tell Meson that the
|
||||
# manpage is in the build directory?
|
||||
install_man(join_paths(meson.current_build_dir(), 'sshfs.1'))
|
||||
if rst2man.found()
|
||||
custom_target('manpages', input: [ 'sshfs.rst' ], output: [ 'sshfs.1' ],
|
||||
command: [rst2man, '@INPUT@', '@OUTPUT@'], install: true,
|
||||
install_dir: join_paths(get_option('mandir'), 'man1'))
|
||||
else
|
||||
message('rst2man not found, not building manual page.')
|
||||
endif
|
||||
|
||||
meson.add_install_script('utils/install_helper.sh',
|
||||
get_option('sbindir'),
|
||||
get_option('bindir'))
|
||||
|
||||
|
||||
subdir('test')
|
||||
|
||||
|
||||
-239
@@ -1,239 +0,0 @@
|
||||
.TH SSHFS "1" "April 2008" "SSHFS version 2.0" "User Commands"
|
||||
.SH NAME
|
||||
SSHFS \- filesystem client based on ssh
|
||||
.SH SYNOPSIS
|
||||
.SS mounting
|
||||
.TP
|
||||
\fBsshfs\fP [\fIuser\fP@]\fBhost\fP:[\fIdir\fP] \fBmountpoint\fP [\fIoptions\fP]
|
||||
.SS unmounting
|
||||
.TP
|
||||
\fB@UNMOUNT_COMMAND@ mountpoint\fP
|
||||
.SH DESCRIPTION
|
||||
SSHFS (Secure SHell FileSystem) is a file system for Linux (and other
|
||||
operating systems with a FUSE implementation, such as Mac OS X or FreeBSD)
|
||||
capable of operating on files on a remote computer using just a secure
|
||||
shell login on the remote computer. On the local computer where the SSHFS
|
||||
is mounted, the implementation makes use of the FUSE (Filesystem in
|
||||
Userspace) kernel module. The practical effect of this is that the end user
|
||||
can seamlessly interact with remote files being securely served over SSH
|
||||
just as if they were local files on his/her computer. On the remote
|
||||
computer the SFTP subsystem of SSH is used.
|
||||
.PP
|
||||
If \fIhost\fP is a numeric IPv6 address, it needs to be enclosed in
|
||||
square brackets.
|
||||
.SH OPTIONS
|
||||
.SS "general options:"
|
||||
.TP
|
||||
\fB\-o\fR opt,[opt...]
|
||||
mount options
|
||||
.TP
|
||||
\fB\-h\fR \fB\-\-help\fR
|
||||
print help
|
||||
.TP
|
||||
\fB\-V\fR \fB\-\-version\fR
|
||||
print version
|
||||
.SS "SSHFS options:"
|
||||
.TP
|
||||
\fB\-p\fR PORT
|
||||
equivalent to '\-o port=PORT'
|
||||
.TP
|
||||
\fB\-C\fR
|
||||
equivalent to '\-o compression=yes'
|
||||
.TP
|
||||
\fB\-F\fR ssh_configfile
|
||||
specifies alternative ssh configuration file
|
||||
.TP
|
||||
\fB\-1\fR
|
||||
equivalent to '\-o ssh_protocol=1'
|
||||
.TP
|
||||
\fB\-o\fR reconnect
|
||||
reconnect to server
|
||||
.TP
|
||||
\fB\-o\fR delay_connect
|
||||
delay connection to server
|
||||
.TP
|
||||
\fB\-o\fR sshfs_sync
|
||||
synchronous writes
|
||||
.TP
|
||||
\fB\-o\fR no_readahead
|
||||
synchronous reads (no speculative readahead)
|
||||
.TP
|
||||
\fB\-o\fR sync_readdir
|
||||
synchronous readdir
|
||||
.TP
|
||||
\fB\-o\fR sshfs_debug
|
||||
print some debugging information
|
||||
.TP
|
||||
\fB\-o\fR workaround=LIST
|
||||
colon separated list of workarounds
|
||||
.RS 8
|
||||
.TP
|
||||
none
|
||||
no workarounds enabled
|
||||
.TP
|
||||
[no]rename
|
||||
fix renaming to existing file (default: off)
|
||||
.TP
|
||||
[no]nodelaysrv
|
||||
set nodelay tcp flag in ssh (default: off)
|
||||
.TP
|
||||
[no]truncate
|
||||
fix truncate for old servers (default: off)
|
||||
.TP
|
||||
[no]buflimit
|
||||
fix buffer fillup bug in server (default: on)
|
||||
.RE
|
||||
.TP
|
||||
\fB\-o\fR idmap=TYPE
|
||||
user/group ID mapping (default: @IDMAP_DEFAULT@)
|
||||
.RS 8
|
||||
.TP
|
||||
none
|
||||
no translation of the ID space
|
||||
.TP
|
||||
user
|
||||
only translate UID/GID of connecting user
|
||||
.TP
|
||||
file
|
||||
translate UIDs/GIDs based upon the contents of \fBuidfile \fR and
|
||||
\fBgidfile\fR
|
||||
.RE
|
||||
.TP
|
||||
\fB\-o\fR uidfile=FILE
|
||||
file containing username:uid mappings for \fBidmap=file\fR
|
||||
.RE
|
||||
.TP
|
||||
\fB\-o\fR gidfile=FILE
|
||||
file containing groupname:gid mappings for \fBidmap=file\fR
|
||||
.RE
|
||||
.TP
|
||||
\fB\-o\fR nomap=TYPE
|
||||
with idmap=file, how to handle missing mappings
|
||||
.RS 8
|
||||
.TP
|
||||
ignore
|
||||
don't do any re-mapping
|
||||
.TP
|
||||
error
|
||||
return an error (default)
|
||||
.RE
|
||||
.TP
|
||||
\fB\-o\fR ssh_command=CMD
|
||||
execute CMD instead of 'ssh'
|
||||
.TP
|
||||
\fB\-o\fR ssh_protocol=N
|
||||
ssh protocol to use (default: 2)
|
||||
.TP
|
||||
\fB\-o\fR sftp_server=SERV
|
||||
path to sftp server or subsystem (default: sftp)
|
||||
.TP
|
||||
\fB\-o\fR directport=PORT
|
||||
directly connect to PORT bypassing ssh
|
||||
.TP
|
||||
\fB\-o\fR slave
|
||||
communicate over stdin and stdout bypassing network
|
||||
.TP
|
||||
\fB\-o\fR disable_hardlink
|
||||
link(2) will return with errno set to ENOSYS. Hard links don't currently work
|
||||
perfectly on sshfs, and this confuses some programs. If that happens try
|
||||
disabling hard links with this option.
|
||||
.TP
|
||||
\fB\-o\fR transform_symlinks
|
||||
transform absolute symlinks to relative
|
||||
.TP
|
||||
\fB\-o\fR follow_symlinks
|
||||
follow symlinks on the server
|
||||
.TP
|
||||
\fB\-o\fR no_check_root
|
||||
don't check for existence of 'dir' on server
|
||||
.TP
|
||||
\fB\-o\fR password_stdin
|
||||
read password from stdin (only for pam_mount!)
|
||||
.TP
|
||||
\fB\-o\fR SSHOPT=VAL
|
||||
ssh options (see man ssh_config)
|
||||
.SS "FUSE options:"
|
||||
.TP
|
||||
\fB\-d\fR \fB\-o\fR debug
|
||||
enable debug output (implies \fB\-f\fR)
|
||||
.TP
|
||||
\fB\-f\fR
|
||||
foreground operation
|
||||
.TP
|
||||
\fB\-s\fR
|
||||
disable multi\-threaded operation
|
||||
.TP
|
||||
\fB\-o\fR allow_other
|
||||
allow access to other users
|
||||
.TP
|
||||
\fB\-o\fR allow_root
|
||||
allow access to root
|
||||
.HP
|
||||
\fB\-o\fR default_permissions
|
||||
enable permission checking by kernel
|
||||
.TP
|
||||
\fB\-o\fR fsname=NAME
|
||||
set filesystem name
|
||||
.TP
|
||||
\fB\-o\fR subtype=NAME
|
||||
set filesystem type
|
||||
.TP
|
||||
\fB\-o\fR max_read=N
|
||||
set maximum size of read requests
|
||||
.TP
|
||||
\fB\-o\fR kernel_cache
|
||||
cache files in kernel
|
||||
.TP
|
||||
\fB\-o\fR [no]auto_cache
|
||||
enable caching based on modification times
|
||||
.TP
|
||||
\fB\-o\fR umask=M
|
||||
set file permissions (octal)
|
||||
.TP
|
||||
\fB\-o\fR uid=N
|
||||
set file owner
|
||||
.TP
|
||||
\fB\-o\fR gid=N
|
||||
set file group
|
||||
.TP
|
||||
\fB\-o\fR entry_timeout=T
|
||||
cache timeout for names (1.0s)
|
||||
.TP
|
||||
\fB\-o\fR negative_timeout=T
|
||||
cache timeout for deleted names (0.0s)
|
||||
.TP
|
||||
\fB\-o\fR attr_timeout=T
|
||||
cache timeout for attributes (1.0s)
|
||||
.TP
|
||||
\fB\-o\fR ac_attr_timeout=T
|
||||
auto cache timeout for attributes (attr_timeout)
|
||||
.TP
|
||||
\fB\-o\fR modules=M1[:M2...]
|
||||
names of modules to push onto filesystem stack
|
||||
.TP
|
||||
\fB\-o\fR max_write=N
|
||||
set maximum size of write requests
|
||||
.SS "Module options:"
|
||||
.TP
|
||||
[subdir]
|
||||
.TP
|
||||
\fB\-o\fR subdir=DIR
|
||||
prepend this directory to all paths (mandatory)
|
||||
.TP
|
||||
\fB\-o\fR [no]rellinks
|
||||
transform absolute symlinks to relative
|
||||
.TP
|
||||
[iconv]
|
||||
.TP
|
||||
\fB\-o\fR from_code=CHARSET
|
||||
original encoding of file names (default: UTF-8)
|
||||
.TP
|
||||
\fB\-o\fR to_code=CHARSET
|
||||
new encoding of the file names (default: ISO-8859-2)
|
||||
.PD
|
||||
.SH "AUTHORS"
|
||||
.LP
|
||||
SSHFS has been written by Miklos Szeredi <miklos@szeredi.hu>.
|
||||
.LP
|
||||
This man page was written by Bartosz Fenski <fenio@debian.org> for the
|
||||
Debian GNU/Linux distribution (but it may be used by others).
|
||||
@@ -226,7 +226,6 @@ struct sshfs {
|
||||
int nomap;
|
||||
int disable_hardlink;
|
||||
int dir_cache;
|
||||
int writeback_cache;
|
||||
int show_version;
|
||||
int show_help;
|
||||
int singlethread;
|
||||
@@ -408,9 +407,6 @@ static struct fuse_opt sshfs_opts[] = {
|
||||
SSHFS_OPT("disable_hardlink", disable_hardlink, 1),
|
||||
SSHFS_OPT("dir_cache=yes", dir_cache, 1),
|
||||
SSHFS_OPT("dir_cache=no", dir_cache, 0),
|
||||
SSHFS_OPT("writeback_cache=yes", writeback_cache, 1),
|
||||
SSHFS_OPT("writeback_cache=no", writeback_cache, 0),
|
||||
SSHFS_OPT("unreliable_append", unrel_append, 1),
|
||||
|
||||
SSHFS_OPT("-h", show_help, 1),
|
||||
SSHFS_OPT("--help", show_help, 1),
|
||||
@@ -429,8 +425,18 @@ static struct fuse_opt sshfs_opts[] = {
|
||||
SSHFS_OPT("cache=yes", dir_cache, 1),
|
||||
SSHFS_OPT("cache=no", dir_cache, 0),
|
||||
|
||||
FUSE_OPT_END
|
||||
FUSE_OPT_KEY("writeback_cache=no", FUSE_OPT_KEY_DISCARD),
|
||||
FUSE_OPT_KEY("unreliable_append", FUSE_OPT_KEY_DISCARD),
|
||||
|
||||
/* These may come in from /etc/fstab - we just ignore them */
|
||||
FUSE_OPT_KEY("auto", FUSE_OPT_KEY_DISCARD),
|
||||
FUSE_OPT_KEY("noauto", FUSE_OPT_KEY_DISCARD),
|
||||
FUSE_OPT_KEY("user", FUSE_OPT_KEY_DISCARD),
|
||||
FUSE_OPT_KEY("nouser", FUSE_OPT_KEY_DISCARD),
|
||||
FUSE_OPT_KEY("users", FUSE_OPT_KEY_DISCARD),
|
||||
FUSE_OPT_KEY("_netdev", FUSE_OPT_KEY_DISCARD),
|
||||
|
||||
FUSE_OPT_END
|
||||
};
|
||||
|
||||
static struct fuse_opt workaround_opts[] = {
|
||||
@@ -1736,10 +1742,6 @@ static void *sshfs_init(struct fuse_conn_info *conn,
|
||||
// Lookup of . and .. is supported
|
||||
conn->capable |= FUSE_CAP_EXPORT_SUPPORT;
|
||||
|
||||
// Enable writeback cache if supported
|
||||
if (sshfs.writeback_cache && (conn->capable & FUSE_CAP_WRITEBACK_CACHE))
|
||||
conn->want |= FUSE_CAP_WRITEBACK_CACHE;
|
||||
|
||||
if (!sshfs.delay_connect)
|
||||
start_processing_thread();
|
||||
|
||||
@@ -2150,7 +2152,8 @@ static int sshfs_opendir(const char *path, struct fuse_file_info *fi)
|
||||
if (!err) {
|
||||
buf_finish(handle);
|
||||
fi->fh = (unsigned long) handle;
|
||||
}
|
||||
} else
|
||||
free(handle);
|
||||
buf_free(&buf);
|
||||
return err;
|
||||
}
|
||||
@@ -2502,24 +2505,6 @@ static int sshfs_open_common(const char *path, mode_t mode,
|
||||
if (sshfs.dir_cache)
|
||||
wrctr = cache_get_write_ctr();
|
||||
|
||||
/* With writeback cache, kernel may send read requests even
|
||||
when userspace opened write-only */
|
||||
if (sshfs.writeback_cache &&
|
||||
(fi->flags & O_ACCMODE) == O_WRONLY) {
|
||||
fi->flags &= ~O_ACCMODE;
|
||||
fi->flags |= O_RDWR;
|
||||
}
|
||||
|
||||
/* Having the kernel handle O_APPEND doesn't work reliably, if
|
||||
the file changes on the server at the wrong time, we will
|
||||
overwrite data instead of appending. */
|
||||
if ((fi->flags & O_APPEND) && sshfs.writeback_cache) {
|
||||
if(sshfs.unrel_append)
|
||||
fi->flags &= ~O_APPEND;
|
||||
else
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if ((fi->flags & O_ACCMODE) == O_RDONLY)
|
||||
pflags = SSH_FXF_READ;
|
||||
else if((fi->flags & O_ACCMODE) == O_WRONLY)
|
||||
@@ -3364,9 +3349,7 @@ static void usage(const char *progname)
|
||||
" -o sshfs_sync synchronous writes\n"
|
||||
" -o no_readahead synchronous reads (no speculative readahead)\n"
|
||||
" -o sync_readdir synchronous readdir\n"
|
||||
" -o unreliable_append Enable (unreliable) O_APPEND support\n"
|
||||
" -d, --debug print some debugging information (implies -f)\n"
|
||||
" -o writeback_cache=BOOL enable writeback cache {yes,no} (default: yes)\n"
|
||||
" -o dir_cache=BOOL enable caching of directory contents (names,\n"
|
||||
" attributes, symlink targets) {yes,no} (default: yes)\n"
|
||||
" -o dcache_max_size=N sets the maximum size of the directory cache (default: 10000)\n"
|
||||
@@ -3876,8 +3859,6 @@ int main(int argc, char *argv[])
|
||||
sshfs.wfd = -1;
|
||||
sshfs.ptyfd = -1;
|
||||
sshfs.dir_cache = 1;
|
||||
sshfs.writeback_cache = 1;
|
||||
sshfs.unrel_append = 0;
|
||||
sshfs.show_help = 0;
|
||||
sshfs.show_version = 0;
|
||||
sshfs.singlethread = 0;
|
||||
|
||||
@@ -0,0 +1,273 @@
|
||||
=======
|
||||
SSHFS
|
||||
=======
|
||||
|
||||
---------------------------------------------
|
||||
filesystem client based on SSH
|
||||
---------------------------------------------
|
||||
|
||||
:Manual section: 1
|
||||
:Manual group: User Commands
|
||||
|
||||
Synopsis
|
||||
========
|
||||
|
||||
To mount a filesystem::
|
||||
|
||||
sshfs [user@]host:[dir] mountpoint [options]
|
||||
|
||||
If *host* is a numeric IPv6 address, it needs to be enclosed in square
|
||||
brackets.
|
||||
|
||||
To unmount it::
|
||||
|
||||
fusermount3 -u mountpoint # Linux
|
||||
umount mountpoint # OS X, FreeBSD
|
||||
|
||||
Description
|
||||
===========
|
||||
|
||||
SSHFS allows you to mount a remote filesystem using SSH (more
|
||||
precisely, the SFTP subsystem). Most SSH servers support and enable
|
||||
this SFTP access by default, so SSHFS is very simple to use - there's
|
||||
nothing to do on the server-side.
|
||||
|
||||
SSHFS uses FUSE (Filesystem in Userspace) and should work on any
|
||||
operating system that provides a FUSE implementation. Currently,
|
||||
this includes Linux, FreeBSD and Mac OS X.
|
||||
|
||||
It is recommended to run SSHFS as regular user (not as root). For
|
||||
this to work the mountpoint must be owned by the user. If username is
|
||||
omitted SSHFS will use the local username. If the directory is
|
||||
omitted, SSHFS will mount the (remote) home directory. If you need to
|
||||
enter a password sshfs will ask for it (actually it just runs ssh
|
||||
which ask for the password if needed).
|
||||
|
||||
|
||||
Options
|
||||
=======
|
||||
|
||||
|
||||
-o opt,[opt...]
|
||||
mount options, see below for details. A a variety of SSH options can
|
||||
be given here as well, see the manual pages for *sftp(1)* and
|
||||
*ssh_config(5)*.
|
||||
|
||||
-h, --help
|
||||
print help and exit.
|
||||
|
||||
-V, --version
|
||||
print version information and exit.
|
||||
|
||||
-d, --debug
|
||||
print debugging information.
|
||||
|
||||
-p PORT
|
||||
equivalent to '-o port=PORT'
|
||||
|
||||
-f
|
||||
do not daemonize, stay in foreground.
|
||||
|
||||
-s
|
||||
Single threaded operation.
|
||||
|
||||
-C
|
||||
equivalent to '-o compression=yes'
|
||||
|
||||
-F ssh_configfile
|
||||
specifies alternative ssh configuration file
|
||||
|
||||
-1
|
||||
equivalent to '-o ssh_protocol=1'
|
||||
|
||||
-o reconnect
|
||||
automatically reconnect to server if connection is
|
||||
interrupted. Attempts to access files that were opened before the
|
||||
reconnection will give errors and need to be re-opened.
|
||||
|
||||
-o delay_connect
|
||||
Don't immediately connect to server, wait until mountpoint is first
|
||||
accessed.
|
||||
|
||||
-o sshfs_sync
|
||||
synchronous writes. This will slow things down, but may be useful
|
||||
in some situations.
|
||||
|
||||
-o no_readahead
|
||||
Only read exactly the data that was requested, instead of
|
||||
speculatively reading more to anticipate the next read request.
|
||||
|
||||
-o sync_readdir
|
||||
synchronous readdir. This will slow things down, but may be useful
|
||||
in some situations.
|
||||
|
||||
-o workaround=LIST
|
||||
Enable the specified workaround. See the `Caveats` section below
|
||||
for some additional information. Possible values are:
|
||||
|
||||
:rename: Emulate overwriting an existing file by deleting and
|
||||
renaming.
|
||||
:truncate: Work around servers that don't support truncate by
|
||||
coping the whole file, truncating it locally, and sending it
|
||||
back.
|
||||
:fstat: Work around broken servers that don't support *fstat()* by
|
||||
using *stat* instead.
|
||||
:buflimit: Work around OpenSSH "buffer fillup" bug.
|
||||
|
||||
-o idmap=TYPE
|
||||
How to map remote UID/GIDs to local values. Possible values are:
|
||||
|
||||
:none: no translation of the ID space (default).
|
||||
|
||||
:user: map the UID/GID of the remote user to UID/GID of the
|
||||
mounting user.
|
||||
|
||||
:file: translate UIDs/GIDs based upon the contents of `--uidfile`
|
||||
and `--gidfile`.
|
||||
|
||||
-o uidfile=FILE
|
||||
file containing ``username:uid`` mappings for `-o idmap=file`
|
||||
|
||||
-o gidfile=FILE
|
||||
file containing ``groupname:gid`` mappings for `-o idmap=file`
|
||||
|
||||
-o nomap=TYPE
|
||||
with idmap=file, how to handle missing mappings:
|
||||
|
||||
:ignore: don't do any re-mapping
|
||||
:error: return an error (default)
|
||||
|
||||
-o ssh_command=CMD
|
||||
execute CMD instead of 'ssh'
|
||||
|
||||
-o ssh_protocol=N
|
||||
ssh protocol to use (default: 2)
|
||||
|
||||
-o sftp_server=SERV
|
||||
path to sftp server or subsystem (default: sftp)
|
||||
|
||||
-o directport=PORT
|
||||
directly connect to PORT bypassing ssh
|
||||
|
||||
-o slave
|
||||
communicate over stdin and stdout bypassing network
|
||||
|
||||
-o disable_hardlink
|
||||
With this option set, attempts to call `link(2)` will fail with
|
||||
error code ENOSYS.
|
||||
|
||||
-o transform_symlinks
|
||||
transform absolute symlinks on remote side to relative
|
||||
symlinks. This means that if e.g. on the server side
|
||||
``/foo/bar/com`` is a symlink to ``/foo/blub``, SSHFS will
|
||||
transform the link target to ``../blub`` on the client side.
|
||||
|
||||
-o follow_symlinks
|
||||
follow symlinks on the server, i.e. present them as regular
|
||||
files on the client. If a symlink is dangling (i.e, the target does
|
||||
not exist) the behavior depends on the remote server - the entry
|
||||
may appear as a symlink on the client, or it may appear as a
|
||||
regular file that cannot be accessed.
|
||||
|
||||
-o no_check_root
|
||||
don't check for existence of 'dir' on server
|
||||
|
||||
-o password_stdin
|
||||
read password from stdin (only for pam_mount!)
|
||||
|
||||
-o dir_cache=BOOL
|
||||
Enables (*yes*) or disables (*no*) the SSHFS directory cache. The
|
||||
directory cache holds the names of directory entries. Enabling it
|
||||
allows `readdir(3)` system calls to be processed without network
|
||||
access.
|
||||
|
||||
-o dcache_max_size=N
|
||||
sets the maximum size of the directory cache.
|
||||
|
||||
-o dcache_timeout=N
|
||||
sets timeout for directory cache in seconds.
|
||||
|
||||
-o dcache_{stat,link,dir}_timeout=N
|
||||
sets separate timeout for {attributes, symlinks, names} in the
|
||||
directory cache.
|
||||
|
||||
-o dcache_clean_interval=N
|
||||
sets the interval for automatic cleaning of the directory cache.
|
||||
|
||||
-o dcache_min_clean_interval=N
|
||||
sets the interval for forced cleaning of the directory cache
|
||||
when full.
|
||||
|
||||
In addition, SSHFS accepts several options common to all FUSE file
|
||||
systems. These are described in the `mount.fuse` manpage (look
|
||||
for "general", "libfuse specific", and "high-level API" options).
|
||||
|
||||
Caveats / Workarounds
|
||||
=====================
|
||||
|
||||
Hardlinks
|
||||
~~~~~~~~~
|
||||
|
||||
If the SSH server supports the *hardlinks* extension, SSHFS will allow
|
||||
you to create hardlinks. However, hardlinks will always appear as
|
||||
individual files when seen through an SSHFS mount, i.e. they will
|
||||
appear to have different inodes and an *st_nlink* value of 1.
|
||||
|
||||
|
||||
Rename
|
||||
~~~~~~
|
||||
|
||||
Some SSH servers do not support atomically overwriting the destination
|
||||
when renaming a file. In this case you will get an error when you
|
||||
attempt to rename a file and the destination already exists. A
|
||||
workaround is to first remove the destination file, and then do the
|
||||
rename. SSHFS can do this automatically if you call it with `-o
|
||||
workaround=rename`. However, in this case it is still possible that
|
||||
someone (or something) recreates the destination file after SSHFS has
|
||||
removed it, but before SSHFS had the time to rename the old file. In
|
||||
this case, the rename will still fail.
|
||||
|
||||
|
||||
SSHFS hangs
|
||||
~~~~~~~~~~~
|
||||
|
||||
In some cases, attempts to access the SSHFS mountpoint may freeze if
|
||||
no filesystem activity has occured for some time. This is typically
|
||||
caused by the SSH connection being dropped because of inactivity
|
||||
without SSHFS being informed about that. As a workaround, you can try
|
||||
to mount with ``-o ServerAliveInterval=15``. This will force the SSH
|
||||
connection to stay alive even if you have no activity.
|
||||
|
||||
Mounting from /etc/fstab
|
||||
========================
|
||||
|
||||
To mount an SSHFS filesystem from ``/etc/fstab``, simply use ``sshfs`
|
||||
as the file system type. (For backwards compatibility, you may also
|
||||
use ``fuse.sshfs``).
|
||||
|
||||
|
||||
See also
|
||||
========
|
||||
|
||||
The `mount.fuse(8)` manpage.
|
||||
|
||||
Getting Help
|
||||
============
|
||||
|
||||
If you need help, please ask on the <fuse-sshfs@lists.sourceforge.net>
|
||||
mailing list (subscribe at
|
||||
https://lists.sourceforge.net/lists/listinfo/fuse-sshfs).
|
||||
|
||||
Please report any bugs on the GitHub issue tracker at
|
||||
https://github.com/libfuse/libfuse/issues.
|
||||
|
||||
|
||||
Authors
|
||||
=======
|
||||
|
||||
SSHFS is currently maintained by Nikolaus Rath <Nikolaus@rath.org>,
|
||||
and was created by Miklos Szeredi <miklos@szeredi.hu>.
|
||||
|
||||
This man page was originally written by Bartosz Fenski
|
||||
<fenio@debian.org> for the Debian GNU/Linux distribution (but it may
|
||||
be used by others).
|
||||
@@ -1,4 +0,0 @@
|
||||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
EXTRA_DIST = meson.build conftest.py pytest.ini test_sshfs.py \
|
||||
util.py wrong_command.c
|
||||
+1
-1
@@ -2,7 +2,7 @@ test_scripts = [ 'conftest.py', 'pytest.ini', 'test_sshfs.py',
|
||||
'util.py' ]
|
||||
custom_target('test_scripts', input: test_scripts,
|
||||
output: test_scripts, build_by_default: true,
|
||||
command: ['cp', '-fP', '--preserve=mode',
|
||||
command: ['cp', '-fPp',
|
||||
'@INPUT@', meson.current_build_dir() ])
|
||||
|
||||
# Provide something helpful when running 'ninja test'
|
||||
|
||||
+11
-11
@@ -33,9 +33,7 @@ def name_generator(__ctr=[0]):
|
||||
@pytest.mark.parametrize("debug", (False, True))
|
||||
@pytest.mark.parametrize("cache_timeout", (0,1))
|
||||
@pytest.mark.parametrize("sync_rd", (True, False))
|
||||
@pytest.mark.parametrize("writeback", (False, True))
|
||||
def test_sshfs(tmpdir, debug, cache_timeout, sync_rd,
|
||||
writeback, capfd):
|
||||
def test_sshfs(tmpdir, debug, cache_timeout, sync_rd, capfd):
|
||||
|
||||
# Avoid false positives from debug messages
|
||||
#if debug:
|
||||
@@ -65,12 +63,6 @@ def test_sshfs(tmpdir, debug, cache_timeout, sync_rd,
|
||||
if sync_rd:
|
||||
cmdline += [ '-o', 'sync_readdir' ]
|
||||
|
||||
if writeback:
|
||||
cmdline += [ '-o', 'writeback_cache=yes',
|
||||
'-o', 'unreliable_append' ]
|
||||
else:
|
||||
cmdline += [ '-o', 'writeback_cache=no' ]
|
||||
|
||||
# SSHFS Cache
|
||||
if cache_timeout == 0:
|
||||
cmdline += [ '-o', 'dir_cache=no' ]
|
||||
@@ -111,7 +103,7 @@ def test_sshfs(tmpdir, debug, cache_timeout, sync_rd,
|
||||
# file timestamps.
|
||||
tst_utimens(mnt_dir, tol=1)
|
||||
|
||||
tst_link(mnt_dir)
|
||||
tst_link(mnt_dir, cache_timeout)
|
||||
tst_truncate_path(mnt_dir)
|
||||
tst_truncate_fd(mnt_dir)
|
||||
tst_open_unlink(mnt_dir)
|
||||
@@ -282,7 +274,7 @@ def tst_open_unlink(mnt_dir):
|
||||
def tst_statvfs(mnt_dir):
|
||||
os.statvfs(mnt_dir)
|
||||
|
||||
def tst_link(mnt_dir):
|
||||
def tst_link(mnt_dir, cache_timeout):
|
||||
name1 = pjoin(mnt_dir, name_generator())
|
||||
name2 = pjoin(mnt_dir, name_generator())
|
||||
shutil.copyfile(TEST_FILE, name1)
|
||||
@@ -293,6 +285,14 @@ def tst_link(mnt_dir):
|
||||
|
||||
os.link(name1, name2)
|
||||
|
||||
# The link operation changes st_ctime, and if we're unlucky
|
||||
# the kernel will keep the old value cached for name1, and
|
||||
# retrieve the new value for name2 (at least, this is the only
|
||||
# way I can explain the test failure). To avoid this problem,
|
||||
# we need to wait until the cached value has expired.
|
||||
if cache_timeout:
|
||||
safe_sleep(cache_timeout)
|
||||
|
||||
fstat1 = os.lstat(name1)
|
||||
fstat2 = os.lstat(name2)
|
||||
for attr in ('st_mode', 'st_dev', 'st_uid', 'st_gid',
|
||||
|
||||
@@ -36,13 +36,6 @@ for san in undefined address; do
|
||||
meson -D b_sanitize=${san} -D b_lundef=false -D werror=true ..
|
||||
ninja
|
||||
${TEST_CMD}
|
||||
sudo ninja install
|
||||
cd ..
|
||||
done
|
||||
|
||||
# Autotools build
|
||||
CC=gcc
|
||||
autoreconf -i
|
||||
./configure
|
||||
make
|
||||
${TEST_CMD}
|
||||
sudo make install
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
set -e
|
||||
|
||||
sudo ln -svf $(which python3) /usr/bin/python3
|
||||
sudo python3 -m pip install pytest meson
|
||||
wget https://github.com/ninja-build/ninja/releases/download/v1.7.2/ninja-linux.zip
|
||||
unzip ninja-linux.zip
|
||||
|
||||
Executable
+19
@@ -0,0 +1,19 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Don't call this script. It is used internally by the Meson
|
||||
# build system. Thank you for your cooperation.
|
||||
#
|
||||
|
||||
set -e
|
||||
|
||||
bindir="$2"
|
||||
sbindir="$1"
|
||||
prefix="${MESON_INSTALL_DESTDIR_PREFIX}"
|
||||
|
||||
mkdir -p "${prefix}/${sbindir}"
|
||||
|
||||
ln -svf --relative "${prefix}/${bindir}/sshfs" \
|
||||
"${prefix}/${sbindir}/mount.sshfs"
|
||||
|
||||
ln -svf --relative "${prefix}/${bindir}/sshfs" \
|
||||
"${prefix}/${sbindir}/mount.fuse.sshfs"
|
||||
Reference in New Issue
Block a user