I'm having an issue. Currently using a watch-only wallet on my Mac for localhost web development. Once ready I'm moving to digitalocean. I do not need the blockchain, just generating addresses. Following both Armory's github and this post:
https://bitcointalksearch.org/topic/m.1492140I can, via command line, retrieve an address (albeit with warnings, but nothing 2> /dev/null doesn't fix):
$ python /Users/me/repos/site/api/backend/armory/getNextAddress.py /Users/me/repos/site/api/backend/armory/armory_Z52GbQJB_.watchonly.wallet
(ERROR) ArmoryUtils.py:1172 - Error getting system details:
Traceback (most recent call last):
File "/Users/me/repos/site/api/backend/armory/armoryengine/ArmoryUtils.py", line 1170, in
SystemSpecs = GetSystemDetails()
File "/Users/me/repos/site/api/backend/armory/armoryengine/ArmoryUtils.py", line 1165, in GetSystemDetails
out.HddAvailB = getHddSize(BTC_HOME_DIR) / (1024**3)
File "/Users/me/repos/site/api/backend/armory/armoryengine/ArmoryUtils.py", line 1162, in getHddSize
s = os.statvfs(adir)
OSError: [Errno 2] No such file or directory: '/Users/me/Library/Application Support/Bitcoin/'
(ERROR) ArmoryUtils.py:1173 - Skipping.
13QPCfgarnbup9T5oUfMT8bTReRjSb7vJV
However, when allowing apache to execute the same python script via:
$output = shell_exec('/usr/local/bin/python ../backend/armory/getNextAddress.py ../backend/armory/armory_Z52GbQJB_.watchonly.wallet');
I receive the following error in apache's error log:
==> /var/log/apache2/error_log <==
Traceback (most recent call last):
File "../backend/armory/getNextAddress.py", line 5, in
from armoryengine.ALL import *
File "/Users/me/repos/site/api/backend/armory/armoryengine/ALL.py", line 8, in
from armoryengine.ArmoryUtils import *
File "/Users/me/repos/site/api/backend/armory/armoryengine/ArmoryUtils.py", line 457, in
os.makedirs(ARMORY_HOME_DIR)
File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/os.py", line 150, in makedirs
makedirs(head, mode)
File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/os.py", line 150, in makedirs
makedirs(head, mode)
File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/os.py", line 157, in makedirs
mkdir(name, mode)
OSError: [Errno 13] Permission denied: '/Library/WebServer/Library'
I have tried:
- adding '--datadir=pathtoarmory' to my getNextAddress.py script
- absolute paths in my shell_exec call
- symlinks in /var/www/html to avoid _www user from possibly needing permissions
I understand a "solution" would be to grant 777 access to /Library/WebServer, but why should I? It doesn't sound like a great answer. Why is Armory trying to make this directory? I see it does not create it when I run the same python script from command line. I set a watch for 0.1s on /Library/WebServer in case it was trying to be sneaky and create/delete like a ninja when run via command line, but no. No directory is ever created.
What's going on? How can I avoid this? All I need is the next deterministic address.
Thanks in advance.