Pages:
Author

Topic: can't change data directory bitcoin-core 0.19.0.1 ubuntu 19.10 (Read 559 times)

newbie
Activity: 1
Merit: 0
Hi, I know this is an old thread but I happened upon it while trying to solve the exact same problem.
I am posting this to help any other users who may be put off of bitcoin-core by this issue when it turns
out that it is a problem with the way snap applications are sand-boxed by default within their own install
directory and lose permission to write to locations outside it. To get around this problem, go to

Menu -> System -> Software

Then click the "Installed" tab on the top of the window and scroll down until you find the listing
for bitcoin-core.(This assumes that you have already installed the snap version of the bitcoin-core app)
Click on it and the window will switch to the bitcoin-core info page where you will see a launch button.

Click on the Permissions button 2 buttons to the left of the Launch button.

A permissions window will pop up. On that window click the switch to the right of

"Read/write files on removable storage devices"

until it is enabled(Ticked).

Click close.


If you have already specified a folder outside of the default one on a previous launch of the bitcoin-core app
and received an error which prevents the app from launching then you might have to uninstall the app. Remove
the ~/snap/bitcoin-core folder, reinstall the app then repeat the above steps to make sure the proper permissions
are set before launching the app.

This is what I had to do to get bitcoin-core to be able to use a drive/partition/directory other than the default
directory as the data directory.

Hope this helps.


Thanks! You just helped a friend here.
Was dealing with this issue and desperately clicked on page 2 and found your solution Smiley
newbie
Activity: 6
Merit: 7
Hey, so I ran into this same issue.

I was trying to use Ubuntu Server 20.04 LTS and Bitcoin Core 0.20.0 and I had installed Bitcoin Core through the Snap Store.

I managed to get it working and it is downloading the blockchain now so I figured I'd share the solution.

Turns out the problem isn't with bitcoin-qt at all, the issue is with how snap does permissions and handles connections.

Heres a link to the interface management documentation:
https://snapcraft.io/docs/interface-management

Basically, the issue is that by default bitcoin-core doesn't allow read/write access to removable media.

You can view the interface connections by typing
Code:
snap connections bitcoin-core

This pulls up all the relevant information and you'll notice that the Slot for removable-media is left blank.

The documentation for the removable-media interface says that when it is enabled, you have read/write access to storage in /media.
https://snapcraft.io/docs/removable-media-interface

To connect the removable-media Plug to the empty Slot simply type
Code:
sudo snap connect bitcoin-core:removable-media :removable-media

Then, just check using the snap connections command again to see if it worked.

Once you have the manual connection made, you can then change the data directory in the Bitcoin Core GUI. Its important to note though that you first need to send a copy of  the bitcoin-core folder from your snap folder to your external hardrive. Do NOT just move the folder, you have to make a copy, it crashed my device when I tried just moving it.

So your custom data directory path should look something like
Code:
/media/(external drive)/bitcoin-core/common/.bitcoin

It should still say "a new directory will be created" underneath.
Then just hit OK and it should work and begin downloading.

Best of Luck!
newbie
Activity: 2
Merit: 1
I am on Peppermint 10 Respin based on ubuntu 18.04 and bitcoin-core 0.20.0
newbie
Activity: 2
Merit: 1
Hi, I know this is an old thread but I happened upon it while trying to solve the exact same problem.
I am posting this to help any other users who may be put off of bitcoin-core by this issue when it turns
out that it is a problem with the way snap applications are sand-boxed by default within their own install
directory and lose permission to write to locations outside it. To get around this problem, go to

Menu -> System -> Software

Then click the "Installed" tab on the top of the window and scroll down until you find the listing
for bitcoin-core.(This assumes that you have already installed the snap version of the bitcoin-core app)
Click on it and the window will switch to the bitcoin-core info page where you will see a launch button.

Click on the Permissions button 2 buttons to the left of the Launch button.

A permissions window will pop up. On that window click the switch to the right of

"Read/write files on removable storage devices"

until it is enabled(Ticked).

Click close.


If you have already specified a folder outside of the default one on a previous launch of the bitcoin-core app
and received an error which prevents the app from launching then you might have to uninstall the app. Remove
the ~/snap/bitcoin-core folder, reinstall the app then repeat the above steps to make sure the proper permissions
are set before launching the app.

This is what I had to do to get bitcoin-core to be able to use a drive/partition/directory other than the default
directory as the data directory.

Hope this helps.
jr. member
Activity: 38
Merit: 6
the problem is  NOT SOLVED  I just abandon it!  I think is a bitcoinQT issue

At this point, i only could suggest :
1. Downgrade to Core 0.18.1
2. Compile Bitcoin Core from source code (perhaps the bug was found and fixed, even though i can't find anything on GitHub issue page)
3. Use another Bitcoin full node client such as Bitcoin Knots


thank you for your suggestion but now I run samourai Dojo, is working pretty  nice so far
jr. member
Activity: 38
Merit: 6
guys I install samourai dojo and work fine!

at this point I try it in 3 computers and each time  I get that same stuff,  I can't choose a different directory for the blockchain!
is a bitcoinQT wallet problem that's for sure!!



Glad to see the problem resolved (in unexpected way), but i doubt Bitcoin Core is the problem since i don't see other user make report and i can change directory using Bitcoin Core 0.19.0.1

P.S. i see samourai dojo enforce Tor connection, hopefully you can be patient with slower connection


the problem is  NOT SOLVED  I just abandon it!  I think is a bitcoinQT issue

dojo is via TOR but I get the full block in sync  in one day and half , download/upload speed was ~ 8-15 MB/s , I was thinking that will be slow but was not (and I download the bitcoin blockchain twice cause I fuck it up when I install ubuntu , first time I choose to have it encrypted and that's not a good idea cause I was force to write the password every time I restart )
jr. member
Activity: 38
Merit: 6
guys I install samourai dojo and work fine!

at this point I try it in 3 computers and each time  I get that same stuff,  I can't choose a different directory for the blockchain!
is a bitcoinQT wallet problem that's for sure!!

HCP
legendary
Activity: 2086
Merit: 4316
As ETFbitcoin stated... have you actually checked what is in your debug.log after you try to set the directory and Bitcoin Core shuts down with the error? Huh
jr. member
Activity: 38
Merit: 6
I can't believe no one ask OP to share his/her debug.log file, it might contain hint to solve the problem.


Sorry for off-topic, but i see your HDD have tons of bad sector, have you checked the health of your HDD? See https://superuser.com/q/171195

 the bad sectors are not the problem  that's 100% sure
I use spinrite , HDD Regenerator , the hdd is  fine now
jr. member
Activity: 38
Merit: 6
I don't have a clear answer to your problem, but I'll highlight several things I've noticed:
all the directories have 777 permision (directories: asus, multimedia and bitcoin) to "media" directory I can't change permissions.
This is bad security, you should use something like 750 or 700.

Quote
is not an externa drive is just one 500gb HDD that I partitioned 100gb-for ubuntu OS- and 400gb-for bitcoin blockchain- (ntfs , ext4  I try with both but same error) see the picture https://i.ibb.co/NpM2kyg/not-working.jpg
Don't use NTFS, use a filesystem designed for Linux. Ext4 is fine.

Quote
the only way to work is if when I install Ubuntu I  give the 400gb partition mount point "/home" but  this is something else  is not that I want cause will not show the partition like a device is just a folder.
Everything is just a file or folder on Linux. You could mount it as /home/asus/snap/bitcoin-core/common/.bitcoin if you want.

Quote
you can try it yourself  without installing ubuntu you will see   when you choose to safe the blockchain to a different location (a partition) will not work
Wait: did you install Ubuntu on your PC, or are you running Ubuntu LIVE without installation?


i know about the permisions , I just choose  777 to be sure (is just a test , I just want the block chain to be in a different partition)
I test it on ntfs , ext4 , fat

Quote
Everything is just a file or folder on Linux. You could mount it as /home/asus/snap/bitcoin-core/common/.bitcoin if you want.
this will work only  when I install ubuntu and choose the second partition (400gb) to have the mount point "/home"  but this will not  show the second partition like a  different drive (mounted drive), a drive that I can mount  it and unmount

I install ubuntu 6 times now(choosing diffeent type of instalation, with second partition  having the mount point "/home"  with second partition as ntfs , with windows 10 instaled on another partition and ubuntu in parallel ) and also try it with ubuntu live  same thing, I can't choose to have the blockchain saved on a different partition.

I make a video, you can just see the error  
legendary
Activity: 3290
Merit: 16489
Thick-Skinned Gang Leader and Golden Feather 2021
I don't have a clear answer to your problem, but I'll highlight several things I've noticed:
all the directories have 777 permision (directories: asus, multimedia and bitcoin) to "media" directory I can't change permissions.
This is bad security, you should use something like 750 or 700.

Quote
is not an externa drive is just one 500gb HDD that I partitioned 100gb-for ubuntu OS- and 400gb-for bitcoin blockchain- (ntfs , ext4  I try with both but same error) see the picture https://i.ibb.co/NpM2kyg/not-working.jpg
Don't use NTFS, use a filesystem designed for Linux. Ext4 is fine.

Quote
the only way to work is if when I install Ubuntu I  give the 400gb partition mount point "/home" but  this is something else  is not that I want cause will not show the partition like a device is just a folder.
Everything is just a file or folder on Linux. You could mount it as /home/asus/snap/bitcoin-core/common/.bitcoin if you want.

Quote
you can try it yourself  without installing ubuntu you will see   when you choose to safe the blockchain to a different location (a partition) will not work
Wait: did you install Ubuntu on your PC, or are you running Ubuntu LIVE without installation?
jr. member
Activity: 38
Merit: 6
Maybe it's just called "bitcoin" instead of "bitcoin-qt" on your system (I'm using slightly different version numbers).
no  is not working

different  version of  bitcoin core?

Check the directory for the executable and run it using:
Code:
./NAME -datadir=...

Replace NAME with the name of the executable and ... with the path you want to use (e.g. the one proposed by LoyceV to test).


Regarding your issue.. it definitely seems like a permission issue or a bug.
How did you install core ?
Did you already try to start it via the console and giving it the datadir path via the parameter (i guess you didn't yet?) You might want to try that out.
Also could you give us the output of the directory you are trying to use (using ls -al inside of /media/asus/multimedia) ?
Btw, how is your external drive formatted ? Which format did you use ?

I install the bitcoin-core from inside the Ubuntu Software

all the directories have 777 permision (directories: asus, multimedia and bitcoin) to "media" directory I can't change permissions.

is not an externa drive is just one 500gb HDD that I partitioned 100gb-for ubuntu OS- and 400gb-for bitcoin blockchain- (ntfs , ext4  I try with both but same error) see the picture https://i.ibb.co/NpM2kyg/not-working.jpg

the only way to work is if when I install Ubuntu I  give the 400gb partition mount point "/home" but  this is something else  is not that I want cause will not show the partition like a device is just a folder.

you can try it yourself  without installing ubuntu you will see   when you choose to safe the blockchain to a different location (a partition) will not work, I  try it on 3 different computers  with ubuntu 18 and 19, I think is something with the bitcoinQT


see this video https://streamable.com/ve1mp and you will understand better what I mean, is a recording of the screen when I try to change the directory


legendary
Activity: 1624
Merit: 2481
Maybe it's just called "bitcoin" instead of "bitcoin-qt" on your system (I'm using slightly different version numbers).
no  is not working

different  version of  bitcoin core?

Check the directory for the executable and run it using:
Code:
./NAME -datadir=...

Replace NAME with the name of the executable and ... with the path you want to use (e.g. the one proposed by LoyceV to test).


Regarding your issue.. it definitely seems like a permission issue or a bug.
How did you install core ?
Did you already try to start it via the console and giving it the datadir path via the parameter (i guess you didn't yet?) You might want to try that out.
Also could you give us the output of the directory you are trying to use (using ls -al inside of /media/asus/multimedia) ?
Btw, how is your external drive formatted ? Which format did you use ?
jr. member
Activity: 38
Merit: 6
Could always try installing Windows 10... and then setup the Windows Subsystem for Linux (WSL) and then once it is setup, you can try and install Ubuntu (you can basically just goto the Microsoft Store and click "install") and then try running Bitcoin Core using that. Wink Tongue


why should I install windows 10 and then ubuntu from inside windows? do not make any sense then I rather use windows 10


Even if I use "try ubuntu" w/o installing it and I download the bitcoin core  same stuff  can't choose a  different location for the  blockchain directory , you can try it  is fast and easy with an usb3  you are in ubuntu   in 5min:)
jr. member
Activity: 38
Merit: 6
I give 777 to all  directories still nothing
Have you tested my suggestion?
Code:
mkdir /dev/shm/bitcoin; bitcoin-qt -datadir=/dev/shm/bitcoin
command not found
Maybe it's just called "bitcoin" instead of "bitcoin-qt" on your system (I'm using slightly different version numbers).

no  is not working

different  version of  bitcoin core?
legendary
Activity: 3290
Merit: 16489
Thick-Skinned Gang Leader and Golden Feather 2021
I give 777 to all  directories still nothing
Have you tested my suggestion?
Code:
mkdir /dev/shm/bitcoin; bitcoin-qt -datadir=/dev/shm/bitcoin
command not found
Maybe it's just called "bitcoin" instead of "bitcoin-qt" on your system (I'm using slightly different version numbers).
HCP
legendary
Activity: 2086
Merit: 4316
Could always try installing Windows 10... and then setup the Windows Subsystem for Linux (WSL) and then once it is setup, you can try and install Ubuntu (you can basically just goto the Microsoft Store and click "install") and then try running Bitcoin Core using that. Wink Tongue



jr. member
Activity: 38
Merit: 6
I give 777 to all  directories still nothing
Have you tested my suggestion?
Code:
mkdir /dev/shm/bitcoin; bitcoin-qt -datadir=/dev/shm/bitcoin

command not found

What I see is:
1. if when I install ubuntu I choose the partition to have the mount point /home then the  blockchain will be downloaded to  the larger partition



2. if I use the partition like a  normal partition/external device (lets say an external hdd) will not work



I give all the directories  to have 777
I also choose the mount to be "media" but same error, unfortunately I can't give the mount point /home I think that can be done only when I install ubuntu


I wish to have the blockchain to the partition like in case 2 but I really do not know why


Other think very odd, when I start the bitcoin QT  and I choose the directory in the window "Choose data directory" the "make a new directory  button is grey , inactive, and the folders are not showing there



at this point I try it on 3 different computers
I'm new in ubuntu  but I watch some online curses about linux command line   ubuntu OS  and I'm good on computers but  I really do not get it why the blockchain can't be save where I wanna.

I can easy install windows 10 and  put bitcoin there but I wanna have ubuntu (give me a reason to learn about linux system)


best regards and happy Christmas to all from here
legendary
Activity: 3290
Merit: 16489
Thick-Skinned Gang Leader and Golden Feather 2021
I give 777 to all  directories still nothing
Have you tested my suggestion?
Code:
mkdir /dev/shm/bitcoin; bitcoin-qt -datadir=/dev/shm/bitcoin
jr. member
Activity: 38
Merit: 6
It seems like that would be a "permissions" issue of some description.

You'll need to double check what user/group the app/process is running as, and what permissions the various directories have. It's quite possible that your user/group doesn't have read/execute permissions for anything higher than the "common" directory. That could explain why the app is unable to browse those directories.

I give 777 to all  directories still nothing
Pages:
Jump to: