juicedata / juicefs

JuiceFS is a distributed POSIX file system built on top of Redis and S3.
https://juicefs.com
Apache License 2.0
10.47k stars 917 forks source link

load RSA key from file : no such file or directory #5011

Closed dominiquefournier closed 1 month ago

dominiquefournier commented 1 month ago

What happened: When trying to reload a private key with command : JFS_RSA_PASSPHRASE=pass MINIO_REGION=europe juicefs load --encrypt-rsa-key myjfs-priv-key.pem  --encrypt-algo aes256gcm-rsa sqlite3:///root/myjfs.db /tmp/dump-2024-07-19-080859.json.gz an error occured : juicefs[35356] <FATAL>: load RSA key from encrypt-rsa-key : open myjfs-priv-key.pem : no such file or directory [format.go:355]

Of course the file exists, and is readable and contains a valid private key. I try to provide the path in relative, in absolute or set it to "encrypt-rsa-key" wihtout luck. I also try with sudo or directely with root account.

What you expected to happen: I would like to recreate the database like described in https://juicefs.com/docs/community/metadata_dump_load#encrypted-file-system

How to reproduce it (as minimally and precisely as possible): Just run the previous command.

Anything else we need to know? If I use the key and the original database, juicefs works very well.

If I run the command with strace, I have : openat(AT_FDCWD, "myjfs-priv-key.pem\302\240", O_RDONLY|O_CLOEXEC) = -1 ENOENT (Aucun fichier ou dossier de ce type) Why is there these \302\240 at the end of file ?

Environment:

dominiquefournier commented 1 month ago

Sorry it was due to copy/paste with not visible chars.