Unix & Linux Stack Exchange
Q&A for users of Linux, FreeBSD and other Unix-like operating systems
Latest Questions
1
votes
1
answers
1886
views
Is there some program that can copy sparse file (/var/log/lastlog) over ssh as fast as cp (on local pc)?
I'm backing ip my server via `rsync` over `ssh` but `/var/log/lastlog` file is 1.2G (it takes only 24K on the hdd). On a local machine `cp` can copy it for no time (a few ms) but `rsync` requires reading the whole file which takes hours. I also tried to mount server's `/var/log` with `sshfs` to my l...
I'm backing ip my server via
rsync
over ssh
but /var/log/lastlog
file is 1.2G (it takes only 24K on the hdd).
On a local machine cp
can copy it for no time (a few ms) but rsync
requires reading the whole file which takes hours. I also tried to mount server's /var/log
with sshfs
to my local pc but my local pc detects the file as 1.2T (so sshfs
doesn't appear to detect sparse files).
Is there some program that detects sparse files over ssh and can copy them the same way cp
(without reading the empty blocks from the file) does?
EDIT: rsync
's -S/--sparse
option still wants to read the whole source file (with all the empty bytes) which takes hours for 1.2T file. After rsync
reads the whole file it creates small destination file (proper sparse file) but the problem is that it reads the source file with all the empty bytes (without skipping them). cp
copies the file in a few ms while rsync
takes hours. You can try it (on Linux) by creating 20G sparse file with truncate -s 20G sparse_file1
and copy it with rsync -S sparse_file1 sparse_file2
(takes long time) and then try to copy it with cp sparse_file1 sparse_file3
(takes a few ms).
FieryRider
(135 rep)
Mar 21, 2019, 06:07 AM
• Last activity: Jul 27, 2025, 03:02 PM
0
votes
0
answers
55
views
Need option to prevent SSHFS from changing server's file modification date on download(!)
SSHFS changes modification date (not access date) of server files on download(!). Is there an option/setting to prevent that? The problems this causes include: - after the next download, you can't sort the files by date anymore. - when we backup to the server, every file will be transferred on every...
SSHFS changes modification date (not access date) of server files on download(!). Is there an option/setting to prevent that?
The problems this causes include:
- after the next download, you can't sort the files by date anymore.
- when we backup to the server, every file will be transferred on every occasion (bc their dates are always different)
- in the use-case of sharing updated files on the server: everything will be downloaded every occasion even if no-one uploaded anything
UPDATE:
After changing operating systems and taking 2 weeks to restore modification dates from backups (making sure that actually-modified files don't get their date restored...), there are two machines remaining with which we can reproduce the behavior:
Server: Linux Mint 21.2, sshfs 3.7.1, fuse 3.10.5, fuse ki 7.31 fusermount3 3.10.5
Client: GhostBSD 14.2 (a modified FreeBSD 14.2-RELEASE-p1), sshfs 3.7.3, fuse 3.17.1, fuse ki 7.40, mount-fusefs 0.3.9-pre1
- Download Command:
cp -pr mnt/content/ local/content/
- mount command: sshfs a@192.168.1.4:/home/a/server-dir mnt/
----
`
df -T
Filesystem Type 1K-blocks Used Available Use% Mounted on
tmpfs tmpfs 1618628 2160 1616468 1% /run
/dev/sda5 ext3 435281408 433288172 1993236 100% /
tmpfs tmpfs 8093124 4 8093120 1% /dev/shm
tmpfs tmpfs 5120 4 5116 1% /run/lock
/dev/sda1 vfat 98304 31835 66469 33% /boot/efi
tmpfs tmpfs 1618624 104 1618520 1% /run/user/1000
/home/a/.Private ecryptfs 435281408 433288172 1993236 100% /home/a
/dev/mapper/veracrypt1 ext3 391090108 368891012 2276168 100% /media/veracrypt1
`
----
`
sshfs a@192.168.1.4:/media/notcrypted/ mnt/
cp mnt/file . that changes the server file's date
`
Bernd Elkemann
(121 rep)
Jul 20, 2025, 11:48 AM
• Last activity: Jul 20, 2025, 02:45 PM
1
votes
2
answers
2091
views
How to sync two disks - continually?
I have to HDD drives on two different servers that I need to sync regularly. Until now, I've been using rsync over sshfs, first from one to the other, then from the other to the first, but this method is proving unsatisfactory. When a file is removed from drive A, it is not copied to drive B, but th...
I have to HDD drives on two different servers that I need to sync regularly. Until now, I've been using rsync over sshfs, first from one to the other, then from the other to the first, but this method is proving unsatisfactory. When a file is removed from drive A, it is not copied to drive B, but then copied from drive B to drive A. So I can never remove anything unless I do it from both drives. The same goes for renaming - renaming a directory on one drive soon results in two directories with different names but the same contents.
Ideally I need something that keeps track of changes on one drive and then duplicates these changes on the other. Any suggestions?
OZ1SEJ
(239 rep)
Jul 1, 2021, 12:09 PM
• Last activity: Jul 13, 2025, 04:03 PM
14
votes
2
answers
13778
views
How to deal with freezes caused by autofs after network disconnect
I mount four servers (3 via `cifs`, 1 via `sshfs`) using `autofs`. `auto.master` /- /etc/auto.all --timeout=60 --ghost `auto.all ` /mnt \ /server1 -fstype=cifs,rw,credentials=/etc/.smbcredentials.txt,uid=1000,file_mode=0775,dir_mode=0775,users ://server1/ \ /server2/ -fstype=cifs,rw,credentials=/etc...
I mount four servers (3 via
cifs
, 1 via sshfs
) using autofs
.
auto.master
/- /etc/auto.all --timeout=60 --ghost
auto.all
/mnt \
/server1 -fstype=cifs,rw,credentials=/etc/.smbcredentials.txt,uid=1000,file_mode=0775,dir_mode=0775,users ://server1/ \
/server2/ -fstype=cifs,rw,credentials=/etc/.smbcredentials.txt,uid=1000,file_mode=0775,dir_mode=0775,users ://server2/ \
/server3 -fstype=cifs,rw,credentials=/etc/.smbcredentials.txt,uid=1000,file_mode=0775,dir_mode=0775,users ://server3/ \
/server4 -fstype=fuse,rw,allow_other,uid=1000,users,reconnect,cache=yes,kernel_cache,compression=no,large_read,Ciphers=arcfour :sshfs\#user@server\:/home
```
Everything is fine when I make a clean boot.
I connect to my network (using a VPN) and autofs
mounts everything.
# Problem
When there is a network disconnect, e.g. when I hibernate my laptop or connect to a different network, autofs
causes my explorer (dolphin) to freeze because it tries to load the remote share infinitely.
It becomes unresponsive and does not even react to SIGTERM commands.
Sometimes I am lucky and calling sudo service autofs stop
and sudo automount
helps to resolve the issue.
However, often it still stays freezed.
Sometimes even, my whole dock freezes due to this making all applications unselectable. Then I have to make a full reboot..
I've searched for weeks now for solution how to deal with autofs
in such situations. Before using autofs
, I had everything mounted via /etc/fstab
but that also required a manual remount after every network interruption.
I thought autofs
would help me here but it causes me even more trouble.
# Questions
1. Is there any point I overlooked that could solve the freezing problem?
2. Is there a completely different approach that may be better suited for my situation than autofs
?
PS: I'm on Kubuntu 16.04
pat-s
(348 rep)
Jan 9, 2018, 11:27 PM
• Last activity: Jul 12, 2025, 11:09 AM
4
votes
1
answers
2284
views
Automating sshfs not working
I want to mount a remote directory and I want to automate this. So I write below script which not working properly. #!/usr/bin/expect -f spawn sshfs vedams@192.168.5.109:/home/user /mnt/remote expect "assword:" send "myPassword\r" When I run the above script and if check `ls /mnt/remote`, it is givi...
I want to mount a remote directory and I want to automate this. So I write below script which not working properly.
#!/usr/bin/expect -f
spawn sshfs vedams@192.168.5.109:/home/user /mnt/remote
expect "assword:"
send "myPassword\r"
When I run the above script and if check
ls /mnt/remote
, it is giving below error:
ls: cannot access /mnt/remote: Transport endpoint is not connected
I used sshpass
but not working:
sshpass -p myPassword sshfs user@192.168.5.109:/home/user /mnt/remote
Shell blocked and getting the same error.
Note: If I run sshpass -p vedams123 sshfs vedams@192.168.5.109:/home/user /mnt/remote
, working withour any problem.
gangadhars
(727 rep)
Nov 10, 2014, 02:05 PM
• Last activity: Jul 9, 2025, 07:08 AM
2
votes
2
answers
5397
views
sshfs mounts share in read-only mode
I need to mount a share using `sshfs`. When I mount it using `sshfs` directly, i.e. # sshfs martin@192.168.1.10:/home/data/ -o allow_other /mnt/data/ or # sshfs martin@192.168.1.10:/home/data/ -o allow_other,default_permissions /mnt/data/ the share is mounted, but only in "read-only" mode. However w...
I need to mount a share using
sshfs
.
When I mount it using sshfs
directly, i.e.
# sshfs martin@192.168.1.10:/home/data/ -o allow_other /mnt/data/
or
# sshfs martin@192.168.1.10:/home/data/ -o allow_other,default_permissions /mnt/data/
the share is mounted, but only in "read-only" mode. However when I add following line into /etc/fstab
, and do mount /mnt/data
, then the share is mounted read-write.
# martin@192.168.1.10:/home/data/ /mnt/data fuse.sshfs noauto,_netdev,allow_other,default_permissions 0 0
Both commands are issued unde root. Why does sshfs
from the command line mount the filesystem read-only?
How can I mount it read-write using the sshfs
command?
Martin Vegter
(586 rep)
Nov 1, 2015, 08:07 AM
• Last activity: May 3, 2025, 08:35 PM
1
votes
3
answers
1015
views
bash count files and directory, summary size and EXCLUDE folders that are fuse|sshfs
I need help for a bash script that counts files and folders in a specified directory on a Linux system (Debian), but I want to exclude a specified folder. I have a main directory named `workdir` with different script files and folders. Inside `workdir`, I have a directory named `mysshfs`. I use `fus...
I need help for a bash script that counts files and folders in a specified directory on a Linux system (Debian), but I want to exclude a specified folder.
I have a main directory named
workdir
with different script files and folders.
Inside workdir
, I have a directory named mysshfs
.
I use fuse/sshfs
to mount an external folder in the mysshfs
folder.
Now I will run some commands to get information about the **file/directory** count
and **file/directory** size
, but I want to exclude the directory mysshfs
.
My bash commands that work:
1. Get the full size of workdir
| **no fuse/sshfs in use**
$ du -hs workdir
2. Get the full size of workdir
, excluding mysshfs
| **fuse/sshfs in use**
$ du -hs --exclude=mysshf workdir
3. Count files in workdir
| **no fuse/sshfs in use**
$ find workdir -type f | wc -l
4. Count folders in workdir
| **no fuse/sshfs in use**
$ find workdir -type d | wc -l
5. Count files in workdir
, excluding mysshfs
| **no fuse/sshfs in use**
$ find workdir -type f -not -path "*mysshfs*" | wc -l
6. Count folders in workdir
, excluding mysshfs
| **no fuse/sshfs in use**
$ find workdir -type d -not -path "*mysshfs*" | wc -l
When I use commands **5 & 6** and the remote directory is mounted under the mysshfs
directory, the commands hang.
The commands eventually works and show the correct output, but it looks like the commands are still looking inside the excluded directory even though they shouldn't be, so it takes a long time to display the result.
Where is my error or did I forget something in my commands 5 & 6?
Or can I use other commands for my results?
I need to count files and directories using 2 separate commands
and exclude a specified folder that is mounted over fuse/sshfs
to get a fast result.
ReflectYourCharacter
(8157 rep)
Feb 22, 2022, 11:25 AM
• Last activity: Mar 24, 2025, 07:31 PM
28
votes
6
answers
89768
views
Mount with sshfs and write file permissions
I try to sshfs mount a remote dir, but the mounted files are not writable. I have run out of ideas or ways to debug this. Is there anything I should check on the remote server? I am on an Xubuntu 14.04. I mount remote dir of a 14.04 Ubuntu. local $ lsb_release -a No LSB modules are available. Distri...
I try to sshfs mount a remote dir, but the mounted files are not writable. I have run out of ideas or ways to debug this. Is there anything I should check on the remote server?
I am on an Xubuntu 14.04. I mount remote dir of a 14.04 Ubuntu.
local $ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.3 LTS
Release: 14.04
Codename: trusty
I changed the /etc/fuse.conf
local $ sudo cat /etc/fuse.conf
# /etc/fuse.conf - Configuration file for Filesystem in Userspace (FUSE)
# Set the maximum number of FUSE mounts allowed to non-root users.
# The default is 1000.
#mount_max = 1000
# Allow non-root users to specify the allow_other or allow_root mount options.
user_allow_other
And my user is in the fuse group
local $ sudo grep fuse /etc/group
fuse:x:105:MY_LOACL_USERNAME
And I mount the remote dir with (tried with/without combinations of sudo, default_permissions, allow_other):
local $sudo sshfs -o allow_other,default_permissions -o IdentityFile=/path/to/ssh_key REMOTE_USERNAME@REMOTE_HOST:/remote/dir/path/ /mnt/LOCAL_DIR_NAME/
The
REMOTE_USERNAME
has write permissions to the dir/files (on the remote server).
I tried the above command without sudo, default_permissions, and in all cases I get:
local $ ls -al /mnt/LOCAL_DIR_NAME/a_file
-rw-rw-r-- 1 699 699 1513 Aug 12 16:08 /mnt/LOCAL_DIR_NAME/a_file
local $ test -w /mnt/LOCAL_DIR_NAME/a_file && echo "Writable" || echo "Not Writable"
Not Writable
Clarification 0
------
In response to user3188445's comment:
$ whoami
LOCAL_USER
$ cd
$ mkdir test_mnt
$ sshfs -o allow_other,default_permissions -o IdentityFile=/path/to/ssh_key REMOTE_USERNAME@REMOTE_HOST:/remote/dir/path/ test_mnt/
$ ls test_mnt/
I see the contents of the dir correctly
$ ls -al test_mnt/
total 216
drwxr-xr-x 1 699 699 4096 Aug 12 16:42 .
drwxr----- 58 LOCAL_USER LOCAL_USER 4096 Aug 17 15:46 ..
-rw-r--r-- 1 699 699 2557 Jul 30 16:48 sample_file
drwxr-xr-x 1 699 699 4096 Aug 11 17:25 sample_dir
$ touch test_mnt/new_file
touch: cannot touch ‘test_mnt/new_file’: Permission denied
# extra info: SSH to the remote host and check file permissions
$ ssh REMOTE_USERNAME@REMOTE_HOST
# on remote host
$ ls -al /remote/dir/path/
lrwxrwxrwx 1 root root 18 Jul 30 13:48 /remote/dir/path/ -> /srv/path/path/path/
$ cd /remote/dir/path/
$ ls -al
total 216
drwxr-xr-x 26 REMOTE_USERNAME REMOTE_USERNAME 4096 Aug 12 13:42 .
drwxr-xr-x 4 root root 4096 Jul 30 14:37 ..
-rw-r--r-- 1 REMOTE_USERNAME REMOTE_USERNAME 2557 Jul 30 13:48 sample_file
drwxr-xr-x 2 REMOTE_USERNAME REMOTE_USERNAME 4096 Aug 11 14:25 sample_dir
vkats
(661 rep)
Aug 12, 2015, 02:40 PM
• Last activity: Mar 8, 2025, 06:54 AM
0
votes
0
answers
401
views
Accessing Docker Unix Socket from a Podman Container on a Remote Server (SSH)
I'm trying to access a **Docker** Unix socket on a remote server from within a **Podman** container (`offen/docker-volume-backup`). I've (root-)mounted the entire root filesystem of the remote server using `sshfs` and can access it as root. However, I can't connect to the Unix socket. (All servers a...
I'm trying to access a **Docker** Unix socket on a remote server from within a **Podman** container (
offen/docker-volume-backup
).
I've (root-)mounted the entire root filesystem of the remote server using sshfs
and can access it as root.
However, I can't connect to the Unix socket. (All servers are on AlmaLinux with SELinux, and Podman is used with sudo.)
I've tried the following settings in my Podman container:
volumes:
- /mnt/fuse_to_somewhere/var/run/docker.sock:/var/run/docker.sock:ro,z
security_opt:
- label=disable
privileged:
- true
But I still get this error:
Commands: error querying for containers: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
Questions:
1. What steps are needed to connect to the Docker Unix socket from a Podman container?
2. Are there specific permissions required for accessing the Docker socket over sshfs?
Jack
(1 rep)
Feb 21, 2025, 05:05 PM
• Last activity: Feb 21, 2025, 05:22 PM
30
votes
2
answers
55511
views
Transport endpoint is not connected in SSHFS
After reinstalling the server I can not mount it: sshfs root@example.com:/var /remote_mount fuse: bad mount point `/remote_mount': Transport endpoint is not connected When I SSH, I get an error: # ssh root@example.com The authenticity of host 'example.com (xxx.xxx.xxx.xxx)' can't be established. ECD...
After reinstalling the server I can not mount it:
sshfs root@example.com:/var /remote_mount
fuse: bad mount point `/remote_mount': Transport endpoint is not connected
When I SSH, I get an error:
# ssh root@example.com
The authenticity of host 'example.com (xxx.xxx.xxx.xxx)' can't be established.
ECDSA key fingerprint is 57:b6:bd:76:17:80:73:85:4a:14:8a:6f:dc:fa:fe:7c.
Are you sure you want to continue connecting (yes/no)?
clarkk
(1947 rep)
Aug 31, 2015, 08:48 AM
• Last activity: Feb 20, 2025, 11:40 PM
7
votes
1
answers
1772
views
Did I accidentally delete files? How can I recover them?
I’m a new PhD student and I’m dealing with a serious issue. I tried to map a directory from Server A (/home/lab/Desktop) to Server B (/home/usr/labDesktop) because Server B has better computing power. While working, all the data in the directory on Server A disappeared. Here’s a part of the sequence...
I’m a new PhD student and I’m dealing with a serious issue. I tried to map a directory from Server A (/home/lab/Desktop) to Server B (/home/usr/labDesktop) because Server B has better computing power. While working, all the data in the directory on Server A disappeared.
Here’s a part of the sequence of commands I ran, which might have caused the problem:
$ sudo sshfs lab@ipaddress:/home/lab/Desktop /home/usr/labDesktop
[sudo] password for usr:
The authenticity of host 'ipaddress (ipaddress)' can't be established.
XXX key fingerprint is XXX.
This key is not known by any other names
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
lab@ipaddress's password:
$ ls
labDesktop examples.desktop
$ cd labDesktop
-sh: 44: cd: can't cd to labDesktop
$ ls
labDesktop examples.desktop
$ sudo sshfs lab@ipaddress:/home/lab/Desktop /home/usr/labDesktop
lab@ipaddress's password:
read: Interrupted system call
$ fusermount -u /home/usr/labDesktop
fusermount: entry for /home/usr/labDesktop not found in /etc/mtab
$ ls
labDesktop examples.desktop
$ cd labDesktop
-sh: 49: cd: can't cd to labDesktop
$ rm -r labDesktop
rm: cannot remove 'labDesktop': Permission denied
$ sudo rm -r labDesktop
rm: cannot remove 'labDesktop': Device or resource busy
$ mount | grep /home/usr/labDesktop
lab@ipaddress:/home/lab/Desktop on /home/usr/labDesktop type fuse.sshfs (rw,nosuid,nodev,relatime,user_id=0,group_id=0)
$ fusermount -u /home/usr/labDesktop
fusermount: entry for /home/usr/labDesktop not found in /etc/mtab
$ fusermount -uz /home/usr/labDesktop
fusermount: entry for /home/usr/labDesktop not found in /etc/mtab
$ sudo umount /home/usr/labDesktop
$ mount | grep /home/usr/labDesktop
$ rm -r /home/usr/labDesktop
$ ls
examples.desktop
As you can see, "sudo rm -r" threw an error message, "rm: cannot remove". So I don't believe this actually deleted the data. Moreover, I tried to unmount using "fusermount -u" before running "sudo rm -r". If "fusermount -u" failed with an error message, shouldn’t "sudo rm -r" have also failed with an error message?
1. Could this sequence of commands have caused the files on Server A to be deleted? Or is it likely something else caused the data loss?
2. How to recover them?
Andy Junghyun Kim
(81 rep)
Dec 28, 2024, 12:58 PM
• Last activity: Dec 31, 2024, 06:06 AM
-1
votes
1
answers
2071
views
SSHFS: Permission denied when opening directory from application even with "allow_other"
I'm trying to use sshfs to open a remote directory in the Spotify snap application on Linux Mint. sshfs -o allow_other user@example.com:/remote/dir /local/dir I've mounted my directory using the "allow_other" fuse option, and the directory opens without having to use sudo in terminal and file explor...
I'm trying to use sshfs to open a remote directory in the Spotify snap application on Linux Mint.
sshfs -o allow_other user@example.com:/remote/dir /local/dir
I've mounted my directory using the "allow_other" fuse option, and the directory opens without having to use sudo in terminal and file explorer. However, when I try adding it as a directory in Spotify for local files, the file explorer gives me this message:
Any advice on fixing this? I've tried modifying the permissions of the folder and "default_permissions" option, no luck yet.

Jonathan Ting
(1 rep)
Jul 6, 2020, 06:20 PM
• Last activity: Dec 3, 2024, 06:05 AM
0
votes
0
answers
55
views
sshfs receives `mount[5889]: read: Connection reset by peer` when ran from systemd but works manually
I can't figure how to enable more verbose logging to a systemd .mount file, but here we go my file is mnt-kreijstal.mount and has: ``` # file is `/etc/systemd/system/mnt-kreijstal.mount` [Unit] Description=Mount kreijstal via SSHFS script [Install] WantedBy=multi-user.target [Mount] What=kreijstal@k...
I can't figure how to enable more verbose logging to a systemd .mount file, but here we go my file is mnt-kreijstal.mount and has:
# file is /etc/systemd/system/mnt-kreijstal.mount
[Unit]
Description=Mount kreijstal via SSHFS script
[Install]
WantedBy=multi-user.target
[Mount]
What=kreijstal@kreijstalnuc:/
Where=/mnt/kreijstal
Type=fuse.sshfs
Options=_netdev,allow_other,IdentityFile=/home/pi/.ssh/id_rsa,reconnect,x-systemd.automount,uid=1000,gid=1000,user
when I do sudo systemctl daemon-reload &&sudo systemctl start mnt-kreijstal.mount
and check the logs
Nov 28 23:05:49 juanraspberry mount: read: Connection reset by peer
it fails somewhere unfortunately I can't figure out how to get a more verbose error. sshfs command works perfectly, however.
Logs:
Nov 28 23:15:36 juanraspberry systemd: Mounting mnt-kreijstal.mount - Mount kreijstal via SSHFS script...
░░ Subject: A start job for unit mnt-kreijstal.mount has begun execution
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░
░░ A start job for unit mnt-kreijstal.mount has begun execution.
░░
░░ The job identifier is 96301.
Nov 28 23:15:37 juanraspberry (udev-worker): regulatory.0: Process '/lib/crda/crda' failed with exit code 254.
Nov 28 23:15:38 juanraspberry mount: read: Connection reset by peer
Nov 28 23:15:38 juanraspberry systemd: mnt-kreijstal.mount: Mount process exited, code=exited, status=1/FAILURE
░░ Subject: Unit process exited
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░
░░ An n/a= process belonging to unit mnt-kreijstal.mount has exited.
░░
░░ The process' exit code is 'exited' and its exit status is 1.
Nov 28 23:15:38 juanraspberry systemd: mnt-kreijstal.mount: Failed with result 'exit-code'.
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░
░░ The unit mnt-kreijstal.mount has entered the 'failed' state with result 'exit-code'.
Nov 28 23:15:38 juanraspberry systemd: Failed to mount mnt-kreijstal.mount - Mount kreijstal via SSHFS script.
░░ Subject: A start job for unit mnt-kreijstal.mount has failed
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░
░░ A start job for unit mnt-kreijstal.mount has finished with a failure.
░░
░░ The job identifier is 96301 and the job result is failed.
Nov 28 23:15:38 juanraspberry systemd: mnt-kreijstal.mount: Consumed 2.230s CPU time.
░░ Subject: Resources consumed by unit runtime
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░
░░ The unit mnt-kreijstal.mount completed and consumed the indicated resources.
**Edit**: I manage to solve my problem by logging in as root and sshing into my server the problem was that my root didn't trust that server yet.
Question about enabling more verbose errors remains.
Rainb
(123 rep)
Nov 28, 2024, 11:13 PM
• Last activity: Nov 29, 2024, 07:10 AM
1
votes
1
answers
71
views
No ability to delete files on sftp mounted by sshfs
I mounted sftp dir via sshfs like: cat | sshfs -o password_stdin,allow_other,default_permissions,uid=0,gid=0 $USER@$HOSTNAME: $MOUNT_DIR -oauto_cache,reconnect And the problem is that I can't delete files on $MOUNT_DIR, despite they have full permission and root as owner, e.g.: -rwxrwxrwx 1 root roo...
I mounted sftp dir via sshfs like:
cat | sshfs -o password_stdin,allow_other,default_permissions,uid=0,gid=0 $USER@$HOSTNAME: $MOUNT_DIR -oauto_cache,reconnect
And the problem is that I can't delete files on $MOUNT_DIR, despite they have full permission and root as owner, e.g.:
-rwxrwxrwx 1 root root 10505331 Aug 22 14:50 some_file.zip
Wondering if it's at all not available when mounting sftp or it's related with the flags used on sshfs.
fueggit
(111 rep)
Sep 11, 2024, 09:47 PM
• Last activity: Sep 12, 2024, 05:31 AM
7
votes
4
answers
13492
views
How to mount automatically sshfs when RSA authentication is not an option?
I would like to mount a file system on a remote machine automatically at each Linux startup. However I always need to use password authentication because I cannot `use ssh-copy-id`. How do I make this to be automatic without manual interaction?
I would like to mount a file system on a remote machine automatically at each Linux startup. However I always need to use password authentication because I cannot
use ssh-copy-id
. How do I make this to be automatic without manual interaction?
ps-aux
(321 rep)
Mar 18, 2015, 02:34 PM
• Last activity: Aug 9, 2024, 03:20 AM
0
votes
0
answers
45
views
Why does rsync not copy the other execute bit when copying to an sshfs mount?
I have a mounted sshfs drive at `/mnt/backup_datascrape` with permission `rwxrwxr-x`. I am trying to copy a directory `foo` with permission `rwxrwxr-x` to that mount using rsync while preserving the permissions. But when I do this, the permission for the copied directory on the sshfs mount is `rwx--...
I have a mounted sshfs drive at
/mnt/backup_datascrape
with permission rwxrwxr-x
. I am trying to copy a directory foo
with permission rwxrwxr-x
to that mount using rsync while preserving the permissions. But when I do this, the permission for the copied directory on the sshfs mount is rwx------
. If I change the permission for directory foo
to rwxrwxr--
, rsync correctly preserves the permissions. So in this situation it appears rsync removes all non user permissions if there is a global execute permission set. Does anyone know why this is? This is the command I use to rsync.
rsync -avhz --delete --exclude 'env' /home/datascrape/foo /mnt/backup_datascrape/
geckels1
(173 rep)
Jul 20, 2024, 04:45 PM
1
votes
1
answers
764
views
How to mount sftp server with sshfs
It is simple enough to connect sftp server with lftp command without any key or password : lftp 192.168.31.130:3721 lftp 192.168.31.130:~> ls drwxr-xr-x 1 nobody nobody 3488 Dec 22 20:17 Android drwxr-xr-x 1 nobody nobody 3488 Jul 29 00:43 MIUI Now I want to mount the sftp server with sshfs: sudo ss...
It is simple enough to connect sftp server with lftp command without any key or password :
lftp 192.168.31.130:3721
lftp 192.168.31.130:~> ls
drwxr-xr-x 1 nobody nobody 3488 Dec 22 20:17 Android
drwxr-xr-x 1 nobody nobody 3488 Jul 29 00:43 MIUI
Now I want to mount the sftp server with sshfs:
sudo sshfs 192.168.31.130:3721 /tmp/localdir
read: Connection reset by peer
sudo sshfs 192.168.31.130:3721 /tmp/localdir -o allow_other
read: Connection reset by peer
How can I mount sftp server with sshfs ?
More info on 192.168.31.130:3721.
I installed ES File Explorer on my android phone,and activate function "view on pc",3721 is port ,the protocol is FTP,start the FTP server using ES File Explorer on my android phone.

showkey
(499 rep)
Jun 6, 2024, 04:40 AM
• Last activity: Jun 6, 2024, 07:19 AM
115
votes
5
answers
130939
views
How to specify key in SSHFS?
I've got a question that I've not been able to find an answer for. I have two computers, both of which run Ubuntu Linux 12.04. I have set up my first computer ("home") to be able to SSH into my second computer ("remote") using public/private RSA key authentication. This is not the first SSH connecti...
I've got a question that I've not been able to find an answer for. I have two computers, both of which run Ubuntu Linux 12.04. I have set up my first computer ("home") to be able to SSH into my second computer ("remote") using public/private RSA key authentication.
This is not the first SSH connection that have set up using key authentication on my home computer, so my home computer has several id_rsa private keyfiles (each of which is for a different computer to SSH into). Thus, I am able to successfully SSH only when I specify a keyfile (in
ssh
, the -i
option), using ssh username@ipaddress -i path/to/keyfile/id_rsa.2
.
That works great. However, I would also like to use sshfs
, which mounts the remote filesystem. While ssh
seems to play nice with multiple keys, I can't find a way to get sshfs
to use the correct private key ("id_rsa.2").
Is there a way to get sshfs
to do this?
J L
(1283 rep)
Jan 17, 2013, 12:41 AM
• Last activity: May 21, 2024, 04:47 PM
81
votes
8
answers
68986
views
What is a better way to deal with server disconnects of sshfs mounts?
I have several directories mounted through *sshfs*. I sometimes get disconnects from the server (not configurable by me). I usually mount the directories like this sshfs user@server.example.com:/home/user /mnt/example When a server disconnects, the sshfs subsystem doesn't *umount / free* the directo...
I have several directories mounted through *sshfs*. I sometimes get disconnects from the server (not configurable by me). I usually mount the directories like this
sshfs user@server.example.com:/home/user /mnt/example
When a server disconnects, the sshfs subsystem doesn't *umount / free* the directory but instead locks it inaccessible. The mount is still visible when typing
mount
. When I type
ls /mnt/example
the process gets locked (also Ctrl+c doesn't help). I therefore do
sudo umount -l /mnt/example
# find pid of corresponding process:
ps aux | grep example.com
kill -9
Is there a better way to deal with this? Obviously *sshfs* should do the *umount* and clean up... Ideally it would reconnect automatically.
Sebastian
(8909 rep)
Jun 1, 2011, 10:00 AM
• Last activity: Apr 14, 2024, 01:09 PM
25
votes
3
answers
45522
views
Do not halt the boot if an fstab mounting fails
I have this line in my fstab: sshfs#ecarroll@o99:/opt/dealermade/ftp/inc /opt/dealermade/ftp/inc fuse defaults,idmap=user,users 0 0 For whatever reason it didn't work -- that's fine. How do I make it not stop the boot sequence. It prompted me to to hit S to skip or M to manually repair. If it isn't...
I have this line in my fstab:
sshfs#ecarroll@o99:/opt/dealermade/ftp/inc /opt/dealermade/ftp/inc fuse defaults,idmap=user,users 0 0
For whatever reason it didn't work -- that's fine. How do I make it not stop the boot sequence. It prompted me to to hit S to skip or M to manually repair. If it isn't the boot volume, I just want my volumes to fail mounting with nothing more than an entry in logs.
Evan Carroll
(34663 rep)
Oct 30, 2012, 10:46 PM
• Last activity: Apr 8, 2024, 12:11 PM
Showing page 1 of 20 total questions