plegall / Piwigo-virtualize

5 stars 4 forks source link

Permission error #1

Open plegall opened 9 years ago

plegall commented 9 years ago

Reported by jc on 2 Feb 2015 13:39

Version: 2.7.3

It says This plugin moves all your photos from "galleries" ... to "upload"... but sometimes it is not possible. For example when i copy albums from my G2 installation to galleries, dirs have 0755 and files 0644 unix permissions with me (not apache) as owner. When i click to "Start virtualization", albums are marked as virtual (admin home says i have all virtual) but stays in galleries folder. There is permission error in apache log:

[Mon Feb 02 14:14:48 2015] [error] [client IP] PHP Warning: rename(./galleries/dir/file.jpg,./upload/2012/11/28/20121128154417-6f903d46.jpg): Permission denied in /.../plugins/virtualize/admin.php on line 71, referer: http://URL/admin.php?page=plugin&section=virtualize%2Fadmin.php

There is NO error in admin GUI. Gallery works with some bad thumbnails and albums are half-virtualized.

So i suggest:

Show information about required permission to galleries folder on admin.php?page=plugin&section=virtualize

Test permission while migrate and don't do anything before it is sorted out.
samwilson commented 6 years ago

I get a double warning with some files, even if they're world-read and -writable:

Warning: md5_file(./staging/2018-02-08/2018-02-08_0148.JPG): failed to open stream: Permission denied in plugins/virtualize/admin.php on line 57

Warning: rename(./staging/2018-02-08/2018-02-08_0148.JPG,./upload/2018/04/14/20180414200016-.JPG): Permission denied in plugins/virtualize/admin.php on line 71

It only worked correctly once I changed the files' group to be that of the webserver user (i.e. me as the owner, www-data as the group, with all permissions set on the latter).