devstack install fails with permission denied errors

asked 2015-04-14 10:17:46 -0500

rlrevell gravatar image

updated 2015-04-14 10:19:04 -0500

Doing everything as user stack like the documentation recommends, ./ on ubuntu 14.04 fails with these errors. Passwordless sudo does work and the previous parts of the install that require root access work, it seems to be trying to do root level things as the stack user here.

+ configure_keystone
+ sudo install -d -o stack /etc/keystone
+ [[ /etc/keystone != \/\o\p\t\/\s\t\a\c\k\/\k\e\y\s\t\o\n\e\/\e\t\c ]]
+ install -m 600 /opt/stack/keystone/etc/keystone.conf.sample /etc/keystone/keystone.conf
+ cp -p /opt/stack/keystone/etc/policy.json /etc/keystone
cp: cannot create regular file '/etc/keystone/policy.json': Permission denied
+ exit_trap
+ local r=1
++ jobs -p
+ jobs=
+ [[ -n '' ]]
+ kill_spinner
+ '[' '!' -z '' ']'
+ [[ 1 -ne 0 ]]
+ echo 'Error on exit'
Error on exit
+ [[ -z /opt/stack/logs ]]
+ /opt/stack/devstack/tools/ -d /opt/stack/logs
World dumping... see /opt/stack/logs/worlddump-2015-04-14-151400.txt for details
df: '/run/user/1000/gvfs': Permission denied
+ exit 1
edit retag flag offensive close merge delete

3 answers

Sort by ยป oldest newest most voted

answered 2015-04-14 14:21:38 -0500

rlrevell gravatar image

It worked once I patched the script to actually run all commands requiring root access with sudo:

edit flag offensive delete link more

answered 2016-08-31 00:46:19 -0500

I had this issue as well... Here is what worked for me... navigate to /etc sudo chown -R stack keystone/

somehow the ownership of the keystone directory was not for the stackuser.

Hope this helps many many other people

edit flag offensive delete link more

answered 2015-04-14 10:56:30 -0500

Stack user must have sudo privileges to install and manage devstack. Run this command as root to insert stack user with root privileges in sudoers file.

echo "stack ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
edit flag offensive delete link more


The stack user does have sudo privileges - earlier in the install ./ installed a bunch of packages and other root level things. I was able to make it work by prepending sudo to about 50 lines in lib/* and functions-common. I don't see how this script ever could work otherwise.

rlrevell gravatar imagerlrevell ( 2015-04-14 11:06:29 -0500 )edit

Pastebin of the changes needed to make it work:

rlrevell gravatar imagerlrevell ( 2015-04-14 11:10:29 -0500 )edit

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2015-04-14 10:17:46 -0500

Seen: 4,729 times

Last updated: Apr 14 '15