Cannot obtain lock on folder - fixed and was a permissions problem, repeatable #7303

issue timb999 opened this issue on January 6, 2016
  1. timb999 commented at 11:07 AM on January 6, 2016: none

    Hi,

    I recently installed BitCoinCore 0.11.2 on my Windows 7 64bit Pro machine.

    The first time I ran the program, all was fine, and the blockchain started to sync. I left this for several hours, but needed to turn my PC off so I shut the program down which was successful.

    When I rebooted and ran the program again, I received an error saying...

    "Cannot obtain a lock on data directory (location here) Bitcoin Core is probably already running"

    I have fixed this issue myself and can inform you that this problem arose because the HDD that I am using for BitCoinCore is not C, but a different internal HDD. This HDD was used on a previous PC installation - I then had to reinstall my PC and I am reusing this same HDD. Because this HDD was used on a previous installation, there are permissions problems. I simply went to the folder that BitCoinCore is using and used the 'sharing' tab to give me full permission and this fixed the problem.

    Therefore you might want to check this, or implement this into the error message...

    Thanks Tim

  2. jonasschnelli added the label Windows on Jan 7, 2016
  3. jonasschnelli commented at 7:58 AM on January 7, 2016: contributor

    I think the boost::interprocess::file_lock could not be acquired (file <datadir>/.lock) because you had permission issue (maybe occurred with a improper shutdown or a HDD failure or because you used the HDD which was previously used with another computer).

    Looks after a local problem to me.

  4. MarcoFalke commented at 11:51 AM on January 7, 2016: member

    Indeed a local problem, but we could still extend the error message, if appropriate: https://github.com/bitcoin/bitcoin/blob/7b0a9a80400495e263c779d6ddd6c33641f27716/src/init.cpp#L1028

  5. jonasschnelli closed this on Jan 8, 2016

  6. jonasschnelli commented at 8:24 AM on January 8, 2016: contributor

    Seems to be a local issue. Feel free to improve the error output. Closing.

  7. MarcoFalke locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-17 03:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me