Page 1 of 1
Unable to find valid 'su' syntax
Posted: Tue Aug 26, 2008 4:57 pm
by ioclaudio
Hi all,
I've installed ZoneMinder 1.23.3 on an Ubuntu server.
But if I try to start the system clicking on Stopped-->ZoneMinder - Run State-->Apply the server doesn't start and in the syslog file I can see this error:
Aug 26 18:34:11 argo zmpkg[21181]: INF [Command: start]
Aug 26 18:34:11 argo zmpkg[21181]: ERR [Unable to find valid 'su' syntax 'su root -c 'true'' ]
To show better the message error I have modified the line 304 of the file zmpkg.pl from
Error( "Unable to find valid 'su' syntax \n" );
to
Error( "Unable to find valid 'su' syntax '$command' \n" );
Which is the problem according to you?
c.
Posted: Tue Aug 26, 2008 5:05 pm
by cordel
Do you have sudo installed?
Posted: Tue Aug 26, 2008 5:16 pm
by ioclaudio
cordel wrote:Do you have sudo installed?
Yes, I have.
claudio@argo:/var/www$ dpkg -l sudo
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-f/Unpacked/Failed-cfg/Half-inst/t-aWait/T-pend
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Nome Versione Descrizione
+++-=================================-=================================-==================================================================================
ii sudo 1.6.9p10-1ubuntu3.2 Provide limited super user privileges to specific users
c.
Posted: Tue Aug 26, 2008 5:33 pm
by cordel
Oops, I missed the part in your error.
It's invalid to su to root.
You have to configure zm to run as your Apache user as described in the documentation.
Posted: Thu Aug 28, 2008 3:21 pm
by ioclaudio
Yes, thank you, running zm with the apache user (www-data) it starts.
c.
Posted: Mon Sep 15, 2008 3:36 pm
by maumar
sorry claudio, i am not able to find in docs how to configure zm to run as your Apache user
i have your same issue Unable to find valid 'su' syntax
byez
Maurizio
Posted: Mon Sep 15, 2008 4:16 pm
by ioclaudio
It is an option of the configure utility.
./configure --with-webdir=... --with-cgidir=... --with-webuser=www-data --with-webgroup=www-data
I remember well these data are written in the file zm.conf, but now I haven't the pc with ZM installed and I can't check it.
cld
Posted: Mon Sep 15, 2008 4:22 pm
by maumar
i have already used them with no luck
they say only that apache wil run with user apache and group apache
they do not tell to zm how it should run as
my /usr/local/etc/zm.conf is :
# Current version of ZoneMinder
ZM_VERSION=1.23.3
# Path to build directory, used mostly for finding DB upgrade scripts
ZM_PATH_BUILD=/root/ZoneMinder-1.23.3
# Build time, used to record when to trigger various checks
ZM_TIME_BUILD=1221493562
# Path to ZoneMinder binaries
ZM_PATH_BIN=/usr/local/bin
# Path to ZoneMinder libraries (none at present, for future use)
ZM_PATH_LIB=/usr/local/lib
# Path to ZoneMinder configuration (this file only at present)
ZM_PATH_CONF=/usr/local/etc
# Path to ZoneMinder web files
ZM_PATH_WEB=/var/www/html/zm
# Path to ZoneMinder cgi files
ZM_PATH_CGI=/var/www/cgi-bin
# Username and group that web daemon (httpd/apache) runs as
ZM_WEB_USER=apache
ZM_WEB_GROUP=apache
# ZoneMinder database hostname or ip address
ZM_DB_HOST=localhost
# ZoneMinder database name
ZM_DB_NAME=zm
# ZoneMinder database user
ZM_DB_USER=zmuser
# ZoneMinder database password
ZM_DB_PASS=zmpass
as u see:
# Username and group that web daemon (httpd/apache) runs as
ZM_WEB_USER=apache
ZM_WEB_GROUP=apache
is is not enough to avoid:
Sep 15 17:52:53 elastix zmpkg[26151]: INF [Command: start]
Sep 15 17:52:55 elastix zmpkg[26151]: ERR [Unable to find valid 'su' syntax]
Posted: Tue Sep 16, 2008 2:37 am
by maumar
Claudio,
i was completely wrong, i am using an elastix box and httpd runs as asterisk user, reading zmpkg.pl has lighted me
using asterisk user as ZM_WEB_USER and ZM_WEB_GROUP fixed the issue
thnx