Results 1 to 4 of 4

Thread: Open snap application with permissions for another drive

  1. #1
    Join Date
    May 2021

    Open snap application with permissions for another drive

    I'm attempting to run the bitcoin daemon and have it store the blockchain data onto a separate drive of mine. However, I keep encountering issues with permissions. I'm new to Linux, but I believe the problem is two-fold.
    First, is my file system even set up properly? I reformatted the target HDD to be compatible, but it is mounted at /media/server01/hdd-server01-con The other file system is in boot, with the main partition the filesystem root.
    Second, the snap issue. I cannot run bitcoin-core.qt as root as I get this error:
    root@server01:/# sudo bitcoin-core.qt
    mkdir: cannot create directory '/run/user/0': Permission denied
    I'm not sure how that even makes sense as I'm running from root, unless there is a setting somewhere which expects me to be entering that command from a different folder. On the other hand, running it from the applications window does open the dialog, but after selecting the target folder (/media/server01/hdd-server01-con/btc) it immediately gives me this error at startup:
    Error initializing settings: Failed saving settings file:
    - Error: Unable to open settings file /media/server01/hdd-server01-con/btc/settings.json.tmp for writing.

  2. #2
    Join Date
    Dec 2014

    Re: Open snap application with permissions for another drive

    snaps are constrained through AppArmour. Thanks to this they are unable to write anywhere but in the $HOME of the user running them. Additionally they can be allowed to access removable media mounted through udisk in /media/$USER/. This is done to minimize the damage buggy software or malware packaged as a snap can do to the system.


  3. #3
    Join Date
    May 2021

    Re: Open snap application with permissions for another drive

    Thank you! I'll go ahead and install ubuntu on the HDD itself I wanted to use then.

  4. #4
    Join Date
    Jun 2010
    London, England
    Ubuntu Development Release

    Re: Open snap application with permissions for another drive

    What information do you have that says that bitcoin-core snap should be run as root? That seems to go against the principles of packaging an application as a snap package.

    Perhaps it would better if you asked this question of the developer.

    You may also find this informative:

    It seems that the developer needs to get special permission to code his app to access another drive. If he has not requested and gained that permission, then what you want to do is impossible. That blog post will help you find out where bitcoin-core is storing the data. Perhaps you can then regularly back it up to the other hard disk.

    It is a machine. It is more stupid than we are. It will not stop us from doing stupid things.
    Ubuntu user #33,200. Linux user #530,530

Tags for this Thread


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts