0

I'm trying to recover an accidentally removed directory (/home/garid/.gnupg) with ext4magic. However, It outputs following error:

$ ext4magic /dev/nvme0n1p3  -f /home/garid/.gnupg/  -a $(date -d -5days +%s)
/dev/nvme0n1p3 Error 13 while opening filesystem
ext4magic : EXIT_SUCCESS

I'm not sure what I'm doing wrong. What is Error 13? And How can I make it work?


My distro is Archlinux. My Partition table:

nvme0n1     259:0    0 476.9G  0 disk
├─nvme0n1p1 259:1    0     1G  0 part /efi
├─nvme0n1p2 259:2    0    32G  0 part [SWAP]
└─nvme0n1p3 259:3    0 443.9G  0 part /

As suggested in below, running as root outputs below:

$ sudo ext4magic /dev/nvme0n1p3  -f /home/garid/.gnupg/  -a $(date -d -5days +%s)
[sudo] password for garid:
Filesystem in use: /dev/nvme0n1p3

Using  internal Journal at Inode 8
Activ Time after  : Sun Feb 26 20:15:57 2023
Activ Time before : Fri Mar  3 20:15:58 2023
zsh: segmentation fault  sudo ext4magic /dev/nvme0n1p3 -f /home/garid/.gnupg/ -a $(date -d -5days +%s)

1 Answer 1

0

Error 13 is “permission denied”. You need to run ext4magic as root:

sudo ext4magic /dev/nvme0n1p3  -f /home/garid/.gnupg/  -a $(date -d -5days +%s)
1
  • I just ran it with root, got error, and updated question above. Commented Mar 3, 2023 at 11:18

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.