<p>I managed to reproduce your error message on both 0.15.1 and the current master (c17f11f7b) with the following bitcoin.conf:</p>

<pre><code>datadir=/home/nick/.bitcoin2
</code></pre>

<p>...where <code>/home/nick/.bitcoin2</code> is a directory that doesn't exist.</p>

<p>My error log:</p>

<pre><code>$ ./src/bitcoind -reindex


************************
EXCEPTION: N5boost10filesystem16filesystem_errorE       
boost::filesystem::space: Operation not permitted       
bitcoin in AppInit()       

Error: Error: A fatal internal error occurred, see debug.log for details
Error: Error: A fatal internal error occurred, see debug.log for details
</code></pre>

<p>When this happens, bitcoin emits the debug.log into my working directory, instead of putting it in the data directory.</p>

<p>Based on this, I think you're running into the same problem.</p>

<p>Can you doublecheck that your datadir is a directory that exists?</p>

CC BY-SA 3.0
2017-12-06T00:34:48.350Z
I also suspected that but we verified in the comments to the question that the directory exists.
Adam Millerchip
CC BY-SA 3.0
2017-12-06T02:05:02.407Z
Yes my directory definitely exists. Its so strange that my bitcoin client use to work just fine the way I had set it up
Luis Escobar-Driver
CC BY-SA 3.0
2017-12-05T06:12:42.270Z
2017-12-05T06:12:42.270Z
Nick ODell
<p>The problem is that you specify the datadir in the bitcoin.conf file. You should not do this as it can result in some strange behavior, especially because the bitocin.conf file is supposed to be in the datadir. Instead of specifying it there, you should specify it as part of the command to start Bitcoin Core.</p>

CC BY-SA 3.0
2017-12-06T02:03:10.667Z
Isnt bitcoin.conf suppose to be in ./bitcoin? So you suggest placing my bitcoin.conf file where my storage is and simply starting bitcoind like this $ bitcoind -datadir=absolutatePath ?
Luis Escobar-Driver
CC BY-SA 3.0
2017-12-06T06:26:27.517Z
The bitcoin.conf file is supposed to be in the Bitcoin Core datadir. It does not need to be in ~/.bitcoin nor should it be unless ~/.bitcoin is your datadir (which it is by default). Yes, I am suggesting that you start bitcoind like that.
Ava Chow
CC BY-SA 3.0
2017-12-05T16:22:43.097Z
2017-12-05T16:22:43.097Z
Ava Chow
<ul>
<li>Bitcoin Client Software and Version Number: Bitcoin Core 0.15.1</li>
<li>Operating System: Ubuntu 16.04</li>
<li>System Hardware Specs: 2.4 GHz Intel Core CPU with 16 GB RAM and 750 GB free hard drive space.</li>
<li>Description of Problem: bitcoind refuses to start up. Keep getting the same error over and over.</li>
</ul>

<p>I have a 250GB SDD and a 750GB HDD which I use as storage on my ubuntu 16.04. I have been running a full bitcoin node for a few weeks which I just use to practice interacting with the bitcoin client. A few days ago I turned on my node and got this</p>

<blockquote>
  <p>EXCEPTION: N5boost10filesystem16filesystem_errorE<br>
  boost::filesystem::space: Operation not permitted        bitcoin in
  AppInit()       </p>
  
  <p>Error: Error: A fatal internal error occurred, see debug.log for
  details
  Error: Error: A fatal internal error occurred, see debug.log
  for details</p>
</blockquote>

<p>I have NO idea how to proceed. I have uninstalled bitcoin core from my system, reformatted my storage drive, reinstalled ubuntu, and just spend hours trying to debug this f'ing issue. I have posted on several message boards and have received literally no helpful replies. My storage HDD is located within the media folder, which I changed permissions on for any user to use. Occasionally bitcoind will start and simply just stay at block 0.... Really frustrated and quite frankly im on the verge of moving on to other projects. Any help me would be greatly appreciated. </p>

<p>Screenshot of the problem:
<a href="https://i.sstatic.net/a1eFa.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/a1eFa.png" alt="enter image description here"></a></p>

<p>debug.log:</p>

<pre><code>2017-12-02 05:15:59 Bitcoin version v0.15.1
2017-12-02 05:15:59 InitParameterInteraction: parameter interaction: -whitelistforcerelay=1 -&gt; setting -whitelistrelay=1
2017-12-02 05:15:59 Assuming ancestors of block 0000000000000000003b9ce759c2a087d52abc4266f8f4ebd6d768b89defa50a have valid signatures.
2017-12-02 05:15:59 Setting nMinimumChainWork=000000000000000000000000000000000000000000723d3581fe1bd55373540a
2017-12-02 05:15:59 Using the 'standard' SHA256 implementation
2017-12-02 05:15:59 Using RdRand as an additional entropy source
2017-12-02 05:15:59 Default data directory /home/ancientevil/.bitcoin
2017-12-02 05:15:59 Using data directory 
2017-12-02 05:15:59 Using config file bitcoin.conf
2017-12-02 05:15:59 Using at most 125 automatic connections (1024 file descriptors available)
2017-12-02 05:15:59 Using 16 MiB out of 32/2 requested for signature cache, able to store 524288 elements
2017-12-02 05:15:59 Using 16 MiB out of 32/2 requested for script execution cache, able to store 524288 elements
2017-12-02 05:15:59 Using 4 threads for script verification
2017-12-02 05:15:59 scheduler thread start
2017-12-02 05:15:59 HTTP: creating work queue of depth 16
2017-12-02 05:15:59 Config options rpcuser and rpcpassword will soon be deprecated. Locally-run instances may remove rpcuser to use cookie-based auth, or may be replaced with rpcauth. Please see share/rpcuser for rpcauth auth generation.
2017-12-02 05:15:59 HTTP: starting 4 worker threads
2017-12-02 05:15:59 init message: Verifying wallet(s)...
2017-12-02 05:15:59 Using BerkeleyDB version Berkeley DB 4.8.30: (April  9, 2010)
2017-12-02 05:15:59 Using wallet wallet.dat
2017-12-02 05:15:59 CDBEnv::Open: LogDir=database ErrorFile=db.log
2017-12-02 05:15:59 Cache configuration:
2017-12-02 05:15:59 * Using 56.2MiB for block index database
2017-12-02 05:15:59 * Using 8.0MiB for chain state database
2017-12-02 05:15:59 * Using 385.8MiB for in-memory UTXO set (plus up to 286.1MiB of unused mempool space)
2017-12-02 05:15:59 init message: Loading block index...
2017-12-02 05:15:59 Opening LevelDB in blocks/index
2017-12-02 05:15:59 Opened LevelDB successfully
2017-12-02 05:15:59 Using obfuscation key for blocks/index: 0000000000000000
2017-12-02 05:15:59 LoadBlockIndexDB: last block file = 0
2017-12-02 05:15:59 LoadBlockIndexDB: last block file info: CBlockFileInfo(blocks=0, size=0, heights=0...0, time=1970-01-01...1970-01-01)
2017-12-02 05:15:59 Checking all blk files are present...
2017-12-02 05:15:59 LoadBlockIndexDB: transaction index enabled
2017-12-02 05:15:59 Initializing databases...
2017-12-02 05:15:59 Opening LevelDB in chainstate
2017-12-02 05:15:59 Opened LevelDB successfully
2017-12-02 05:15:59 Using obfuscation key for chainstate: fa63baf2491fc7eb
2017-12-02 05:15:59 init message: Rewinding blocks...
2017-12-02 05:15:59  block index              22ms
2017-12-02 05:15:59 init message: Loading wallet...
2017-12-02 05:15:59 nFileVersion = 150100
2017-12-02 05:15:59 Keys: 2002 plaintext, 0 encrypted, 2002 w/ metadata, 2002 total
2017-12-02 05:15:59  wallet                   64ms
2017-12-02 05:15:59 setKeyPool.size() = 2000
2017-12-02 05:15:59 mapWallet.size() = 0
2017-12-02 05:15:59 mapAddressBook.size() = 1
2017-12-02 05:15:59 

************************
EXCEPTION: N5boost10filesystem16filesystem_errorE       
boost::filesystem::space: Operation not permitted       
bitcoin in AppInit()       

2017-12-02 05:15:59 scheduler thread interrupt
2017-12-02 05:15:59 Shutdown: In progress...
2017-12-02 05:15:59 *** System error while flushing: boost::filesystem::space: Operation not permitted
2017-12-02 05:15:59 Error: Error: A fatal internal error occurred, see debug.log for details
2017-12-02 05:15:59 *** System error while flushing: boost::filesystem::space: Operation not permitted
2017-12-02 05:15:59 Error: Error: A fatal internal error occurred, see debug.log for details
2017-12-02 05:15:59 Shutdown: done
</code></pre>

<p>bitconi.conf:</p>

<pre><code>##
## bitcoin.conf configuration file. Lines beginning with # are comments.
##




datadir=/media/ancientevil/Storage/BitcoinBlocks
txindex=1


# Network-related settings:

# Run on the test network instead of the real bitcoin network.
#testnet=0

# Run a regression test network
#regtest=0

# Connect via a SOCKS5 proxy
#proxy=127.0.0.1:9050

# Bind to given address and always listen on it. Use [host]:port notation for IPv6
#bind=&lt;addr&gt;

# Bind to given address and whitelist peers connecting to it. Use [host]:port notation for IPv6
#whitebind=&lt;addr&gt;

##############################################################
##            Quick Primer on addnode vs connect            ##
##  Let's say for instance you use addnode=4.2.2.4          ##
##  addnode will connect you to and tell you about the      ##
##    nodes connected to 4.2.2.4.  In addition it will tell ##
##    the other nodes connected to it that you exist so     ##
##    they can connect to you.                              ##
##  connect will not do the above when you 'connect' to it. ##
##    It will *only* connect you to 4.2.2.4 and no one else.##
##                                                          ##
##  So if you're behind a firewall, or have other problems  ##
##  finding nodes, add some using 'addnode'.                ##
##                                                          ##
##  If you want to stay private, use 'connect' to only      ##
##  connect to "trusted" nodes.                             ##
##                                                          ##
##  If you run multiple nodes on a LAN, there's no need for ##
##  all of them to open lots of connections.  Instead       ##
##  'connect' them all to one node that is port forwarded   ##
##  and has lots of connections.                            ##
##       Thanks goes to [Noodle] on Freenode.               ##
##############################################################

# Use as many addnode= settings as you like to connect to specific peers
#addnode=69.164.218.197
#addnode=10.0.0.2:8333

# Alternatively use as many connect= settings as you like to connect ONLY to specific peers
#connect=69.164.218.197
#connect=10.0.0.1:8333

# Listening mode, enabled by default except when 'connect' is being used
#listen=1

# Maximum number of inbound+outbound connections.
#maxconnections=

#
# JSON-RPC options (for controlling a running Bitcoin/bitcoind process)
#

# server=1 tells Bitcoin-Qt and bitcoind to accept JSON-RPC commands
server=1

# Bind to given address to listen for JSON-RPC connections. Use [host]:port notation for IPv6.
# This option can be specified multiple times (default: bind to all interfaces)
#rpcbind=&lt;addr&gt;

# If no rpcpassword is set, rpc cookie auth is sought. The default `-rpccookiefile` name
# is .cookie and found in the `-datadir` being used for bitcoind. This option is typically used
# when the server and client are run as the same user.
#
# If not, you must set rpcuser and rpcpassword to secure the JSON-RPC api. The first
# method(DEPRECATED) is to set this pair for the server and client:
rpcuser=rpcUser
rpcpassword=WITHHELD

#
# The second method `rpcauth` can be added to server startup argument. It is set at intialization time
# using the output from the script in share/rpcuser/rpcuser.py after providing a username:
#
# ./share/rpcuser/rpcuser.py alice
# String to be appended to bitcoin.conf:
# rpcauth=alice:f7efda5c189b999524f151318c0c86$d5b51b3beffbc02b724e5d095828e0bc8b2456e9ac8757ae3211a5d9b16a22ae
# Your password:
# DONT_USE_THIS_YOU_WILL_GET_ROBBED_8ak1gI25KFTvjovL3gAM967mies3E=
#
# On client-side, you add the normal user/password pair to send commands:
#rpcuser=alice
#rpcpassword=DONT_USE_THIS_YOU_WILL_GET_ROBBED_8ak1gI25KFTvjovL3gAM967mies3E=
#
# You can even add multiple entries of these to the server conf file, and client can use any of them:
# rpcauth=bob:b2dd077cb54591a2f3139e69a897ac$4e71f08d48b4347cf8eff3815c0e25ae2e9a4340474079f55705f40574f4ec99

# How many seconds bitcoin will wait for a complete RPC HTTP request.
# after the HTTP connection is established. 
rpcclienttimeout=6

# By default, only RPC connections from localhost are allowed.
# Specify as many rpcallowip= settings as you like to allow connections from other hosts,
# either as a single IPv4/IPv6 or with a subnet specification.

# NOTE: opening up the RPC port to hosts outside your local trusted network is NOT RECOMMENDED,
# because the rpcpassword is transmitted over the network unencrypted.

# server=1 tells Bitcoin-Qt to accept JSON-RPC commands.
# it is also read by bitcoind to determine if RPC should be enabled 
#rpcallowip=10.1.1.34/255.255.255.0
#rpcallowip=1.2.3.4/24
#rpcallowip=2001:db8:85a3:0:0:8a2e:370:7334/96

# Listen for RPC connections on this TCP port:
rpcport=8332

# You can use Bitcoin or bitcoind to send commands to Bitcoin/bitcoind
# running on another host using this option:
rpcconnect=127.0.0.1

# Create transactions that have enough fees so they are likely to begin confirmation within n blocks (default: 6).
# This setting is over-ridden by the -paytxfee option.
#txconfirmtarget=n

# Miscellaneous options

# Pre-generate this many public/private key pairs, so wallet backups will be valid for
# both prior transactions and several dozen future transactions.
#keypool=100

# Pay an optional transaction fee every time you send bitcoins.  Transactions with fees
# are more likely than free transactions to be included in generated blocks, so may
# be validated sooner.
#paytxfee=0.00

# Enable pruning to reduce storage requirements by deleting old blocks. 
# This mode is incompatible with -txindex and -rescan.
# 0 = default (no pruning).
# 1 = allows manual pruning via RPC.
# &gt;=550 = target to stay under in MiB. 
#prune=550

# User interface options

# Start Bitcoin minimized
#min=1

# Minimize to the system tray
#minimizetotray=1
</code></pre>

CC BY-SA 3.0
2017-12-05T01:08:52.343Z
What are the permissions for `/media/ancientevil/Storage/BitcoinBlocks` including all intermediate directories? It looks like Bitcoin-Core does not have read or execute permissions to your `datadir`. Failing that, what is the output of `df -h` for that directory?
Adam Millerchip
CC BY-SA 3.0
2017-12-05T01:10:37.860Z
The permission for /media and all files/folders within are read/write for anyone.
Luis Escobar-Driver
CC BY-SA 3.0
2017-12-05T01:11:49.253Z
Filesystem                   Size  Used Avail Use% Mounted on
udev                         7.8G     0  7.8G   0% /dev
tmpfs                        1.6G  9.5M  1.6G   1% /run
/dev/mapper/ubuntu--vg-root  204G   40G  154G  21% /
tmpfs                        7.8G  188M  7.6G   3% /dev/shm
tmpfs                        5.0M  4.0K  5.0M   1% /run/lock
tmpfs                        7.8G     0  7.8G   0% /sys/fs/cgroup
Luis Escobar-Driver
CC BY-SA 3.0
2017-12-05T01:11:52.377Z
/dev/sdb2                    473M  126M  323M  28% /boot
/dev/sdb1                    511M  3.4M  508M   1% /boot/efi
/dev/sda1                    688G   20G  634G   3% /media/Storage
tmpfs                        1.6G   80K  1.6G   1% /run/user/1000
Luis Escobar-Driver
CC BY-SA 3.0
2017-12-05T01:16:17.730Z
Also what happens if you don't set `datadir` and let it use the default location?
Adam Millerchip
CC BY-SA 3.0
2017-12-05T01:22:59.453Z
It looks like your disk is mounted on `/media/Storage`/ but your datadir is set to `/media/ancientevil~`. What does `df -h /media/ancientevil/Storage/BitcoinBlocks` produce?
Adam Millerchip
CC BY-SA 3.0
2017-12-05T01:24:29.900Z
O sorry I changed my data dir since I last posted. My datadir=/media/Storage/Blocks
Luis Escobar-Driver
CC BY-SA 3.0
2017-12-05T01:25:50.247Z
When I comment out my datadir bitcoind -reindex runs but it stuck on block 0
Luis Escobar-Driver
CC BY-SA 3.0
2017-12-05T01:27:12.710Z
df -h /media/Storage
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1       688G   20G  634G   3% /media/Storage
Luis Escobar-Driver
CC BY-SA 3.0
2017-12-05T01:27:58.970Z
`df -h /media/Storage/Blocks`? `ls -lhd /media/Storage/Blocks`?
Adam Millerchip
CC BY-SA 3.0
2017-12-05T01:36:02.427Z
**ls -lhd /media/Storage/Blocks** - drwxrwxr-x 2 ancientevil ancientevil 4.0K Dec  4 16:23 /media/Storage/Blocks
**df -h /media/Storage/Blocks**
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1       688G   20G  634G   3% /media/Storage
Luis Escobar-Driver
<bitcoin-core><bitcoind><client>
When running bitcoind I keep getting - boost::filesystem::space: Operation not permitted
Luis Escobar-Driver
# When running bitcoind I keep getting - boost::filesystem::space: Operation not permitted

(Asked by: username_0 on 2017-12-05)

* Bitcoin Client Software and Version Number: Bitcoin Core 0.15.1
* Operating System: Ubuntu 16.04
* System Hardware Specs: 2.4 GHz Intel Core CPU with 16 GB RAM and 750 GB free hard drive space.
* Description of Problem: bitcoind refuses to start up. Keep getting the same error over and over.

I have a 250GB SDD and a 750GB HDD which I use as storage on my ubuntu 16.04. I have been running a full bitcoin node for a few weeks which I just use to practice interacting with the bitcoin client. A few days ago I turned on my node and got this

> EXCEPTION: N5boost10filesystem16filesystem\_errorE  
> boost::filesystem::space: Operation not permitted bitcoin in
> AppInit()
>
> Error: Error: A fatal internal error occurred, see debug.log for
> details
> Error: Error: A fatal internal error occurred, see debug.log
> for details

I have NO idea how to proceed. I have uninstalled bitcoin core from my system, reformatted my storage drive, reinstalled ubuntu, and just spend hours trying to debug this f'ing issue. I have posted on several message boards and have received literally no helpful replies. My storage HDD is located within the media folder, which I changed permissions on for any user to use. Occasionally bitcoind will start and simply just stay at block 0.... Really frustrated and quite frankly im on the verge of moving on to other projects. Any help me would be greatly appreciated.

Screenshot of the problem:
[![enter image description here](https://i.sstatic.net/a1eFa.png)](https://i.sstatic.net/a1eFa.png)

debug.log:

```
2017-12-02 05:15:59 Bitcoin version v0.15.1
2017-12-02 05:15:59 InitParameterInteraction: parameter interaction: -whitelistforcerelay=1 -> setting -whitelistrelay=1
2017-12-02 05:15:59 Assuming ancestors of block 0000000000000000003b9ce759c2a087d52abc4266f8f4ebd6d768b89defa50a have valid signatures.
2017-12-02 05:15:59 Setting nMinimumChainWork=000000000000000000000000000000000000000000723d3581fe1bd55373540a
2017-12-02 05:15:59 Using the 'standard' SHA256 implementation
2017-12-02 05:15:59 Using RdRand as an additional entropy source
2017-12-02 05:15:59 Default data directory /home/ancientevil/.bitcoin
2017-12-02 05:15:59 Using data directory 
2017-12-02 05:15:59 Using config file bitcoin.conf
2017-12-02 05:15:59 Using at most 125 automatic connections (1024 file descriptors available)
2017-12-02 05:15:59 Using 16 MiB out of 32/2 requested for signature cache, able to store 524288 elements
2017-12-02 05:15:59 Using 16 MiB out of 32/2 requested for script execution cache, able to store 524288 elements
2017-12-02 05:15:59 Using 4 threads for script verification
2017-12-02 05:15:59 scheduler thread start
2017-12-02 05:15:59 HTTP: creating work queue of depth 16
2017-12-02 05:15:59 Config options rpcuser and rpcpassword will soon be deprecated. Locally-run instances may remove rpcuser to use cookie-based auth, or may be replaced with rpcauth. Please see share/rpcuser for rpcauth auth generation.
2017-12-02 05:15:59 HTTP: starting 4 worker threads
2017-12-02 05:15:59 init message: Verifying wallet(s)...
2017-12-02 05:15:59 Using BerkeleyDB version Berkeley DB 4.8.30: (April  9, 2010)
2017-12-02 05:15:59 Using wallet wallet.dat
2017-12-02 05:15:59 CDBEnv::Open: LogDir=database ErrorFile=db.log
2017-12-02 05:15:59 Cache configuration:
2017-12-02 05:15:59 * Using 56.2MiB for block index database
2017-12-02 05:15:59 * Using 8.0MiB for chain state database
2017-12-02 05:15:59 * Using 385.8MiB for in-memory UTXO set (plus up to 286.1MiB of unused mempool space)
2017-12-02 05:15:59 init message: Loading block index...
2017-12-02 05:15:59 Opening LevelDB in blocks/index
2017-12-02 05:15:59 Opened LevelDB successfully
2017-12-02 05:15:59 Using obfuscation key for blocks/index: 0000000000000000
2017-12-02 05:15:59 LoadBlockIndexDB: last block file = 0
2017-12-02 05:15:59 LoadBlockIndexDB: last block file info: CBlockFileInfo(blocks=0, size=0, heights=0...0, time=1970-01-01...1970-01-01)
2017-12-02 05:15:59 Checking all blk files are present...
2017-12-02 05:15:59 LoadBlockIndexDB: transaction index enabled
2017-12-02 05:15:59 Initializing databases...
2017-12-02 05:15:59 Opening LevelDB in chainstate
2017-12-02 05:15:59 Opened LevelDB successfully
2017-12-02 05:15:59 Using obfuscation key for chainstate: fa63baf2491fc7eb
2017-12-02 05:15:59 init message: Rewinding blocks...
2017-12-02 05:15:59  block index              22ms
2017-12-02 05:15:59 init message: Loading wallet...
2017-12-02 05:15:59 nFileVersion = 150100
2017-12-02 05:15:59 Keys: 2002 plaintext, 0 encrypted, 2002 w/ metadata, 2002 total
2017-12-02 05:15:59  wallet                   64ms
2017-12-02 05:15:59 setKeyPool.size() = 2000
2017-12-02 05:15:59 mapWallet.size() = 0
2017-12-02 05:15:59 mapAddressBook.size() = 1
2017-12-02 05:15:59 

************************
EXCEPTION: N5boost10filesystem16filesystem_errorE       
boost::filesystem::space: Operation not permitted       
bitcoin in AppInit()       

2017-12-02 05:15:59 scheduler thread interrupt
2017-12-02 05:15:59 Shutdown: In progress...
2017-12-02 05:15:59 *** System error while flushing: boost::filesystem::space: Operation not permitted
2017-12-02 05:15:59 Error: Error: A fatal internal error occurred, see debug.log for details
2017-12-02 05:15:59 *** System error while flushing: boost::filesystem::space: Operation not permitted
2017-12-02 05:15:59 Error: Error: A fatal internal error occurred, see debug.log for details
2017-12-02 05:15:59 Shutdown: done

```

bitconi.conf:

```
##
## bitcoin.conf configuration file. Lines beginning with # are comments.
##

datadir=/media/ancientevil/Storage/BitcoinBlocks
txindex=1

# Network-related settings:

# Run on the test network instead of the real bitcoin network.
#testnet=0

# Run a regression test network
#regtest=0

# Connect via a SOCKS5 proxy
#proxy=127.0.0.1:9050

# Bind to given address and always listen on it. Use [host]:port notation for IPv6
#bind=<addr>

# Bind to given address and whitelist peers connecting to it. Use [host]:port notation for IPv6
#whitebind=<addr>

##############################################################
##            Quick Primer on addnode vs connect            ##
##  Let's say for instance you use addnode=4.2.2.4          ##
##  addnode will connect you to and tell you about the      ##
##    nodes connected to 4.2.2.4.  In addition it will tell ##
##    the other nodes connected to it that you exist so     ##
##    they can connect to you.                              ##
##  connect will not do the above when you 'connect' to it. ##
##    It will *only* connect you to 4.2.2.4 and no one else.##
##                                                          ##
##  So if you're behind a firewall, or have other problems  ##
##  finding nodes, add some using 'addnode'.                ##
##                                                          ##
##  If you want to stay private, use 'connect' to only      ##
##  connect to "trusted" nodes.                             ##
##                                                          ##
##  If you run multiple nodes on a LAN, there's no need for ##
##  all of them to open lots of connections.  Instead       ##
##  'connect' them all to one node that is port forwarded   ##
##  and has lots of connections.                            ##
##       Thanks goes to [Noodle] on Freenode.               ##
##############################################################

# Use as many addnode= settings as you like to connect to specific peers
#addnode=69.164.218.197
#addnode=10.0.0.2:8333

# Alternatively use as many connect= settings as you like to connect ONLY to specific peers
#connect=69.164.218.197
#connect=10.0.0.1:8333

# Listening mode, enabled by default except when 'connect' is being used
#listen=1

# Maximum number of inbound+outbound connections.
#maxconnections=

#
# JSON-RPC options (for controlling a running Bitcoin/bitcoind process)
#

# server=1 tells Bitcoin-Qt and bitcoind to accept JSON-RPC commands
server=1

# Bind to given address to listen for JSON-RPC connections. Use [host]:port notation for IPv6.
# This option can be specified multiple times (default: bind to all interfaces)
#rpcbind=<addr>

# If no rpcpassword is set, rpc cookie auth is sought. The default `-rpccookiefile` name
# is .cookie and found in the `-datadir` being used for bitcoind. This option is typically used
# when the server and client are run as the same user.
#
# If not, you must set rpcuser and rpcpassword to secure the JSON-RPC api. The first
# method(DEPRECATED) is to set this pair for the server and client:
rpcuser=rpcUser
rpcpassword=WITHHELD

#
# The second method `rpcauth` can be added to server startup argument. It is set at intialization time
# using the output from the script in share/rpcuser/rpcuser.py after providing a username:
#
# ./share/rpcuser/rpcuser.py alice
# String to be appended to bitcoin.conf:
# rpcauth=alice:f7efda5c189b999524f151318c0c86$d5b51b3beffbc02b724e5d095828e0bc8b2456e9ac8757ae3211a5d9b16a22ae
# Your password:
# DONT_USE_THIS_YOU_WILL_GET_ROBBED_8ak1gI25KFTvjovL3gAM967mies3E=
#
# On client-side, you add the normal user/password pair to send commands:
#rpcuser=alice
#rpcpassword=DONT_USE_THIS_YOU_WILL_GET_ROBBED_8ak1gI25KFTvjovL3gAM967mies3E=
#
# You can even add multiple entries of these to the server conf file, and client can use any of them:
# rpcauth=bob:b2dd077cb54591a2f3139e69a897ac$4e71f08d48b4347cf8eff3815c0e25ae2e9a4340474079f55705f40574f4ec99

# How many seconds bitcoin will wait for a complete RPC HTTP request.
# after the HTTP connection is established. 
rpcclienttimeout=6

# By default, only RPC connections from localhost are allowed.
# Specify as many rpcallowip= settings as you like to allow connections from other hosts,
# either as a single IPv4/IPv6 or with a subnet specification.

# NOTE: opening up the RPC port to hosts outside your local trusted network is NOT RECOMMENDED,
# because the rpcpassword is transmitted over the network unencrypted.

# server=1 tells Bitcoin-Qt to accept JSON-RPC commands.
# it is also read by bitcoind to determine if RPC should be enabled 
#rpcallowip=10.1.1.34/255.255.255.0
#rpcallowip=1.2.3.4/24
#rpcallowip=2001:db8:85a3:0:0:8a2e:370:7334/96

# Listen for RPC connections on this TCP port:
rpcport=8332

# You can use Bitcoin or bitcoind to send commands to Bitcoin/bitcoind
# running on another host using this option:
rpcconnect=127.0.0.1

# Create transactions that have enough fees so they are likely to begin confirmation within n blocks (default: 6).
# This setting is over-ridden by the -paytxfee option.
#txconfirmtarget=n

# Miscellaneous options

# Pre-generate this many public/private key pairs, so wallet backups will be valid for
# both prior transactions and several dozen future transactions.
#keypool=100

# Pay an optional transaction fee every time you send bitcoins.  Transactions with fees
# are more likely than free transactions to be included in generated blocks, so may
# be validated sooner.
#paytxfee=0.00

# Enable pruning to reduce storage requirements by deleting old blocks. 
# This mode is incompatible with -txindex and -rescan.
# 0 = default (no pruning).
# 1 = allows manual pruning via RPC.
# >=550 = target to stay under in MiB. 
#prune=550

# User interface options

# Start Bitcoin minimized
#min=1

# Minimize to the system tray
#minimizetotray=1

```

**Tags:** bitcoin-core, bitcoind, client

> **Comments:**
> **username_1**: What are the permissions for `/media/ancientevil/Storage/BitcoinBlocks` including all intermediate directories? It looks like Bitcoin-Core does not have read or execute permissions to your `datadir`. Failing that, what is the output of `df -h` for that directory?  
> **username_0**: The permission for /media and all files/folders within are read/write for anyone.  
> **username_0**: Filesystem                   Size  Used Avail Use% Mounted on udev                         7.8G     0  7.8G   0% /dev tmpfs                        1.6G  9.5M  1.6G   1% /run /dev/mapper/ubuntu--vg-root  204G   40G  154G  21% / tmpfs                        7.8G  188M  7.6G   3% /dev/shm tmpfs                        5.0M  4.0K  5.0M   1% /run/lock tmpfs                        7.8G     0  7.8G   0% /sys/fs/cgroup  
> **username_0**: /dev/sdb2                    473M  126M  323M  28% /boot /dev/sdb1                    511M  3.4M  508M   1% /boot/efi /dev/sda1                    688G   20G  634G   3% /media/Storage tmpfs                        1.6G   80K  1.6G   1% /run/user/1000  
> **username_1**: Also what happens if you don't set `datadir` and let it use the default location?  
> **username_1**: It looks like your disk is mounted on `/media/Storage`/ but your datadir is set to `/media/ancientevil~`. What does `df -h /media/ancientevil/Storage/BitcoinBlocks` produce?  
> **username_0**: O sorry I changed my data dir since I last posted. My datadir=/media/Storage/Blocks  
> **username_0**: When I comment out my datadir bitcoind -reindex runs but it stuck on block 0  
> **username_0**: df -h /media/Storage Filesystem      Size  Used Avail Use% Mounted on /dev/sda1       688G   20G  634G   3% /media/Storage  
> **username_1**: `df -h /media/Storage/Blocks`? `ls -lhd /media/Storage/Blocks`?  
> **username_0**: **ls -lhd /media/Storage/Blocks** - drwxrwxr-x 2 ancientevil ancientevil 4.0K Dec  4 16:23 /media/Storage/Blocks **df -h /media/Storage/Blocks** Filesystem      Size  Used Avail Use% Mounted on /dev/sda1       688G   20G  634G   3% /media/Storage  

---

## 2 answers

### Answer by username_2 on 2017-12-05. Score: 1

I managed to reproduce your error message on both 0.15.1 and the current master (c17f11f7b) with the following bitcoin.conf:

```
datadir=/home/username_2/.bitcoin2

```

...where `/home/username_2/.bitcoin2` is a directory that doesn't exist.

My error log:

```
$ ./src/bitcoind -reindex

************************
EXCEPTION: N5boost10filesystem16filesystem_errorE       
boost::filesystem::space: Operation not permitted       
bitcoin in AppInit()       

Error: Error: A fatal internal error occurred, see debug.log for details
Error: Error: A fatal internal error occurred, see debug.log for details

```

When this happens, bitcoin emits the debug.log into my working directory, instead of putting it in the data directory.

Based on this, I think you're running into the same problem.

Can you doublecheck that your datadir is a directory that exists?

> **Comments:**
> **username_1**: I also suspected that but we verified in the comments to the question that the directory exists.  
> **username_0**: Yes my directory definitely exists. Its so strange that my bitcoin client use to work just fine the way I had set it up  

---

### Answer by username_3 on 2017-12-05. Score: 1

The problem is that you specify the datadir in the bitcoin.conf file. You should not do this as it can result in some strange behavior, especially because the bitocin.conf file is supposed to be in the datadir. Instead of specifying it there, you should specify it as part of the command to start Bitcoin Core.

> **Comments:**
> **username_0**: Isnt bitcoin.conf suppose to be in ./bitcoin? So you suggest placing my bitcoin.conf file where my storage is and simply starting bitcoind like this $ bitcoind -datadir=absolutatePath ?  
> **username_3**: The bitcoin.conf file is supposed to be in the Bitcoin Core datadir. It does not need to be in ~/.bitcoin nor should it be unless ~/.bitcoin is your datadir (which it is by default). Yes, I am suggesting that you start bitcoind like that.  

---

