Zoph cli import fails to create thumbnails

Problem Description
Using the command line interface (cli) zoph command on FreedomBox a picture can be imported to zoph but does not have a thumbnail or downscaled image created. This looks like a filesystem permission issue…

$ ls -ld /var/lib/zoph /var/lib/zoph/mid /var/lib/zoph/thumb
drwxrwsr-- 1 www-data zoph 7926 Dec 1 11:24 /var/lib/zoph
drwxr-sr-x 1 www-data zoph 686 Dec 1 09:04 /var/lib/zoph/mid
drwxr-sr-x 1 www-data zoph 770 Dec 1 09:04 /var/lib/zoph/thumb

… where the mid and thumb directories are not writable by zoph group.

Steps to Reproduce

  1. ssh to FreedomBox
  2. zoph --import --thumbnails PICTURE.JPG

Expected Results

  • The picture is imported
  • The picture has a thumbnail and/or down scaled image when looking in the Photos page of zoph.

Actual results
I get an error message from zoph:

zoph --import --thumbs 20191212_124332_HDR.jpg
Directory not writable: /var/lib/zoph//mid

Filsystem permissions:

$ ls -ld mid
drwxr-sr-x 1 www-data zoph 686 Dec 1 09:04 mid
$ cd mid
$ ls foo
ls: cannot access ‘foo’: No such file or directory
$ touch foo
touch: cannot touch ‘foo’: Permission denied
$ groups
users games i2psvc syncthing zoph admin freedombox-share bit-torrent ed2k feed-reader web-search wiki calibre git-access i2p syncthing-access vpn

Screenshot
The photos page of zoph shows imported photos without thumbnails.

These photos with the broken thumbnail/down scale image are in Zoph. I can click the thumbnail which takes you to the photo page. The photo page has a down scaled image which is also broken. Clicking the down scale image shows the full size image successfully.

Information

  • FreedomBox version: You are running Debian GNU/Linux 12 (bookworm) and FreedomBox version 24.24. FreedomBox is up to date.
  • Hardware: Intel Atom PC
  • How did you install FreedomBox?: manual installation from netinst

For photos I imported using the web client these do have thumbnail and down scaled images. Only for CLI is there an issue.

Where this will be challenging is that the user’s Google storage is full and I want to migrate 67GB of photos. We won’t be able to complete that migration in our lifetimes using the browser interface.

1 Like

Update 7 Dec 2024

This is definitely looking like filesystem permissions. I think I see one behavior when the first import is through the web client and a different behavior when the first import is through command line interface. It is at this moment that /mid and /thumb folders are created either by the cli user or the www-data user.

I’ll keep chipping away at this. I think the best direction is to work out how to bulk import using the web client which would help create the right experience for most FreedomBox users.