Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: djoser on May 15, 2020, 02:01:55 PM



Title: Ubuntu 20.04 Bitcoin-Core Snap: Permission for external disk
Post by: djoser on May 15, 2020, 02:01:55 PM
Hello.

I recently installed Ubuntu 20.04 and installed Bitcoin-Core 0.19.1 from the Snap-Store.
The Blockchain is stored on an external drive. When i open the application i'm asked for the directory of the blockchain.
Problem is that the application seems to lack permission to write to the external disk.
How can i give permission to the application?

Thanks and regards
djoser


Title: Re: Ubuntu 20.04 Bitcoin-Core Snap: Permission for external disk
Post by: LoyceV on May 15, 2020, 02:43:09 PM
Problem is that the application seems to lack permission to write to the external disk.
Is it an application problem or a user/permissions problem? To test: can you write to the external disk using another program?

Quote
How can i give permission to the application?
My guess is you'll just need to change folder permissions, see for instance Change folder permissions and ownership (https://askubuntu.com/questions/6723/change-folder-permissions-and-ownership).


Title: Re: Ubuntu 20.04 Bitcoin-Core Snap: Permission for external disk
Post by: djoser on May 15, 2020, 02:50:43 PM
Is it an application problem or a user/permissions problem? To test: can you write to the external disk using another program?

It seems to be an application problem, because everything else (like writing/copying files to the drive) works perfectly.

My guess is you'll just need to change folder permissions, see for instance Change folder permissions and ownership (https://askubuntu.com/questions/6723/change-folder-permissions-and-ownership).

I think i need to give permissions to write to external usb devices directly to the application. I know that this is possible, i just don't know what the specific command console command is.


Title: Re: Ubuntu 20.04 Bitcoin-Core Snap: Permission for external disk
Post by: jackg on May 15, 2020, 03:01:05 PM
I don't know how helpful this'll be but permission looks like it could depend on the drive partition format: https://askubuntu.com/questions/93109/cant-write-to-ntfs-formatted-drives

I'm guessing the drive is fully kounted/findable in /media/drivename to you and you see able to write to it?


Title: Re: Ubuntu 20.04 Bitcoin-Core Snap: Permission for external disk
Post by: LoyceV on May 15, 2020, 03:04:23 PM
I think i need to give permissions to write to external usb devices directly to the application. I know that this is possible, i just don't know what the specific command console command is.
If it runs as the same user, it has inherited the same permissions already.

Can you check (or post) this file:
Code:
~/.bitcoin/debug.log


Title: Re: Ubuntu 20.04 Bitcoin-Core Snap: Permission for external disk
Post by: djoser on May 15, 2020, 03:10:17 PM
Sorry, no such file, because "~/.bitcoin" does not exist. It's a snap.
BTW: I hate those snaps anyway  >:(

The application shows the error "It could not be written to directory 'media/....' Check permissions."


Title: Re: Ubuntu 20.04 Bitcoin-Core Snap: Permission for external disk
Post by: LoyceV on May 15, 2020, 03:12:32 PM
BTW: I hate those snaps anyway  >:(
Then do a normal installation :)


Title: Re: Ubuntu 20.04 Bitcoin-Core Snap: Permission for external disk
Post by: djoser on May 15, 2020, 03:14:08 PM
Already thought about it. But i wanted to give it a shot.
There must be a solution for this...


Title: Re: Ubuntu 20.04 Bitcoin-Core Snap: Permission for external disk
Post by: LoyceV on May 15, 2020, 03:42:54 PM
There must be a solution for this...
I've never used "snap" (and until today didn't know it exists), so as a guess, read How to get access to USB-storage from the application installed as Snap? (https://askubuntu.com/questions/1034030/how-to-get-access-to-usb-storage-from-the-application-installed-as-snap)


Title: Re: Ubuntu 20.04 Bitcoin-Core Snap: Permission for external disk
Post by: djoser on May 15, 2020, 05:59:27 PM
I've never used "snap" (and until today didn't know it exists), so as a guess, read How to get access to USB-storage from the application installed as Snap? (https://askubuntu.com/questions/1034030/how-to-get-access-to-usb-storage-from-the-application-installed-as-snap)

Thanks for all your suggestions.
Unfortunately snap "bitcoin-core" has no plug named "removable-media".

I think unless the blockchain is mounted in root directory the snap is useless  :(


Title: Re: Ubuntu 20.04 Bitcoin-Core Snap: Permission for external disk
Post by: Abdussamad on May 16, 2020, 07:26:54 AM
why are you using a third party snap? it's unsafe. you should download bitcoin core from bitcoincore.org. untar that download and run bitcoin-qt from the bin directory. it's very easy.


Title: Re: Ubuntu 20.04 Bitcoin-Core Snap: Permission for external disk
Post by: djoser on May 16, 2020, 11:16:00 AM
This is the official core-client from the official ubuntu repository.
So there should be no security issue!?

Since my problem from the first post seem to be unsolveable, i'm forced to use the tgz-packed client anyway.

BTW: The snap-application is also shown as an option on bitcoin.org!!