Docker newby question -- /tmp/ps-photos/ is owned by root?


I have noticed, for example, after a reboot of the ubuntu system, photostructure keeps restarting. If I remove it and re-run with verbose option, I can see it failing to create /tmp/ps-photos/ … and when I go look, in fact it exists but is owned by root. if I remove the directory and re-run photostructure docker, all is good, until the next reboot.

the system is ubuntu 20.04.2 lts

suggestions welcome. and here is my info from about:

System information

Version 1.0.0-beta.12
Edition PhotoStructure for Docker
Plan plus
OS Alpine Linux v3.13 on x64 (docker)

Odd. What is the owner/group/permission of /tmp/ps-photos/ prior to a reboot?

During normal/working times,
the owner/group is photos:photos (1001:1001). i added a dedicated login for photostructure, and I pass in via the --user docker option. permission is 775.

drwxrwxr-x 5 photos photos 4096 Jul 29 18:43 /tmp/ps-photos/

In this specific case – a power failure, one of the samba shares did not come back online correctly, so maybe that contributed to the problem.

Here is a section of the script I use to crank up docker.

docker run
–name photostructure
–user $(id -u):$(id -g) # < optional: see the "Library ownership" section above.
–restart on-failure # < optional: starts PhotoStructure on boot.
–stop-timeout 120 # < gives PhotoStructure 2 minutes to shut down cleanly.
–publish 1787:1787
-e TZ="$(cat /etc/timezone)"
-v “$PSLIBRARY”:/ps/library
-v “$PSTMP”:/ps/tmp
-v “$PSCONFIG”:/ps/config
-v “$PSLOGS”:/ps/logs
-v “/media/asuschromebox/Pictures”:/photos1/

As soon as v1.0 ships I need to update the docs… Please use PUID/PGID instead of --user for v1.0 or later.


But the TL;DR: replace the --user line with

-e UID=$(id -u) \
-e GID=$(id -g) \

That worked but I ran into another issue that is probably a docker newby thing:

-v “$PSLOGS”:/ps/logs
-v “/media/asuschromebox/Pictures”:/photos1/
-v “/media/asuschromebox/vicki”:/photos3/

For some reason, it was not syncing the photos3, just the photos1. Both looked ok (to me) in the docker inspect.

But when I looked at the settings from the photostructure web page itself, I had it (where else are your photos) set to ‘manual’ instead of 'automatic, and it was empty. So I added photos3 and all seems to be working fine now… Should I have used ‘automatic’ ? thanks.

Automatic would have picked up all the paths.

The only reason not to pick automatic is if you actually don’t want some paths to get scanned, but that doesn’t make a lot of sense for a docker install since you’d just not mount those paths to begin with.