Bug #75152 Fix permission and location of log files
Submitted: 9 Dec 2014 9:11 Modified: 9 Dec 2014 9:17
Reporter: Mats Kindahl Email Updates:
Status: Won't fix Impact on me:
Category:MySQL Fabric: Installation and Configuration Severity:S3 (Non-critical)
Version:1.5.2 OS:Any
Assigned to: Assigned Account CPU Architecture:Any

[9 Dec 2014 9:11] Mats Kindahl
The location of log files are in /var/log but the normal permissions for /var/log is root permissions. This means that a MySQL Fabric daemon would have to run under root permissions to be able to create files in that directory.

In addition, if a MySQL Fabric node is started and it do not have write permissions to the directory, a slightly odd error is reported.

  $ mysqlfabric manage start --daemonize
  Error reading configuration file: [Errno 13] Permission denied: '/var/log/fabric.log'

How to repeat:
Install MySQL Fabric and try to start it as a daemon.

Suggested fix:
Put the log file in the directory /var/log/mysql so that separate permissions can be assigned to the directory where the log files are located.

Add checks on startup that the log file is writable and the configuration file is readable and print sensible error messages if they are wrong.

When installing from source, ensure that the /var/log/mysql directory is created with the right owner and privileges.
[6 Dec 2016 18:55] Vincent Poore
Please also note that the daemonize option will cause the current working directory of the daemon to be /.  I found this to be an issue when running the server clone command.  It produced an error because the .sql file produced by mysqldump could not be created in /.

mysqlfabric manage start --daemonize
pgrep -fl mysqlfabric
62834 /usr/bin/python /usr/bin/mysqlfabric manage start --daemonize
ls -l /proc/62834/cwd
lrwxrwxrwx 1 mysql mysql 0 Dec  6 11:49 /proc/62834/cwd -> /

Is there a way to control this destination other than cwd of daemon?
[6 Jul 2017 19:19] Bugs System
Status updated to 'Won't fix' (Fabric is now covered under Oracle Lifetime Sustaining Support)