Write-protected file with Extents attribute refuses to die (ubuntu)
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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
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?
What happens if you try to "sudo mv filename someotherdirectory" and then do a full shutdown/restart?
Quote:
Originally Posted by FingerBobber
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
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.
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
Last edited by FingerBobber; 04-17-2024 at 02:51 AM.
Reason: Further Update
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. ..
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.