From: Peter Laursen [mailto:peter_laursen@webyog.com] Sent: Monday, October 19, 2009 10:35 PM To: Vladislav Vaintroub Cc: Sergey Petrunya; Henrik Ingo; maria-developers@lists.launchpad.net Subject: Re: [Maria-developers] Windows installer, part 2
I am only trying to get attention to what may happen if 3 conditions are met: 1) UAC is ON 2) server is installed to program files 3) server is sometimes started as a service and sometimes as a user program
In normal mysql it looks like this: the datadir directory that is created as part of installation has following ACLs: CreatorOwner (SYSTEM),Administrators = Full Control Users = Read Only. With ACLs set like this it is impossible to run the program without admin account, and additionally to run the program in user session you need elevation. There is no UAC/elevation for services, so services run but again only under administrative account. One way to resolve this is user to create user mysqluser, group mysql, add the user who installs MySQL to the group and set the ACLs on the datadir so that group has full control. This is what I'm preaching all the time, I have tested this scenario and it works fine and there is no need for elevation. It is probably another way to get this running and escape the need of elevation, but I'm not aware about it (I'm pretty sure no one wants to give every user read/write on this directory, as was suggested here http://bugs.mysql.com/bug.php?id=38373 ) The above would of course apply to MariaDB as well.
I am still awaiting comments to my outline of how work on an installer could be started earlier in this thread.
I would perhaps be a bit more careful the about the early choice of NSIS as the installer tool. I admit being quite uninformed about NSIS and I never used it myself, but my impression after reading about NSIS was that it is great for copying files and everything that goes beyond copying is not trivial (maybe with the exception of starting an exe) . Everything else is done with crude Win32 API scripting, or with one of the numerous non-standard plugins. Again, it was just an impression after reading about it and not the fact of life. Please correct me if I'm wrong here. Also, is that it is a custom exe installer and it is not the standard recommended by OS vendor (MSI is standard). Have you thought about using WiX?