Trouble installing PS on unraid

Hello!
I’m just getting started with photostructure and am trying to install it on my unraid server. After installing the docker, it won’t start and gives me the following error:

Error: code EACCES: EACCES: permission denied, open '/ps/config/settings.toml'
Error: EACCES: permission denied, open '/ps/config/settings.toml'
{"fatal":true,"exit":true,"status":14,"pid":25,"ppid":18,"error":"main setup failed: Error: code EACCES: EACCES: permission denied, open '/ps/config/settings.toml'¹"}
This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:
Error: EACCES: permission denied, open '/ps/config/settings.toml'
Error: code EACCES: EACCES: permission denied, open '/ps/config/settings.toml'
Error: EACCES: permission denied, open '/ps/config/settings.toml'
{"fatal":true,"exit":true,"status":14,"pid":25,"ppid":18,"error":"main setup failed: Error: code EACCES: EACCES: permission denied, open '/ps/config/settings.toml'¹"}
This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:
Error: EACCES: permission denied, open '/ps/config/settings.toml'
Error: code EACCES: EACCES: permission denied, open '/ps/config/settings.toml'
Error: EACCES: permission denied, open '/ps/config/settings.toml'
{"fatal":true,"exit":true,"status":14,"pid":31,"ppid":24,"error":"main setup failed: Error: code EACCES: EACCES: permission denied, open '/ps/config/settings.toml'¹"}
This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:
Error: EACCES: permission denied, open '/ps/config/settings.toml'

Howdy @Jonathan_J , welcome to PhotoStructure!

Permissions can be a bear to get sorted. The PUID and PGID need to be set to a user and group that can read and write to the directory that you’re bind-mounting to the /ps/... directories. It looks like at least /ps/config isn’t read-writable.

I didn’t know what PUID and PGID meant when I was installing the docker, so I had left them blank thinking it would use some default. Setting them to 0 fixed everything. If there was a description explaining that section it might help out newbies like me in the future haha
Thanks for the help!

Good idea, I’ll add that to the template.

In the spirit of better to be safe than sorry:

Know that userid 0 (zero) is the “super user”, root.

The super user, root, can do whatever it wants.

image

(sudo is short for Super User Do)

The fewer things you have running as root, the better. You’re putting a lot of trust in any software that’s running as root!

Even if you run software running as root into a container, there are exploits that let malware “escape” the container and muck with the host OS.

It’s much better to “quarantine” all your software with non-root users, and, ideally, use a specific user for every application, and add them just to the groups they need to read/write the files they need to. As an example, you’d have your file transfer app and PhotoStructure running as different users, and have both of those users share a group that can read and write to your photos and videos.

I’d google “root docker unraid” for more details, but this was a relevant discussion: Root user or non-root user inside container - DockerEngine - Docker Community Forums

1 Like

I have no problems running Photostructure on Unraid with the following:

PUID: 99
PGID: 100
UMASK: 002

Thanks @tkohhh , I just updated the official UnRAID template to use those as defaults.

For the sake of anybody reading this in the future, this comment on the Unraid forum by Squid confirms that containers in Unraid should be set to the “nobody” user (UID 99, GID 100) to ensure that files written to your array by the container are compatible with Unraid’s user shares.

In my experience, running Photostructure on Unraid without the PUID/PGID set resulted in Photostructure running just fine, but I was unable to open/modify config files (for instance) from the share. In practice, this meant that I couldn’t open and edit a settings.toml file on my workstation, and instead had to SSH into Unraid (as root) to make the changes there. Obviously that’s a huge pain if you’re not a linux wiz.

Thankfully, now that the Photostructure template has PUID/PGID defaulted to 99/100, this shouldn’t be an issue for anyone going forward. However, if you set up Photostructure initially without PUID/PGID, you may need to modify your appdata files with chown to get everything working correctly. I figured out how to do this myself, but I’m definitely not the best person to explain it to someone else. Perhaps somebody else can write up instructions for that if anybody needs it!

Thanks for this – I am a newby with unraid – just started trial of it yesterday, and I noticed lotsa things are root, so I will watch out for this.

I have been using linux for many years and in fact started with slackware way back, but it probably has command line tools like chmod -R and chown -R which should allow repair of files owner and permissions. More later when my huge rsync finishes copying my original photos over to the new unraid.