View Issue Details

IDProjectCategoryView StatusLast Update
0000161MyEnv InstallerGeneralpublic2018-02-01 09:19
Reporterjoerg Assigned Tooli  
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
PlatformIndependentOSn.a.OS Versionall
Product Version1.3.1 
Target Version2.0.0Fixed in Version2.0.0 
Summary0000161: Myenv installer continues even if config file could not be stored
DescriptionFollowing the instructions, the myenv installer is run using a non-privileged account. Eventually, the installer wants to write a config file for a MySQL instance, and the proposed locations include "/etc".
However, typically the user has no write permissions there, causing a result like this:

  Choose location of my.cnf:
  Example: /etc/my.cnf /etc/mysql/my.cnf /var/lib/mysql/data/mysqld-5622/my-3307.cnf [/var/lib/mysql/data/mysqld-5622/my.cnf]
  my.cnf = /etc/my-5622.cnf

  INFO: There is no such file /etc/my-5622.cnf yet.
  Creating file /etc/my-5622.cnf
  ERROR: Writing to file /etc/my-5622.cnf failed (rc=506)
  ERROR: fopen(/etc/my-5622.cnf): failed to open stream: Permission denied

  The following instances are available:

  mysqld-5622
  An instance is the same as a mysqld process.

Sadly, the installer continues, but the to-be-stored file is lost.

After noticing the issue, I decided to run the installer again.
I tried to provide a writable config file:

  sudo touch /etc/my-5622.cnf
  sudo chmod a+rw /etc/my-5622.cnf

I ran the installer, telling to "c"hange the instance and giving the same values as before.
However, the output look like it didn't even attempt to write the file:

  Choose location of my.cnf:
  Example: /etc/my.cnf /etc/mysql/my.cnf /var/lib/mysql/data/mysqld-5622/my-3307.cnf /var/lib/mysql/data/mysqld-5622/my.cnf [/etc/my-5622.cnf]
  my.cnf = /etc/my-5622.cnf

  The following instances are available:

Again. no file was generated.

Only by using a different path did I succeed:

  Choose location of my.cnf:
  Example: /etc/my.cnf /etc/mysql/my.cnf /var/lib/mysql/data/mysqld-5622/my-3307.cnf /var/lib/mysql/data/mysqld-5622/my.cnf [/etc/my-5622.cnf]
  my.cnf = /var/lib/mysql/data/mysqld-5622/my.cnf

  INFO: There is no such file /var/lib/mysql/data/mysqld-5622/my.cnf yet.
  Creating file /var/lib/mysql/data/mysqld-5622/my.cnf

  The following instances are available:

IMO, this needs two fixes:
1) If writing the file fails, this should be considered fatal. At least, a prominent error message is needed, better yet a proposal how to fix it.
2) Even if nothing is changed, the file should be generated, especially if it doesn't exist (what the tool seems not to check at all).
Steps To ReproduceFollow the instructions and run the installation as an unprivileged user.
TagsNo tags attached.

Activities

oli

2018-02-01 09:19

developer   ~0000162

Is fixed in rev942 and will come to v2.0

Issue History

Date Modified Username Field Change
2014-12-02 16:26 joerg New Issue
2014-12-02 16:26 joerg Status new => assigned
2014-12-02 16:26 joerg Assigned To => oli
2018-02-01 09:19 oli Reproducibility have not tried => always
2018-02-01 09:19 oli Status assigned => resolved
2018-02-01 09:19 oli Resolution open => fixed
2018-02-01 09:19 oli Product Version 1.2.0 => 1.3.1
2018-02-01 09:19 oli Fixed in Version => 2.0.0
2018-02-01 09:19 oli Target Version => 2.0.0
2018-02-01 09:19 oli Note Added: 0000162