rfjakob / gocryptfs

Encrypted overlay filesystem written in Go
https://nuetzlich.net/gocryptfs/
MIT License
3.51k stars 249 forks source link

chown not working in mounted sub-folder #818

Closed Leon-001 closed 8 months ago

Leon-001 commented 8 months ago

Hi, I can not change the owner of a subfolder in the decrypted folder. I have tried this:

mkdir .encrypted
mkdir decrypted
gocryptfs -init .encrypted
gocryptfs --allow_other .encrypted/ decrypted
cd decrypted
mkdir mysql
chown mysql: mysql

errormessage: "chown: der Eigentümer von 'mysql/' wird geändert: Die Operation ist nicht erlaubt" (in english: "operation not permitted")

I have also tried the chmod with "sudo" but that fails with the same error.

./gocryptfs --version gives: gocryptfs v2.4.0-14-g6fbe61d without_openssl; go-fuse v2.4.0; 2024-01-14 go1.19.8 linux/arm64

uname -a gives: Linux mx2.fairtragen.de 6.1.0-17-arm64 #1 SMP Debian 6.1.69-1 (2023-12-30) aarch64 GNU/Linux

Leon-001 commented 8 months ago

When I enter the 4th command gocryptfs --allow_other .encrypted/ decrypted it responds with this message (as expected): The option "-allow_other" is set. Make sure the file permissions protect your data from unwanted access. Filesystem mounted and ready.

rfjakob commented 8 months ago

Hi, gocryptfs needs to run aus root for chmod to work.

In other words, you need to use "sudo gocryptfs ..."

On Sun, 14 Jan 2024, 14:52 Leon-001, @.***> wrote:

When I enter the 4th command gocryptfs --allow_other .encrypted/ decrypted it responds with this message (as expected): The option "-allow_other" is set. Make sure the file permissions protect your data from unwanted access. Filesystem mounted and ready.

— Reply to this email directly, view it on GitHub https://github.com/rfjakob/gocryptfs/issues/818#issuecomment-1890958787, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACGA75DOZEWI5UZL7NKFIDYOPPJDAVCNFSM6AAAAABB2DVKBSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOJQHE2TQNZYG4 . You are receiving this because you are subscribed to this thread.Message ID: @.***>

Leon-001 commented 8 months ago

Ah ok! Thank you!!