dbsake icon indicating copy to clipboard operation
dbsake copied to clipboard

allow customizing sandbox system-user

Open abg opened this issue 9 years ago • 1 comments

Currently dbsake sandbox installs a sandbox owned by the user running the command. When running as root, this is similar to always enabling the SANDBOX_AS_ROOT option in mysql-sandbox. That is, the dbsake sandbox is owned by the root user, and mysqld runs at the root user. This is not ideal and should generally be avoided.

The first step here is to allow at least specifying a different system user and preserving permissions correctly. Some care should probably be taken to verify the specified user has access to the sandbox directory or bootstrapping will just fail spectacularly.

abg avatar Apr 09 '15 20:04 abg

You'll also need the my.sandbox.cnf to be at least group owned by the specified system user to load plugins:

As of MySQL 5.1.33, INSTALL PLUGIN causes the server to read option (my.cnf) files just as during server startup. This enables the plugin to pick up any relevant options from those files. It is possible to add plugin options to an option file even before loading a plugin (if the loose prefix is used). It is also possible to uninstall a plugin, edit my.cnf, and install the plugin again. Restarting the plugin this way enables it to the new option values without a server restart.

mikegriffin avatar Apr 09 '15 20:04 mikegriffin