Synology NAS Tips

It doesn’t look like I can edit my original post anymore. In any case, here’s my updated instructions with DSM 7.2 for creating a user and getting PUID / GUID. Many thanks to Step 2: Setting up a restricted Docker user and obtaining IDs and Synology: Find UID (userID) and GID (groupID) in 5 Seconds – Marius Hosting for the excellent help!

First, create a new user for photostructure so you can easily change what it can/cannot do in the future. Here’s what I use:

  • Click Control Panel → User & Group → Create, and follow the wizard. Screens I haven’t shown, I left at defaults.
  • The “Edit” button lets you change anything later, so don’t worry too much about what you pick in the wizard.
  • You could give PhotoStructure read-only access to your photos if you don’t care about using it to update photo metadata, including rotation and such. Maybe set it up read-only for now, then change to read/write later. Read/write access is required for the docker folder, so PhotoStructure can save thumbnails and make its database.

Second get the new user’s PUID/GUID. We can get this from the control panel, too!

  • Go to Control Panel → Task Scheduler → Create → Triggered Task → User-defined script.
  • De-select “Enabled”, then in the “Task Settings” tab enter the script id dockerphotostructure (or id yourDockerUsername if you picked a different username than me for your PhotoStructure Docker container).
  • Select your task and click “Run” to run it once now (de-selecting “Enabled” means it doesn’t run a schedule. But we can still manually trigger it.)
  • Select your task again, then click Action → View Result. Your PUID is after uid= and your GUID is after gid. In my case, they’re 1033 and 100, respectively.
  • Advanced users can instead use command for user in $(awk -F':' '$3>999 && $3<9999 {print $1}' /etc/passwd); do id $user; done to get the IDs of all (non-system) users. I’ve started using this instead so I can have one script to run for anytime I add/change users, without having to change the task script and type exactly which username I’m looking for each time.