You are not logged in.

Announcement

 Téléchargez la dernière version stable de GLPI      -     Et vous, que pouvez vous faire pour le projet GLPI ? :  Contribuer
 Download last stable version of GLPI                      -     What can you do for GLPI ? :  Contribute

#1 2011-02-05 01:22:55

jeauxbleaux
Member
Registered: 2010-02-09
Posts: 14

RESOLVED: mailgate autorun system lock

Greets.

I am showing the same syptoms as:

http://www.glpi-project.org/forum/viewt … p?id=22842

Home >Setup >Automatic actions>mailgate> Run frequency doesent work.

Run Frequency 5 min
Status: scheduled (with System Lock above the 'scheduled' box)
Run Period 0->24
Next Run Disabled-Execute.

Execute works fine.

Per remi via stepit (above link)

I´ve got an answer from remi:

Check if  glpi/file/_cron/mailgate.lock exists
Try to delete it.

However, there is no mailgate.lock:

[netmon ~]$ cd /usr/share/glpi/files/_cron/
[netmon _cron]$ ll
total 0
[netmon _cron]$ ls -la
total 16
drwxr-xr-x  2 apache apache 4096 Feb  3 17:17 .
drwxr-xr-x 12 apache apache 4096 Dec  1 15:35 ..
[netmon _cron]$

Nor is there a cron.log:

[netmon _log]$ pwd
/usr/share/glpi/files/_log
[netmon _log]$ ls -la
total 24
drwxr-xr-x  2 apache apache 4096 Nov 15 03:35 .
drwxr-xr-x 12 apache apache 4096 Dec  1 15:35 ..
-rw-r--r--  1 apache apache   80 Nov 15 03:35 remove.txt
[netmon _log]$

$ sudo crontab -u apache -e

*/1 * * * * /usr/bin/php /usr/share/glpi/front/cron.php &> /dev/null

$ ls -la /usr/bin/php ; ls -la /usr/share/glpi/front/cron.php
-rwxr-xr-x 1 root root 2711228 Nov 29 12:53 /usr/bin/php
-rw-r--r-- 1 apache apache 2984 Nov 15 03:35 /usr/share/glpi/front/cron.php

Any thoughts?

Thanks!

Last edited by jeauxbleaux (2011-02-11 03:03:31)

Offline

#2 2011-02-05 09:06:38

remi
GLPI-DEV
From: Champagne
Registered: 2007-04-28
Posts: 7,127
Website

Re: RESOLVED: mailgate autorun system lock

Which distro are you using ?
How have you install GLPI

what return /usr/bin/php -v (some distro have php and php5, so must then use php5)

the &>/dev/null remove the output. Try a

/usr/bin/php /usr/share/glpi/front/cron.php 

+

P.S. I don't understand
- why apache own /usr/share/glpi. This folder should be read-only (so own by root)
- why you have a "partial" FHS installation. If GLPI is in /usr/share/glpi (read only), flles should be in /var/lib/glpi (writable)


Dév. Fedora 29 - PHP 5.6/7.0/7.1/7.2/7.3/7.4 - MariaDB 10.3 - GLPI master
Certifié ITILv3 - RPM pour Fedora, RHEL et CentOS sur https://blog.remirepo.net/

Offline

#3 2011-02-10 23:13:45

jeauxbleaux
Member
Registered: 2010-02-09
Posts: 14

Re: RESOLVED: mailgate autorun system lock

I apologise for the delayed reply.

In examining my setup I figured out I had different remote shells for different machines, and got them confused.  I will start over again and follow up.

Offline

#4 2011-02-11 00:06:36

jeauxbleaux
Member
Registered: 2010-02-09
Posts: 14

Re: RESOLVED: mailgate autorun system lock

Here is how I did an update.  I restored the old and followed:

http://www.glpi-project.org/spip.php?article172

Performed backup of existing (really the old) system:

mysqldump -uroot -p glpi > glpi.sql

sudo tar cvzpf glpi.tar.gz /usr/share/glpi

Started with section

IIb: If you update from a GLPI version >=0.68 to higher (0.70 for example).

cd /usr/share/glpi
sudo tar xzvpf /usr/src/glpi-0.78.2.tar.gz

[snip]

glpi/inc/usercategory.class.php
glpi/inc/preference.class.php
glpi/inc/usertitle.class.php
glpi/inc/setup.function.php
glpi/inc/timer.class.php
glpi/inc/documenttype.class.php
glpi/inc/log.class.php
glpi/inc/printer.class.php
glpi/inc/filesystem.class.php
glpi/.htaccess

except that I see that it actually wrote to /usr/share/glpi/glpi, so

$ pwd
/usr/share/glpi/glpi
$ sudo mv * ..
mv: cannot move `ajax' to a subdirectory of itself, `../ajax'
mv: cannot move `config' to a subdirectory of itself, `../config'
mv: cannot move `files' to a subdirectory of itself, `../files'
mv: cannot move `front' to a subdirectory of itself, `../front'
mv: cannot move `inc' to a subdirectory of itself, `../inc'
mv: cannot move `install' to a subdirectory of itself, `../install'
mv: cannot move `lib' to a subdirectory of itself, `../lib'
mv: cannot move `locales' to a subdirectory of itself, `../locales'
mv: cannot move `pics' to a subdirectory of itself, `../pics'
mv: cannot move `plugins' to a subdirectory of itself, `../plugins'
mv: cannot move `scripts' to a subdirectory of itself, `../scripts'

oops.

$ cd /usr/share/glpi
$ pwd
/usr/share/glpi
$ sudo rm -rf glpi
$ 

$ pwd
/usr/share/glpi
$ ls
ajax           css    index.php     locales     plugins     status.php
CHANGELOG.txt  files  install       login.php   README.txt
config         front  lib           logout.php  script.js
COPYING.txt    inc    LISEZMOI.txt  pics        scripts


$cd ..
$pwd
/usr/share
$sudo tar vzxpf /usr/src/glpi-0.78.2.tar.gz 

[snip]
glpi/inc/preference.class.php
glpi/inc/usertitle.class.php
glpi/inc/setup.function.php
glpi/inc/timer.class.php
glpi/inc/documenttype.class.php
glpi/inc/log.class.php
glpi/inc/printer.class.php
glpi/inc/filesystem.class.php
glpi/.htaccess

OK, set permissions

$ sudo chown -R apache:apache /usr/share/glpi
$ ls -la
total 268
drwxr-xr-x  14 apache apache  4096 Jan 18 05:04 .
drwxr-xr-x 234 root   root   12288 Feb  3 12:28 ..
drwxr-xr-x   2 apache apache 12288 Jan 18 05:04 ajax
-rw-r--r--   1 apache apache    64 Jan 18 05:04 CHANGELOG.txt
drwxr-xr-x   2 apache apache  4096 Jan 18 05:04 config
-rw-r--r--   1 apache apache 18004 Jan 18 05:04 COPYING.txt
drwxr-xr-x   2 apache apache  4096 Jan 18 05:04 css
drwxr-xr-x  12 apache apache  4096 Jan 18 05:04 files
drwxr-xr-x   2 apache apache 20480 Jan 18 05:04 front
-rw-r--r--   1 apache apache   220 Jan 18 05:04 .htaccess
drwxr-xr-x   2 apache apache 20480 Jan 18 05:04 inc
-rw-r--r--   1 apache apache  5763 Jan 18 05:04 index.php
drwxr-xr-x   3 apache apache  4096 Jan 18 05:04 install
drwxr-xr-x  12 apache apache  4096 Jan 18 05:04 lib
-rw-r--r--   1 apache apache   145 Jan 18 05:04 LISEZMOI.txt
drwxr-xr-x   2 apache apache  4096 Jan 18 05:04 locales
-rw-r--r--   1 apache apache  3284 Jan 18 05:04 login.php
-rw-r--r--   1 apache apache  2411 Jan 18 05:04 logout.php
drwxr-xr-x   4 apache apache  4096 Jan 18 05:04 pics
drwxr-xr-x   4 apache apache  4096 Jan 18 05:04 plugins
-rw-r--r--   1 apache apache   122 Jan 18 05:04 README.txt
-rw-r--r--   1 apache apache 10350 Jan 18 05:04 script.js
drwxr-xr-x   2 apache apache  4096 Jan 18 05:04 scripts
-rw-r--r--   1 apache apache  3624 Jan 18 05:04 status.php
$

Confirm that files and config have apache write access - yes, (although should it be granted for apache group as well?)

Now go to webpage for setup.

http://netmon/glpi 

Goes to:

http://netmon/glpi/install/update.php

Proceeds nicely until

mysql -> update

localhost
user: glpi
password: **


GLPI SETUP

Update
Database connection successful
Update -> 0.78.2

Data migration (0 Sec(s))
0.78.2 drop unicity index for glpi_computers_items Error during the database updateCan't create table '#sql-614d_da68' (errno: 13)

and it goes no further.

What next?  And Thank you.

Last edited by jeauxbleaux (2011-02-11 00:46:36)

Offline

#5 2011-02-11 03:02:58

jeauxbleaux
Member
Registered: 2010-02-09
Posts: 14

Re: RESOLVED: mailgate autorun system lock

OK, got past that.  the u+x permission on the /var/lib/mysql/glpi  directory was not set.
And that seems to have resolved the original mailgate issue.

thanks!

Offline

Board footer

Powered by FluxBB