Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error mounting via fstab under Debian 12.5 #832

Open
noe-noenoe opened this issue Mar 10, 2024 · 8 comments
Open

Error mounting via fstab under Debian 12.5 #832

noe-noenoe opened this issue Mar 10, 2024 · 8 comments

Comments

@noe-noenoe
Copy link

Dear all,

I have an issue mounting my gocryptfs volume via fstab under Debian 12.5 and I trust that someone can help me:

When I manually mount the gocryptfs volume, everything works fine:

gocryptfs --passfile=/path/to/password /mnt/cipher/ /mnt/plain/

But the following entry in /etc/fstab does not work:

/mnt/cipher /mnt/plain fuse./usr/local/bin/gocryptfs rw,nofail,auto,x-systemd.idle-timeout=10,x-systemd.automount,allow_other,passfile=/path/to/password 0 0

Error message when attempting to mount manually is:

mount: /mnt/plain: wrong fs type, bad option, bad superblock on /mnt/cipher, missing codepage or helper program, or other error. dmesg(1) may have more information after failed mount system call.

(gocryptfs is in /usr/local/bin/gocryptfs.)

dmesg shows:

fuse: Unknown parameter 'passfile'

(If I add quiet to the fstab line, the same with 'quiet'.)

Newly initialising the volume did not help at all.

OS is Debian 12.5. However, when using Ubuntu 22.04.4 LTS, everything works fine. According to https://manpages.debian.org/bookworm/gocryptfs/gocryptfs.1.en.html, it should work under Debian, too.

Any ideas? Thanks in advance!

@rfjakob
Copy link
Owner

rfjakob commented Mar 13, 2024

Sooo...

Ubuntu 22.04 has gocryptfs v1.8, https://packages.ubuntu.com/jammy/gocryptfs ;

Debian 12 has gocryptfs 2.3, https://packages.debian.org/bookworm/gocryptfs and probably also a much newer kernel. Can you post your uname -a?

@rfjakob
Copy link
Owner

rfjakob commented Mar 13, 2024

By the way, I did not know about x-systemd.idle-timeout. Very nice!

@rfjakob
Copy link
Owner

rfjakob commented Mar 13, 2024

This works fine on Fedora:

/mnt/cipher /mnt/plain  fuse./home/jakob/go/bin/gocryptfs rw,nofail,auto,x-systemd.idle-timeout=10,x-systemd.automount,allow_other,passfile=/mnt/cipher.passfile 0 0
$ sudo mount -av
/                        : ignored
/boot                    : already mounted
/boot/efi                : already mounted
swap                     : ignored
passfile: reading from file "/mnt/cipher.passfile"
Decrypting master key
The option "-allow_other" is set. Make sure the file permissions protect your data from unwanted access.
Filesystem mounted and ready.
mount: (hint) your fstab has been modified, but systemd still uses
       the old version; use 'systemctl daemon-reload' to reload.
/mnt/plain               : successfully mounted

@noe-noenoe
Copy link
Author

Thanks for checking this!

Debian 12 has gocryptfs 2.3, https://packages.debian.org/bookworm/gocryptfs and probably also a much newer kernel. Can you post your uname -a?

Linux [redacted] 6.1.0-18-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.76-1 (2024-02-01) x86_64 GNU/Linux

Unfortunately, the fstab entry that works on Fedora does not work for me on Debian. I have no clue...

@caferen
Copy link

caferen commented Mar 24, 2024

I'm having the same problem on Arch. Either with the same entry on /etc/fstab or with a mount unit.

$ uname -a
Linux archlinux 6.8.1-zen1-1-zen #1 ZEN SMP PREEMPT_DYNAMIC Sat, 16 Mar 2024 17:15:23 +0000 x86_64 GNU/Linux
$ gocryptfs --version
gocryptfs v2.4.0; go-fuse [vendored]; 2023-06-15 go1.20.5 linux/amd64

@rfjakob
Copy link
Owner

rfjakob commented Mar 25, 2024 via email

@caferen
Copy link

caferen commented Mar 25, 2024

Yes.

$ which mount.fuse
/usr/bin/mount.fuse

$ pacman -F mount.fuse
extra/fuse2 2.9.9-4 [installed]
    usr/bin/mount.fuse

@caferen
Copy link

caferen commented Mar 26, 2024

I realized fuse2 was an orphaned package and the Arch package depends on fuse3. Forcefully uninstalling fuse3 solved the problem. Is this a packaging issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants