Installation where scripts run with different user name
Posted: Thu Aug 25, 2016 9:02 am
I'm trying to install CMSMS on a UNIX server which is set up in the following way:
[*] My user is crb11, in two groups: www-data and site-admin
[*] Scripts run as www-data, which is only in the www-data group.
[*] The main document root directory is owned by root with group site-admin.
This has the following consequences: if I install CMSMS via the install script, it creates its files as (generally) 644, which means I can't do anything to them (since I don't have the www-data password) and in particular can't update it as I would need to change permissions on config.php.
I tried copying the CMSMS files (so they go into my own name) and chgrp them to www-data. In this case the 2.1.5 upgrade fails at stage 7 saying it can't write to docroot. I don't understand how this can be, since it successfully wrote to docroot under a clean install.
What I've had to do for now is copy the CMSMS files into a subdirectory (so the root directory is www-data group). In this case things appear to work, but obviously when the update process creates new files they will be uneditable by me.
Some questions and thoughts:
1. This setup looks daft to me, and I'm trying to get it sorted out. Has anyone else faced similar problems and are there good workarounds?
2. Is there any way of running the CMS install script as a different user? It doesn't run from the command line alas.
3. Wordpress, which is officially supported on this server, does things differently. Its standard install script creates everything under my username (despite being run from the browser apparently identically). Is there anything we can learn from it?
At least the admins of a major university now know what CMSMS is!
[*] My user is crb11, in two groups: www-data and site-admin
[*] Scripts run as www-data, which is only in the www-data group.
[*] The main document root directory is owned by root with group site-admin.
This has the following consequences: if I install CMSMS via the install script, it creates its files as (generally) 644, which means I can't do anything to them (since I don't have the www-data password) and in particular can't update it as I would need to change permissions on config.php.
I tried copying the CMSMS files (so they go into my own name) and chgrp them to www-data. In this case the 2.1.5 upgrade fails at stage 7 saying it can't write to docroot. I don't understand how this can be, since it successfully wrote to docroot under a clean install.
What I've had to do for now is copy the CMSMS files into a subdirectory (so the root directory is www-data group). In this case things appear to work, but obviously when the update process creates new files they will be uneditable by me.
Some questions and thoughts:
1. This setup looks daft to me, and I'm trying to get it sorted out. Has anyone else faced similar problems and are there good workarounds?
2. Is there any way of running the CMS install script as a different user? It doesn't run from the command line alas.
3. Wordpress, which is officially supported on this server, does things differently. Its standard install script creates everything under my username (despite being run from the browser apparently identically). Is there anything we can learn from it?
At least the admins of a major university now know what CMSMS is!