You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After installing this plugin I noticed that all my backup crons created from the dokku-postgres/dokku-redis plugins and the systemd dokku-redeploy/dokku-retire services from dokku itself stopped working.
Steps to Reproduce
Install this plugin
Manually start dokku-retire with systemctl start dokku-retire
Systemd error
Actual Results
Error from journalctl logs for dokku-retire service :
! User default does not have permissions to run ps:retire
! Access denied
=====> example acl information
Acl allowed users:
Acl global allow command line:
Acl global super user: d1ceward
Acl global user commands: help version
Acl global per app commands: logs urls ps:rebuild ps:restart ps:stop ps:start
ls -lah ~dokku/.dokkurc/ output
total 16K
drwxr-xr-x 2 dokku dokku 4.0K Oct 17 14:54 .
drwx------ 13 dokku dokku 4.0K Sep 7 11:44 ..
-rw-r--r-- 1 dokku dokku 384 Oct 17 14:54 acl
-rw-r--r-- 1 dokku dokku 22 Oct 14 16:13 DOKKU_EVENTS
How (deb/make/rpm) and where (AWS, VirtualBox, physical, etc.) was Dokku installed?:
Installed from AUR (Arch linux User Repository) on a physical machine.
PS: I'm the maintainer of the AUR package for dokku
Additional information
Output of failing Dokku commands after running dokku trace on
See output
+ [[ ps:retire == \v\e\r\s\i\o\n ]]
+ for allowed in $DOKKU_ACL_PER_APP_COMMANDS
+ [[ ps:retire == \l\o\g\s ]]
+ for allowed in $DOKKU_ACL_PER_APP_COMMANDS
+ [[ ps:retire == \u\r\l\s ]]
+ for allowed in $DOKKU_ACL_PER_APP_COMMANDS
+ [[ ps:retire == \p\s\:\r\e\b\u\i\l\d ]]
+ for allowed in $DOKKU_ACL_PER_APP_COMMANDS
+ [[ ps:retire == \p\s\:\r\e\s\t\a\r\t ]]
+ for allowed in $DOKKU_ACL_PER_APP_COMMANDS
+ [[ ps:retire == \p\s\:\s\t\o\p ]]
+ for allowed in $DOKKU_ACL_PER_APP_COMMANDS
+ [[ ps:retire == \p\s\:\s\t\a\r\t ]]
+ for allowed in $DOKKU_ACL_LINK_COMMANDS
+ [[ ps:retire == \r\e\d\i\s\:\l\o\g\s ]]
+ dokku_log_fail 'User default does not have permissions to run ps:retire'
+ declare 'desc=log fail formatter'
+ echo ' ! User default does not have permissions to run ps:retire'
! User default does not have permissions to run ps:retire
+ exit 1
+ return 1
+ dokku_log_fail 'Access denied'
+ declare 'desc=log fail formatter'
+ echo ' ! Access denied'
! Access denied
+ exit 1
Workaround
I noticed that when the commands were launched by systemd or crons the variables $NAME, $SSH_NAME and $SSH_USER were empty with the variable $USER equal to "dokku" but not in other cases (command launched by SSH).
So I added "dokku" in the variable $DOKKU_SUPER_USER and added a piece of code in /home/dokku/.dokkurc/acl that only in this case fill the variable $NAME by "dokku"
if [[ $USER == "dokku" && -z $NAME && -z $SSH_USER && -z $SSH_NAME ]]; then
export NAME="dokku"
fi
export DOKKU_SUPER_USER="dokku"
But I'm not sure if it opens the door to exploits and prevents another user from becoming a superuser.
This not only makes running commands manually much simpler, but removes some confusion around "dokku" / "default" user as the superuser (some places need both).
Fixesdokku-community#22Fixesdokku-community#36
Description of problem
After installing this plugin I noticed that all my backup crons created from the dokku-postgres/dokku-redis plugins and the systemd dokku-redeploy/dokku-retire services from dokku itself stopped working.
Steps to Reproduce
systemctl start dokku-retire
Actual Results
Error from
journalctl
logs for dokku-retire service :Expected Results
No error
Environment Information
dokku report
outputSee report
dokku acl:report
outputls -lah ~dokku/.dokkurc/
outputHow (deb/make/rpm) and where (AWS, VirtualBox, physical, etc.) was Dokku installed?:
Installed from AUR (Arch linux User Repository) on a physical machine.
PS: I'm the maintainer of the AUR package for dokku
Additional information
Output of failing Dokku commands after running
dokku trace on
See output
Workaround
I noticed that when the commands were launched by systemd or crons the variables $NAME, $SSH_NAME and $SSH_USER were empty with the variable $USER equal to "dokku" but not in other cases (command launched by SSH).
So I added "dokku" in the variable $DOKKU_SUPER_USER and added a piece of code in
/home/dokku/.dokkurc/acl
that only in this case fill the variable $NAME by "dokku"But I'm not sure if it opens the door to exploits and prevents another user from becoming a superuser.
Seems to be linked to #22
The text was updated successfully, but these errors were encountered: