Open moritzfl opened 2 years ago
I don't use Phockup as docker image and I don't have any idea about this issue so any assistance is more than welcome.
Regarding publishing the software to Unraid app store - this sounds interesting and I think we can adapt the code to honor environment variables. Anyone willing to work on this is welcome to send a PR (or maybe two - one for env vars and one for store config). I hope we can push to the store automatically using our existing Github Actions pipeline.
@moritzfl does using -u
in the docker command work for you?
-u, --user=""
Sets the username or UID used and optionally the groupname or GID for the specified command.
docker run -u 1000:1000 -v ~/Downloads/photos:/mnt ivandokov/phockup:latest /mnt/Input /mnt/Output
Using the user flag works for a one shot but when running the docker command using the cron it fails due to permission denied.
Hello. Same problem here, https://github.com/ivandokov/phockup/pull/213 seem to fix the problem ?
Using the user flag works for a one shot but when running the docker command using the cron it fails due to permission denied.
ya so either phockup should own the files as a specified user or utilize its own scheduler over cron.
Hello. Same problem here, #213 seem to fix the problem ?
im not sure if this is a fix for file ownership when being run from docker.
something one could do is toss the docker command in a compose and then schedule that from where docker is run if needed:
services:
phockup:
image: ivandokov/phockup:latest
container_name: phockup
user: ${UID:-1000}:${GID:-1000}
volumes:
- /path/to/input/dir:/mnt/input
- /path/to/output/dir:/mnt/output
command: /mnt/input /mnt/output --move --original-names --date YYYY/MM
This might be docker specific but when files are moved, users may only read the files but not delete it.
I am currently experimenting with Phockup on my Unraid-NAS and the plan is to have two folders where me and my wife can drop in photos and have them organized by date. However, neither me nor my wife can actually modify anything in the moved data (delete/rename does not work).
For Unraid, there is a fix that works but it has to be manually triggered from the User Interface. It would be nice if the Docker image would take care of properly handling permissions instead.
The fix is described here Essentially an Unraid Plugin repairs permissions in folders that were set by docker containers.
Description from the web interface of the Unraid Plugin:
By the way and just in case this is interesting for you - if the configuration options could be accessed through Environment Variables instead of Post Arguments, it would be pretty easy to publish Phockup in the Unraid-Store (as shown in this YouTube video).