I am following the instructions from this tutorial to install devstack. When I type ./stack.sh
, I am receiving the following error:
Exception:
Traceback (most recent call last):
File "/opt/stack/requirements/.venv/lib/python3.6/site-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/opt/stack/requirements/.venv/lib/python3.6/site-packages/pip/commands/install.py", line 342, in run
requirement_set.prepare_files(finder)
File "/opt/stack/requirements/.venv/lib/python3.6/site-packages/pip/req/req_set.py", line 380, in prepare_files
ignore_dependencies=self.ignore_dependencies))
File "/opt/stack/requirements/.venv/lib/python3.6/site-packages/pip/req/req_set.py", line 554, in _prepare_file
require_hashes
File "/opt/stack/requirements/.venv/lib/python3.6/site-packages/pip/req/req_install.py", line 281, in populate_link
self.link = self._wheel_cache.cached_wheel(self.link, self.name)
File "/opt/stack/requirements/.venv/lib/python3.6/site-packages/pip/wheel.py", line 68, in cached_wheel
self._cache_dir, link, self._format_control, package_name)
File "/opt/stack/requirements/.venv/lib/python3.6/site-packages/pip/wheel.py", line 129, in cached_wheel
wheel_names = os.listdir(root)
PermissionError: [Errno 13] Permission denied: '/opt/stack/.cache/pip/wheels/a7/c1/ea/cf5bd31012e735dc1dfea3131a2d5eae7978b251083d6247bd'
What is the problem if the stack user was configured appropriately according to the tutorial?
Searching a bit, I found that we have to associate the stack user with the stack directory:
sudo chown -R stack:stack /opt/stack