gocryptfs: [Debian gocryptfs 2.3-1] Intermittent "Operation not permitted" errors when rsync'ing to a gocryptfs mount
I have a target directory mounted with gocryptfs and I’m using rsync to copy files from an (unencrypted) source directory to it. I’m getting intermittent errors from rsync when it uses mkstemp and mkdir to create temporary files and directories during the sync process. For example:
rsync: [receiver] mkstemp "/backups/ares/home/greg2/foo.incomplete/Music/Music/Media.localized/Music/Compilations/The Raw and the Cooked/.01 She Drives Me Crazy.m4a.EXulcp" failed: Operation not permitted (1)
rsync: [generator] recv_generator: mkdir "/backups/ares/home/greg2/foo.incomplete/Music/Music/Media.localized/Music/Blondie/Autoamerican (Remastered 2001)" failed: Operation not permitted (1)
These issues happen seemingly at random and to different sets of files/directories each time I run the copy (same set of source files, always to an empty directory).
FWIW, I don’t see these issues with cp, nor do I see the issues using rsync writing to an encfs mount.
I’m using:
- Debian bookworm (12.9)
- backports kernel (
6.11.10+bpo-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.11.10-1~bpo12+1 (2024-12-19)) - default gocryptfs package (
gocryptfs 2.3; go-fuse 2.1.0+git20220822.58a7e14; 2023-04-09 go1.19.8 linux/amd64)
This also repros with a local build of the latest gocryptfs source (commit 1464f9d).
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 26 (11 by maintainers)
Commits related to this issue
- syscallcompat: add thread_credentials.go & friends Private copies of per-thread Setreuid/Setegid/Setgroups. https://github.com/rfjakob/gocryptfs/issues/893 https://github.com/rfjakob/gocryptfs/issue... — committed to rfjakob/gocryptfs by rfjakob 2 years ago
- tests/root_test: add TestConcurrentUserOps and TestAsUserSleep Both work with golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a but break with golang.org/x/sys v0.30.0 https://github.com/rfja... — committed to rfjakob/gocryptfs by rfjakob 2 years ago
- syscallcompat: use our own Setgroups/Setregid/Setreuid wrappers x/sys v0.1.0 (https://github.com/golang/sys/commit/d0df966e6959f00dc1c74363e537872647352d51) breaks our usecase. Switch to our own wrap... — committed to rfjakob/gocryptfs by rfjakob 2 years ago
There is only an error message:
kernel: fuse: Unknown parameter 'suid'every time I mount the filesystem.
I didn’t notice it before but it started after I upgraded from Ubuntu 22.04 to Ubuntu 24.04 (same kernel version, I was already using the HWE kernel) which I’m fairly sure is when the problem first appeared. FWIW I have only
nofail,allow_otherandpassfilein my fstab.I suggest using v2.5.1, released just now.