LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Write-protected file with Extents attribute refuses to die (ubuntu) (https://www.linuxquestions.org/questions/linux-newbie-8/write-protected-file-with-extents-attribute-refuses-to-die-ubuntu-4175736088/)

FingerBobber 04-16-2024 09:06 AM

Write-protected file with Extents attribute refuses to die (ubuntu)
 
gm ...newbie here struggling with something that should be easy.

I'm installing bitcoin core on linux (ubuntu), and have a problem overwriting a write-protected file (bitcoind.service). I've Googled and asked ChatGPT and searched the forum archive/FAQs. The solutions I've tried include the following ...but these haven't worked:

This does not work: sudo chmod +w filename
This does not work: sudo rm filename
This does not work: sudo rm -f filename
This does not work: rm -f filename

When I check via lsattr I get (something like): ---------------e------- bitcoind.service (I believe the 'e' stands for Extents).

Been at this for hours. Basically, my "bitcoind.service" file is faulty and when I recreated it I got "bitcoind.service.1". So I'm trying to replace "bitcoind.service" with "bitcoind.service.1"

Hope this makes sense. I'd appreciate any pointers - thanks in advance

jayjwa 04-16-2024 10:54 AM

Likey something is re-creating the file on the fly. https://unix.stackexchange.com/quest...ute-from-linux

yancek 04-16-2024 02:13 PM

Posting "This does not work" is not going to get you much help. If you run the commands you mention, do you get any warning/error messages. If so, what are they and if not, what does happen?

mw.decavia 04-16-2024 03:10 PM

What happens if you try to "sudo mv filename someotherdirectory" and then do a full shutdown/restart?

Quote:

Originally Posted by FingerBobber (Post 6496314)
gm ...newbie here struggling with something that should be easy.

I'm installing bitcoin core on linux (ubuntu), and have a problem overwriting a write-protected file (bitcoind.service). I've Googled and asked ChatGPT and searched the forum archive/FAQs. The solutions I've tried include the following ...but these haven't worked:

This does not work: sudo chmod +w filename
This does not work: sudo rm filename
This does not work: sudo rm -f filename
This does not work: rm -f filename

When I check via lsattr I get (something like): ---------------e------- bitcoind.service (I believe the 'e' stands for Extents).

Been at this for hours. Basically, my "bitcoind.service" file is faulty and when I recreated it I got "bitcoind.service.1". So I'm trying to replace "bitcoind.service" with "bitcoind.service.1"

Hope this makes sense. I'd appreciate any pointers - thanks in advance


FingerBobber 04-17-2024 01:29 AM

Hi @jayjwa, thanks for your reply. This is an interesting take and could be the issue or part of the issue.

Hi @yancek, thanks. The error messages I get are all about permissions. So for example typically mentioning a read-only file system, or Operation not permitted etc, or when I try to edit: [ Error writing bitcoind.service: Read-only file system]

Hi and thanks @mw.decavia ...I'll try this and fingers crossed it moves the file. I'll come back and reply either way.

Thanks again!

FingerBobber 04-17-2024 02:12 AM

Update: I can't mv bitcoind.service as it's: Read-only file system

This is despite me having permissions: -rw-r--r-- 1 root root 2274

FURTHER UPDATE: After trying a number of other things, I decided it was time to shut the system down and restart.

This was an error. I should have archived-off Bitcoin Core (700GB) before shutting down, as Linux will now not start up. This has likely killed my schedule/roadmap. There is a way of starting Linux in safe mode - I've done this and it still won't load. There may be some other things I can try. I'll be doing this, but realise that it's beginning to look like going back to the beginning ...unless I can somehow reinstall Linux without losing Bitcoin Core. Thanks again

chrism01 04-17-2024 11:32 PM

FYI, those perms you are showing are controlled by the chmod cmd (& ofc chown related).
However(!), filesystems 'perms ie r/w or ro, are the domain of the 'mount' cmd. ..

HTH

yancek 04-18-2024 06:38 AM

Having an error message 'read-only filesystem' on what is not a 'live' system generally means a corrupted filesystem and running fsck with it's various options might help if it is a Linux filesystems. Then you would need to find out what caused the corruption if fsck repairs.


All times are GMT -5. The time now is 03:20 PM.