I’ve installed Lucee (as Railo) some years back on my Mac development
machine, and then subsequently updated the jars. Since it was simply a
local dev install, security not a priority, I went ahead and installed it
to run under root, as suggested by the installer.
Now I need to change the user Lucee runs under to be something other than
root, and I don’t find instructions how to do this on a Mac. I’ve searched
the startup.sh and catalina.sh scripts for a run under this user setting,
but I haven’t found anything.
There are instructions here for Linux:
… but they don’t seem to apply to a Mac. I don’t find the change-user.sh
script on my Mac install, and and am almost 100% sure, from looking through
the code, that it won’t work if I run it. Mac startup and shutdown is
controlled from another script.
I’ve tried placing the following in setenv.sh
TOMCAT_OWNER=“nando”;
export TOMCAT_OWNER;
but that didn’t seem to work for me. Lucee is still running under root
after stopping and restarting …
Any help would be greatly appreciated.
Nando
Aria Media Sagl
Via Rompada 40
6987 Caslano
Switzerland
I am working on a post about something else, but I will post a script to
start and stop lucee (tomcat) as non-root this weekend.On May 29, 2015 3:23 AM, “Nando Breiter” <@Nando_Breiter> wrote:
I’ve installed Lucee (as Railo) some years back on my Mac development
machine, and then subsequently updated the jars. Since it was simply a
local dev install, security not a priority, I went ahead and installed it
to run under root, as suggested by the installer.
Now I need to change the user Lucee runs under to be something other than
root, and I don’t find instructions how to do this on a Mac. I’ve searched
the startup.sh and catalina.sh scripts for a run under this user
setting, but I haven’t found anything.
… but they don’t seem to apply to a Mac. I don’t find the change-user.sh
script on my Mac install, and and am almost 100% sure, from looking through
the code, that it won’t work if I run it. Mac startup and shutdown is
controlled from another script.
I’ve tried placing the following in setenv.sh
TOMCAT_OWNER=“nando”;
export TOMCAT_OWNER;
but that didn’t seem to work for me. Lucee is still running under root
after stopping and restarting …
Any help would be greatly appreciated.
Nando
Aria Media Sagl
Via Rompada 40
6987 Caslano
Switzerland
Run the lucee-ctl script as yourself, and select the “install-tomcat”
option-- it will set it up to automatically start under your user name.
First try the “start-foreground” option, I reckon, to be sure it’ll run.
If you choose the install-tomcat option it will auto-start on reboot.
The install script that lucee-ctl runs is under bin/daemon, it should
work for OS X and Linux (look at the Darwin stuff to see how it does the
Mac bits).
After install, “launchctl stop lucee-tomcat” stops it, and then
“launchctl start lucee-tomcat” starts it, etc. (see launchctl docs for
more info), and you can remove the launchctl stuff with lucee-ctl.
-DenOn 5/29/15 7:52 AM, Robert Munn wrote:
I am working on a post about something else, but I will post a script to
start and stop lucee (tomcat) as non-root this weekend.
For anyone else interested in this approach, I have written an updated Lucee/Nginx start/stop script that allows you to specify a username to use as the Tomcat process user. It also provides a default username for convenience. I’ve tested it with both my own username and a non-privileged username.
Robert> On May 31, 2015, at 6:36 AM, Nando Breiter <@Nando_Breiter> wrote:
Thanks Denny,
I wound up following your suggestion and re-installing Lucee. The only caveat - I needed to delete existing WEB-INF directories that Lucee had generated as root, because apparently, Lucee running as a non-privileged user did not have proper access to them. Changing the permissions on this these directories might have also worked, but lacking accurate information, deleting them turned out to be easier …
Aria Media Sagl
Via Rompada 40
6987 Caslano
Switzerland
Run the lucee-ctl script as yourself, and select the “install-tomcat”
option-- it will set it up to automatically start under your user name.
First try the “start-foreground” option, I reckon, to be sure it’ll run.
If you choose the install-tomcat option it will auto-start on reboot.
The install script that lucee-ctl runs is under bin/daemon, it should
work for OS X and Linux (look at the Darwin stuff to see how it does the
Mac bits).
After install, “launchctl stop lucee-tomcat” stops it, and then
“launchctl start lucee-tomcat” starts it, etc. (see launchctl docs for
more info), and you can remove the launchctl stuff with lucee-ctl.
-Den
On 5/29/15 7:52 AM, Robert Munn wrote:
I am working on a post about something else, but I will post a script to
start and stop lucee (tomcat) as non-root this weekend.
I wound up following your suggestion and re-installing Lucee. The only
caveat - I needed to delete existing WEB-INF directories that Lucee had
generated as root, because apparently, Lucee running as a non-privileged
user did not have proper access to them. Changing the permissions on this
these directories might have also worked, but lacking accurate information,
deleting them turned out to be easier …
Aria Media Sagl
Via Rompada 40
6987 Caslano
Switzerland
Run the lucee-ctl script as yourself, and select the “install-tomcat”
option-- it will set it up to automatically start under your user name.
First try the “start-foreground” option, I reckon, to be sure it’ll run.
If you choose the install-tomcat option it will auto-start on reboot.
The install script that lucee-ctl runs is under bin/daemon, it should
work for OS X and Linux (look at the Darwin stuff to see how it does the
Mac bits).
After install, “launchctl stop lucee-tomcat” stops it, and then
“launchctl start lucee-tomcat” starts it, etc. (see launchctl docs for
more info), and you can remove the launchctl stuff with lucee-ctl.
-Den
On 5/29/15 7:52 AM, Robert Munn wrote:
I am working on a post about something else, but I will post a script to
start and stop lucee (tomcat) as non-root this weekend.