[horde] horde webmail created files permissions problem

Rolf Deenen rdeenen at home.nl
Tue Jul 14 19:50:21 UTC 2009


Dear list,

First of all let me begin by saying I am sorry that the following problem-description is so long. I have been unable to make it shorter without leaving possible important details out...

About a month ago I updated my Debian home-server from Etch to Lenny (so, debian version 4 to debian version 5). I exported all data like contacts, notes ,etc of my previous horde installation (I am the only user) since I went from Postgresql to MySQL. This because of the abbundancy software that supports MySQL. Then I did a complete clean install of Horde groupware webmail-edition. I downloaded and installed version 1.2.3 . Most of it runs OK after configuring but i have some strange issues whenever up- or downloading files is happening. 

1.) FILES ON LOCAL SYSTEM AS VFS DOESN'T WORK
When I set the Virtual File Storage to "Files on the local system", point it at a specified directory (/home/www/hordevfs) and make sure the webserver can access this directory I am unable to attach files to an e-mail. I get an error: "Unable to create VFS directory." . When I upload a file I watch the filesystem (with the utility "iwatch") . I see nothing happens in the directory specified in the config, but I do some something happening in /tmp (file created and deleted). If I set the Virtual File Storage to "SQL" the problem disappears. The apache2 webserver runs as the user "www-data", member of the group "www-data".

drwxrwx---  3 www-data www-data 4096 2009-07-14 14:04 hordevfs

I noticed a directory /home/www/hordevfs/.horde , which i did not create, but which apparently horde was able to create:

d--------- 2 www-data www-data 4096 2009-07-14 14:04 .horde

2. CAN'T DOWNLOAD FILES FROM GOLLEM
I installed Gollem. I use the SSH2 backend. I can browse directories, create and delete directories, and since i patched according to bug with ticket #8323 I am also able to upload files. Downloading however is a problem. When i click on the "download" icon of a file (or on the file itself) I again see stuff happening in /tmp but i don't get the download. I do notice by this time a lot of files in /tmp with no access rights like this: (not a complete list)

drwxrwxrwt root     root     4096  2009-07-14 15:20 .
drwxr-xr-x root     root     4096  2009-07-14 15:20 ..
---------- www-data www-data 31304 2009-07-14 14:19 Horde36Sa4o
---------- www-data www-data 0     2009-07-11 00:09 Horde_form_vCrORu
---------- www-data www-data 0     2009-07-10 11:38 impattONhIpL
....

3. ANSEL CAN'T ACCESS IT'S OWN CREATED CONFIG FILE
I also installed "Ansel" when i try to create a config file for the application from the horde interface, a configuration file does get created in /home/www/html/horde123/ansel/config but, like the tempfiles above, without permissions:

---------- 1 www-data www-data 1111 2009-07-14 14:14 conf.php

4. ANSEL CAN'T UPLOAD PHOTOS
After giving the appropriate permissions to the file (chmod 770 conf.php) and also to prefs.php and styles.php I can run Ansel. I do have the same error there: I can create galleries but am unable to populate them. This time I get an error:

WARNING:  file_get_contents(/tmp/HordeByDMk3) [function.file-get-contents[1]]: failed to open stream: Permission denied in /HOME/WWW/HTML/HORDE123/ANSEL/IMG/UPLOAD.PHP on line 175

WARNING:  getimagesize(/tmp/HordeByDMk3) [function.getimagesize[2]]: failed to open stream: Permission denied in /HOME/WWW/HTML/HORDE123/ANSEL/IMG/UPLOAD.PHP on line 179

WARNING: Cannot modify header information - headers already sentby (output started at /home/www/html/horde123/ansel/img/upload.php:175) in /HOME/WWW/HTML/HORDE123/ANSEL/IMG/UPLOAD.PHP on line 237

Again, a lot of activity in /tmp according to "iwatch".

I have no idea whether these problems are an error in Horde or in my Apache/PHP setup or the combiation. They all seem to root in an issue with creating files with insufficient access-rights. I have tried a lot of different combination of settings in horde and in php.ini, but the problems persist and it doesn't seem to make a different what settings I use. Particular I checked conf[$umask] and set it repeatedly to "0777" but alas, no changes. The "test.php" scripts i found in the several directories al turn out ok. Some warnings about some functionality not working because libraries are missing and such, but no errors. It's probably something stupid somewhere, but i can't find it. Hope someone can point me in correct direction...

regards,
Rolf Deenen

PS. On my previous horde installation I never got to get Ansel and Gollem working also, so it's not like i'm worse of then before...



Links:
------
[1] /horde123/ansel/img/function.file-get-contents
[2] /horde123/ansel/img/function.getimagesize


More information about the horde mailing list