Announcement

#1 2021-04-10 14:15:55

martinis
Member
2013-07-02
31

PWG-ERROR-NO-FS error when adding photo but nothing is wrong

I am an experienced user of Piwigo (thanks for this great software) but have an odd problem.
Current installation:

    Piwigo 11.4.0 Check for upgrade
    Operating system: Linux
    PHP: 7.3.27-1~deb10u1 (Show info) [2021-04-10 12:36:55]
    MySQL: 5.5.5-10.3.27-MariaDB-0+deb10u1 [2021-04-10 12:36:55]
    Graphics Library: GD 2.2.5

I use the FTP and synchronisation method for adding photos. I have tried to put a photo in an existing directory, which has been used in the past (last time was some 2 months ago) for synchronisation with no problems.
The name of the directory is ./galleries/physical-albums/people/groups. When the 'only perform a simulation' button is ticked (I always do this first, then I get no error messages. When I untick it, then on screen I get the following:

Search for new images in the directories

    0 albums added in the database
    1 photos added in the database
    0 albums deleted in the database
    0 photos deleted from the database
    3202 photos updated in the database
    0 errors during synchronization

Metadata synchronization results

    0 photos' information synchronized with files metadata
    1 photos candidates for metadata synchronization
    Metadata used : filesize, width, height, date_creation, latitude, longitude, keywords, author, name, comment

List of errors

    [./galleries/physical-albums/people/`groups`/IMG_0306.jpg] PWG-ERROR-NO-FS (File/directory read error)

Errors legends

    PWG-UPDATE-1: The name of directories and files must comprise only letters, numbers, "-", "_" or "."
    PWG-ERROR-NO-FS: The file or directory cannot be accessed (either it does not exist or the access is denied)

Detailed information

    [./galleries/physical-albums/people/groups/IMG_0306.jpg] added

The odd problem is why back ticks (or `) are inserted around 'groups' when this has always been a valid directory and I never use this character. I can find nothing wrong with either my file name or permissions. If one looks at the batch manager to see photos recently added, then it is again clear that there is a problem. No photo appears and there is a message in the space where it should be:

Batch Manager shows:

No photos selected, 22 photos in current set

    IMG_0306.jpg Warning: getimagesize(././galleries/physical-albums/people/`groups`/IMG_0306.jpg): failed to open stream: No such file or directory in /mnt/Seagate/srv/http/piwigo2/include/derivative.inc.php on line 146

Obviously it is looking for a photo in a directory which does not exist.

Looking at the MySql database directly, I can see there is a new entry for the photo (which is mainly NULLs) and the 'PATH' column for this photo  is: ./galleries/physical-albums/people/`groups`/IMG_0306.jpg

I have tested a few things to track the problem down, but without success. Points to note:

1. Synchronising photos from this directory has worked before.
2. It is not a permissions issue, as I also have a public copy of the installation of a shared hosted server, and the same problem occurs. I can also see the permissions are fine.
3. It is not due to the image itself, as it will load perfectly if I put it in another new sub directory and synchronize. (eg ./galleries/physical-albums/people/individuals/IMG_0306.jpg)

I would appreciate assistance here. At what point are the back ticks (`) added in, and why? Any suggestions to try?

Thanks for you help.

Martin

Offline

 

#2 2021-04-10 15:42:59

erAck
Only trying to help
2015-09-06
1026

Re: PWG-ERROR-NO-FS error when adding photo but nothing is wrong

The problem seems to be the groups directory name. As you can see that gets escape-quoted as `groups` which for database queries was badly introduced as a hit-all-with-a-big-club as groups is a reserved keyword since MySQL 8. There's probably no remedy other than renaming the directory.

See also [Github] Piwigo issue #1343
I'll add this case there.


Running Piwigo at https://erack.net/gallery/

Offline

 

#3 2021-04-10 16:51:39

martinis
Member
2013-07-02
31

Re: PWG-ERROR-NO-FS error when adding photo but nothing is wrong

Thank you for your quick response. I had not seen that bit of information and that may well be the cause of the problem.

I had thought about renaming the directory but I think this would introduce a lot of other complications. Each of the several hundred photos is associated with virtual albums or virtual sub-albums and I would think everything would have to be re-created. That is a big job.

Synchronising these effectively new photos again would require all the other properties to be assigned - eg. copyright, 'who can see these photos',  although for me that would be fairly straightforward.

I also have other folders which start with 'group' such as 'group-snells' and this seems to have the same problem. This is a trap which would be easy for anyone to fall into. I would not wish to have to redo some 700 photos.

Thus I hope there might be a fix for this so Piwigo can handle such directories (eg unquote the names when necessary), or an easy way to sort it out.

However, it seems that the MySql database has no problem with the location of my photos previously uploaded (even when the location involved what is now a reserved word). These locations are stored without any backticks (`). Will this ever become a problem? If not, I think that the best thing for me to do is just to start a new directory (eg groups2) and put new photos in there (as these albums are not visible to anyone else and the same virtual albums can still be used).

Offline

 

#4 2021-04-30 13:58:05

martinis
Member
2013-07-02
31

Re: PWG-ERROR-NO-FS error when adding photo but nothing is wrong

UPDATE:

It became clear that this method was not going to work, as old photos from the physical folders starting with 'group' were no longer being automatically regenerated when another size was needed for display. There was no warning message and there was just a blank space where the image should be.

I tried some alternative approaches but the solution is fairly simple, so I elaborate for any other unfortunate users who might have named a physical directory 'group....'. You will need the plug-in "Physical Photo Move".

1. Create a new directory on the server which does not start with 'group'. This will be where the photos will be transferred to. Then synchronize the folders in Piwigo
2. Go to the batch manager and load the physical album of photos to move. Select the whole set.
3. Move all the set to the new physical album (which uses the plugin)
4. Check all is well.
5. Remove the old directories from the server (which should be empty), and synchronize again.


Hopefully this sort of thing will not happen again, as I believe you should be able to choose any valid name for a folder to store photos in.

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2021 · Contact