I have successfully completed a ?make? of ZoneMinder 1.19.5. I now am attempting to install as shown:
linux:/usr/local/zm-1.19.5 # make install
In two places in the install, the following error is displayed:
chown: `apache:apache': invalid user
According to YaST - I have Apache2 already installed and enabled ? I don't know if that means I need to change the call to chown to 'apache2:apache' or something like that. I am running SuSE Pro 9.2. PLEASE HELP!
You need to check which user your apache daemon is running as. The simplest way is probably with ps but I expect there are more elegant ways to find out. I don't know enough about SUSE to be more specific. You will probably need to rerun configure and all the steps thereafter if it's not apache:apache as you have used already.
Is there any reason for anything other than the events directory tree to be owned by the id being used to run zoneminder, and can zoneminder run under an id that is not the same as the webserver's, or does that break stuff? (My suspiscion is that the need to access shared memory is what constrains this?)
Possibly not. It's just very fiddly trying to figure what can and can't be owned and/or accessed by what. I'm quite prepared to accept that this area might be open to rationalisation. The problem as I see it is that as ZM installs system binaries that (probably) need to be owned by root (to access and chmod devices etc) and the web stuff is best not owned by root so who should own it? I plumped for the web user but it could probably be any other non-privileged user I guess.
I'm not sure I completely understand the previous two posts, but as I understand it, the Apache daemon must own the source files, and thus the chown commands that are failing are attempting to give the Apache Daemon the privileges for this.
However I still am unskilled enough to be able to determine which user my Apache Daemon is running as. I have found the existence of the script that launches the Apache2 Daemon in the /etc/init.d/ folder, but I am having trouble finding this info. ?ps -A? produces a long list, but Apache or Apache2 is not listed. I apologize for being a pain, but I am a little lost here.
The start-up/shutdown script runs as root, and deals with the business of setting the correct process ownership for the running processes.
The webserver and zoneminder daemons should not run as root.
The ID that is used for the webserver and daemons needs to be able to write to the events directory tree and to update the database.
The ID that is used to run the webserver should not be able to modify any of the executables.
I addressed it like this:
All the executables and PHP code are owned by root:root.
All files in the zoneminder DocumentRoot directory have permissions 644.
All executables in cgi-bin and bin have permissions 755. None of them apart from zmfix (which is only needed once anyway, and can then be disabled) seems to be suid (which is good). Ideally anything containing passwords wouldn't be world-readable. I've not yet experimented with 711 permission on the executable stuff, though.
The events, images, sounds and temp sub-directories are owned by the webserver/zoneminder ID.