Comments (5)
46212 02:07:12.744338 mount("/tmp/mergerfs/branch", ".", "fuse", MS_NOSUID|MS_NODEV, "default_permissions,fd=3,rootmode=40000,user_id=1000,group_id=1000") = -1 EPERM (Operation not permitted) <0.000009>
From the strace. The kernel, not mergerfs, is giving you perm denied. It is clearly something about your system. Are you trying to mount this in a container? On a system without fusermount having setuid bits?
from mergerfs.
Without digging in yet...
FUSE filesystems need auxiliary tooling to be mounted as non-root. If you were mixing installed versions then there could be some incompatibility or not setup correctly.
from mergerfs.
It works on my systems fine.
from mergerfs.
I've found the reason (not the cause), but still don't understand it.
Anyway, you are right: it works (after I uninstalled the Distribution's version).
If you are interested in the root cause why it fails on my system, I am happy to dig deeper. Just let me know.
Some more details (in case you are interested):
Although (initially?) the expected, self built mergerfs
binary get executed, it somehow "collides" with the version installed by the distribution (Debian testing). $PATH
is set correctly afaik. But there is also a mergerfs-fusermount
and mount.mergerfs
binary installed by the package manager:
doak@flatbox:~$ which mergerfs
/home/doak/daten/software/linux/mergerfs/build/mergerfs
doak@flatbox:~$ which mergerfs-fusermount
/usr/bin/mergerfs-fusermount
It works when mergerfs
is not installed by Debian:
doak@flatbox:/tmp$ ~/daten/software/linux/mergerfs/build/mergerfs branch merged
warning: mergerfs is not running as root and may not work correctly
fusermount: mount failed: Operation not permitted
doak@flatbox:/tmp$ sudo apt-get remove -y mergerfs >/dev/null
doak@flatbox:/tmp$ ~/daten/software/linux/mergerfs/build/mergerfs branch merged
warning: mergerfs is not running as root and may not work correctly
doak@flatbox:/tmp$ mount | grep merged
/tmp/branch on /tmp/merged type fuse.mergerfs (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000,default_permissions)
46212 02:07:12.744338 mount("/tmp/mergerfs/branch", ".", "fuse", MS_NOSUID|MS_NODEV, "default_permissions,fd=3,rootmode=40000,user_id=1000,group_id=1000") = -1 EPERM (Operation not permitted) <0.000009>
strace
revleals that the mount()
system call even fails in case it succeeds (on my machine™). It also differs in the third argument:
doak@flatbox:/tmp$ mount | grep merged
doak@flatbox:/tmp$ strace ~/daten/software/linux/mergerfs/build/mergerfs branch merged 2>&1 | grep mount
mount("/tmp/branch", "/tmp/merged", "fuse.mergerfs", MS_NOSUID|MS_NODEV, "default_permissions,fd=5,rootmod"...) = -1 EPERM (Operation not permitted)
doak@flatbox:/tmp$ mount | grep merged
/tmp/branch on /tmp/merged type fuse.mergerfs (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000,default_permissions)
Honestly, I don't understand why it succeeds eventually. Here is the full strace.log
for the successful mount (i.e. mount
shows the merged directory):
doak@flatbox:/tmp$ mount | grep merged
doak@flatbox:/tmp$ strace ~/daten/software/linux/mergerfs/build/mergerfs branch merged &>strace.log
doak@flatbox:/tmp$ mount | grep merged
/tmp/branch on /tmp/merged type fuse.mergerfs (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000,default_permissions)
from mergerfs.
Just had a look into mergerfs
' readme:
If mergerfs doesn't work as a type it could be due to how the mount.mergerfs tool was installed. Must be in /sbin/ with proper permissions.
Although it makes no sense, since there is no difference regarding the setuid bit in case merferfs
have or have not been installed by the distribution, I just want to mention it: the setuid bit is not set for these two binaries:
doak@flatbox:~$ ls -l /sbin/mount.{fuse3,mergerfs}
-rwxr-xr-x 1 root root 18664 Jan 12 16:46 /sbin/mount.fuse3
-rwxr-xr-x 1 root root 14568 Sep 2 2022 /sbin/mount.mergerfs
from mergerfs.
Related Issues (20)
- Merge of directory level
- MergerFS mount randomly disappears, only displays ??? when listed HOT 66
- Add support for "cp --reflink" HOT 4
- Failing to mount from fstab on boot, but can mount from command line HOT 5
- ubuntu 18.04 fresh install, with error HOT 1
- Permissions issue qBittorrent file creation when preload library is used in docker instance HOT 9
- unable to create new files (touch: cannot touch 'test': Not a directory) HOT 6
- Hangs when overlayfs is mounted on top of mergerfs's branch HOT 7
- Mergerfs volume with a single disk pool HOT 2
- Is it possible to use 'mount -a' to rebuild a mergerfs pool that is defined in fstab? HOT 6
- Tiered caching clarification HOT 7
- mergerfs - fuse `allow_other` and security HOT 3
- Benchmarking tool HOT 3
- fluctuating write performance HOT 13
- "&" sign in dirs path HOT 3
- The Debian12 mergerfs ls&df command displays an exception. HOT 7
- FUSE passthrough HOT 3
- Android smb clients issue on remove files. HOT 4
- How can I avoid moving files across file systems (mechanical hard disks) caused by Path Preservation? HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mergerfs.