gallery mustinstallation emebedded in a drupal multisite: can't see image in second installation - wrong dir owner

kikko_r
kikko_r's picture

Joined: 2007-10-25
Posts: 2
Posted: Thu, 2007-10-25 14:55

Hi everybody,
I've got problem with a multisite gallery2 installation in a multisite drupal (5.3) installation: some folders and files created by gallery2 are with apache user and group permission and I cant' change this: gallery doesn't work.
I'm running a drupal multisite on my virtual private server The site is on the web but not reachable. I have integrate gallery2 (with a multisite installation) on my www.mysite.ext. And every thing are ok.
I have try to integrate gallery2 in subsite.mysite.ext - the same installation- but I did't find the right way (if someone know how, let my know, please).
So i give up and try to do another gallery2 multisite installation for subsite.mysite.ext. And it work but I have a problem: i can'see the pictures.
I try to explain.

How i do:
I install the gallery core installation on www.mysite.ext/gallery2 (as suggested for drupal integration)

For the integration on www.mysite.ext
I create a gallery multisite installation in /mygallery/priorgallery/
Here I can find the /gdata/ dir and all the files geberate by gallery2.
I have put and installed the gallery.module and tinyMce.module in /sites/default/modules.
And it work: navigation, upload, user sincronisation ecc. everything ok

For the integration on subsite.mysite.ext
I create a new gallery multisite installation in /mygallery/secondgallery/
I have put and installed the gallery.module and tinyMce.module in /sites/subsite.mysite.ext/modules/
I have configurate all and it seem to work: navigation, upload, user sincronisation ecc.
But something, in the second instalaltion, was wrong.

The trouble
I upload a picture o make an album (I can do normaly), but the images aren't shows. Gallery show me only the link.
The problem is: the second gallery multisite installation, inside the gdata_xxxxxxxxxx dir, create dir and files with apache user and apache group permissions. Also the uploaded pictures are under apache group, and for this reason they aren't show to the visitor.
I can't change the user propertor on the server, because gallery2, if I delete picture or albums give me error:

Quote:
Error (ERROR_PLATFORM_FAILURE) :
/var/www/vhosts/mysite.ext/httpdocs/mygallery/secondgallery/g2data_XXXXXXXXXX/locks/16
in modules/core/classes/FlockLockSystem.class at line 72 (gallerycoreapi::error)
in modules/core/classes/GalleryLockSystem.class at line 147 (flocklocksystem::_acquirelock)
in modules/core/classes/helpers/GalleryLockHelper_simple.class at line 176 (flocklocksystem::acquirewritelock)
in modules/core/classes/GalleryCoreApi.class at line 2193 (gallerylockhelper_simple::acquirewritelock)
in modules/core/classes/helpers/GalleryEntityHelper_medium.class at line 42 (gallerycoreapi::acquirewritelock)
in modules/core/classes/GalleryCoreApi.class at line 2271 (galleryentityhelper_medium::deleteentitybyid)
in modules/core/ItemDelete.inc at line 79 (gallerycoreapi::deleteentitybyid)
in main.php at line 231 (itemdeletecontroller::handlerequest)
in main.php at line 94
in modules/core/classes/GalleryEmbed.class at line 179
in /var/www/vhosts/mysite.ext/httpdocs/sites/subsite.mysite.ext/modules/gallery/gallery.module at line 215 (galleryembed::handlerequest)
in ??? at line 0
in /var/www/vhosts/mysite.ext/httpdocs/includes/menu.inc at line 418
in /var/www/vhosts/mysite.ext/httpdocs/index.php at line 15

Sorry for my english (I'm Italian), I hope to be clear enought.
Thanks

 
profix898

Joined: 2005-11-08
Posts: 135
Posted: Thu, 2007-10-25 16:13

You seem to face a mixture of different issues here. Lets try to solve this step-by-step ...

  • Disable URL Rewrite in both of your G2 installations. For multisite Drupal and multiple G2s its a little tricky to setup the rewrite rules correctly. Once everything else works correctly I will try to explain this to you in more details. However with URL Rewrite disabled you should get both instances to work as expected.
  • Do a 'chmod -R 777 g2data' on your g2data directories. This will ensure that the data storage (files/folder) are writable by your webserver. Its not a problem if the files are created by the apache process (actually its normal behavior). You should still be able to access the files as they are created with a 0644 mask.

What version of gallery.module are you using?

 
kikko_r
kikko_r's picture

Joined: 2007-10-25
Posts: 2
Posted: Thu, 2007-10-25 17:25

Thanks, profix898, but...

I have disable the rewrite rules, as you suggest, in both installation. For the second one (subsite.mysite.ext) nothing is changed, the pictures are still not visible in the gallery. In the first installation (www.mysite.ext) after disable the rewrite module, the pictures in the gallery (both tumbnail and medium size), disappear, remain just the title. A curious note: i can't see the image in the gallery, but i can see if i go in a post with the tumbnail. But If I click on, give me page not found (I can't reach the image).
If I able again the rewrite module they appears again.

I think you are right when you told about the file user permission: in the first G2 installation create apache user and group files and directory...

The g2data_xxxxxxxxxxx directory are 777, at the moment. But is not so dangeurous, one time the site in reaceable in the web?

The gallery.module is the 5.x-1.0
If you need more information, tell me.