You are not logged in.
Pages: 1
Hi,
I'm not sure when it started, but I just tried to access a ticket from last year, and access a document associated to the ticket. I get a File Not Found error against 2 of the 4 documents on that ticket.
I'm trying to look through /glpi/files/ for the filename but can't find it. I think that the format of the file-system names changed at some point as there are, for example under ZIP, english-filenames under glpi/files/ZIP but then also 2-letter folder names and long number names.
How do I check whats happened to these files? As far as I know theres been no file corruption.
GLPI 0.83.91/CENTOS5 - OCS 1.01/Win2003
Offline
Ok, more serious than I thought...
I just sent an email reply to a ticket, including an image. The helpdesk took the email text and added it as an Follow-up, but also took the image and put that as a document, however, when I click the document link, I get an error:
File is altered (bad checksum)
I've checked the O/S filesystem level, and its all owned apache:apache
Anyone else seeing this ?
GLPI 0.83.91/CENTOS5 - OCS 1.01/Win2003
Offline
Can you view the document via FTP? That way you can be sure the file itself isn't altered/corrupt. Then you can limit the issue to how GLPI is pulling up the image.
Thanks,
Dan
Offline
First thing I need to know, is which file on the server does it refer to..
Folder layout looks odd.. for some reason root owns some, and apache owns others... I might try a backup and a perms reset
drwxr-x--- 2 apache apache 4096 Apr 19 03:36 08
drwxr-xr-x 2 root root 4096 Aug 31 15:52 0d
drwxr-xr-x 2 apache apache 4096 Jul 13 11:56 16
drwxr-x--- 2 root root 4096 Mar 30 17:42 17
drwxr-x--- 2 root root 4096 Apr 13 14:28 1f
drwxr-x--- 2 root root 4096 Mar 6 13:00 20
drwxr-x--- 2 apache apache 4096 May 28 09:56 35
drwxr-x--- 2 apache apache 4096 Jan 18 2012 36
drwxr-x--- 2 root root 4096 Nov 10 2011 57
drwxr-x--- 2 apache apache 4096 Nov 10 2011 5d
drwxr-x--- 2 root root 4096 Feb 24 2012 5f
drwxr-x--- 2 apache apache 4096 Mar 24 2011 63
drwxr-x--- 2 root root 4096 Nov 4 2011 64
drwxr-x--- 2 apache apache 4096 Sep 27 2011 76
drwxr-x--- 2 root root 4096 Jul 2 11:34 80
drwxr-xr-x 2 apache apache 4096 Jul 26 16:36 85
drwxr-x--- 2 apache apache 4096 Sep 27 2011 88
drwxr-x--- 2 apache apache 4096 Oct 10 2011 8c
drwxr-x--- 2 root root 4096 Nov 4 2011 8e
drwxr-x--- 2 apache apache 4096 Jun 19 14:50 8f
drwxr-x--- 2 apache apache 4096 Dec 29 2011 95
drwxr-x--- 2 root root 4096 Nov 4 2011 99
drwxr-x--- 2 apache apache 4096 Jul 23 13:57 9b
drwxr-x--- 2 apache apache 4096 Apr 16 10:09 9e
drwxr-x--- 2 apache apache 4096 Sep 20 2011 9f
drwxr-x--- 2 apache apache 4096 Oct 10 2011 aa
drwxr-x--- 2 root root 4096 Nov 4 2011 b0
drwxr-x--- 2 apache apache 4096 Sep 27 2011 b6
drwxr-x--- 2 apache apache 4096 Sep 27 2011 c3
drwxr-xr-x 2 apache apache 4096 Aug 7 15:21 cf
drwxr-x--- 2 apache apache 4096 Jan 27 2012 d0
drwxr-x--- 2 root root 4096 Mar 14 11:46 da
drwxr-x--- 2 apache apache 4096 Oct 19 2011 ec
drwxr-x--- 2 apache apache 4096 Jun 6 04:14 ed
drwxr-x--- 2 apache apache 4096 Mar 26 04:29 f5
drwxr-x--- 2 apache apache 4096 Sep 27 2011 f8
-rw-r----- 1 apache apache 18950 Mar 2 2011 image001.png
-rw-r----- 1 apache apache 14921 Mar 2 2011 image002.png
-rw-r----- 1 apache apache 59077 Sep 26 2007 JIRA_error.PNG
-rw------- 1 apache apache 15746 Dec 16 2009 subversion_access_table.png
-rw-r----- 1 apache apache 17139 Sep 5 2007 svn_error.PNG
-rw------- 1 apache apache 1031760 Aug 9 2010 tracetool_error_message.png
GLPI 0.83.91/CENTOS5 - OCS 1.01/Win2003
Offline
hmmmm.
only thing I can think of.... my crontab is running as root, not as apache. I wonder if thats whats causing this.
How should the cron for GLPI be running ? as apache, or as root ?
GLPI 0.83.91/CENTOS5 - OCS 1.01/Win2003
Offline
ok... Here my test. I've submitted a html email with a s/shot in it.
GLPI says that two attachments have been made, URLs:
/glpi/front/document.send.php?docid=352&tickets_id=5464 and
/glpi/front/document.send.php?docid=420&tickets_id=5464
looking up 353 and 420 in the glpi_documents table via MySql Admin, I can see the file references:
352: GIF/ef/d0f8f28ed78005fb002e8ff02b5c3ca9058823.GIF
420: PNG/63/3f3324d793c6181fd69add74fa00f1f76e0174.PNG
When I look at those perms I get:
-rw-r----- 1 root root 5907 Mar 26 13:41 GIF/ef/d0f8f28ed78005fb002e8ff02b5c3ca9058823.GIF
and
-rw-r--r-- 1 root root 126180 Sep 3 15:25 PNG/63/3f3324d793c6181fd69add74fa00f1f76e0174.PNG
As apache is my GLPI user, that explains why it can't access the first one.
A quick test of chown -R apache GIF/ef, and now I can see the GIF (first one).
So - I'm betting that its mailgate running from root via cron thats my problem.
I think running an owner reset on the whole of the GLPI folder will fix existing issues, but, what am I supposed to run mailgate as ??
GLPI 0.83.91/CENTOS5 - OCS 1.01/Win2003
Offline
ok....
I found a section in the wiki about running the cron job as the web user. I've moved the cron job over using:
crontab -u apache -e
Watching the cron.log I can see it still "processing". I'll have to monitor to see if theres any issues.
I've also run a chown -R apache:apache on the glpi folder to reset all the perms.
GLPI 0.83.91/CENTOS5 - OCS 1.01/Win2003
Offline
Thinking on this... it wouldn't be a bad check to have this in the install/update checks scripts, at least to highlight the cron is missing or not configured as the right user (aka the same as the web account).
GLPI 0.83.91/CENTOS5 - OCS 1.01/Win2003
Offline
Pages: 1