File permissions when importing photos

I’m running photostructure on unraid through the docker template. After importing photos, I no longer have permissions to edit the files. The files are owned by user id 99 (nobody).

Photos I’ve manually copied to the library works just fine. The files are owned by my user id.

I’ve tried to change photostructure to run with my user id, but the container fails to start.

How can I solve this? It would be nice to be able to add or edit keywords on photos

Howdy @bergh , welcome to PhotoStructure!

Are you trying to docker run as your user, or are you setting the PUID/PGID environment variables?

Here’s the documentation:

If you’ve followed those steps and docker still refuses to launch, please share the error message you’re getting, the host OS, the version of docker your running, and bind mounts information so we have more clues to work from.


What exactly is your use-case? Unraid isn’t intended to be a multi-user Linux environment (Creating a Real Linux user not UNRAID share user / Non ROOT user file access permissions - General Support - Unraid).

How are you accessing the files to get the permission error?

@tkohhh My use case is just an amateur trying to make sense of my photos. They are not tagged at all and going through them takes time. Im bound to make mistakes. I would like to be able to remedy those mistakes by adding or editing keywords without having to delete the file through SSH and then re-import it. I access the library through SMB, but file explorer returns an error saying I need permissions from the user “nobody” to alter the files.

@mrm I changed the PUID/PGID variable. But the link provided by @tkohhh might answer why that’s not working. If my user is not a real user, that is.

You should use the default PUID/PGID of 99/100 in Unraid. You should not be getting permission issues with that setup unless something else is wrong.

Can you share your configuration for the Photostructure docker?

What is the host system that you are accessing the share from?

edit: I just want to reassure you that this SHOULD work as you are hoping, and I’m pretty sure we can figure it out!

I have pointed the library to the unraid file share. This is the location I would like PhotoStructure to import to and store photos.

I added the PhotoImport folder, which is also an unraid file share:

I copy my photos to the PhotoImport folder. PhotoStructure grabs them and imports them to the library folder. By the time the photo reach the library folder, I am no longer able to alter the files due to lack of permissions.

I can copy photos to the library folder manually, but not to any subfolders created by the import process. I lack permissions to both the file and folder.

Im using both Mac and Windows to access the file shares. Both returns the same error.
The unraid file shares are setup as “export”, “private” and my user having read/write permissions.

Is there more to your config? You seem to be missing the temp, config, and logs paths. Since you’re using the stable branch, you need to map these directories (if you want them persistent).

That wouldn’t cause your permission issue though. When I get home this evening, I’ll play around a little bit and see if I can work out what’s going on.

@mrm, one question… if @bergh edits the files in his PhotoImport share, will those changes replicate to PhotoLibrary (the auto-organized library)?

Hidden under “show more settings”. Default values.

@tkohhh I added keywords to an image in the PhotoImport share and resynced my library. Now I’ve got two copies of the same image. Not even stacked as duplicates. One with the keywords, one without.

Edit: Seems to work in some instances. Timestamp mismatch on one occasion.

@bergh just fyi, @tkohhh is a (very) helpful forum user–I’m the guy that wrote this thing.

Oof, yeah, deduplication is a bit murky. For your use case, you want to have:

  1. A source image that has a reasonably-encoded “captured at” time in it’s metadata.

  2. Tagging software that uses sidecars, so the image doesn’t get re-copied into your library because it’s a different SHA.

This will be much easier when tag editing is part of PhotoStructure, which will be added after I add user auth.

@bergh can you do an ls -l on one of the photo files in PhotoLibrary?

I’m thinking this is a problem that UMASK can fix, but first I want to understand what permissions are getting written without the UMASK.


@bergh I think we know what’s going on. Can you add an Environment Variable to your template: UMASK=0002
Then (after you restart your container), add a new photo (unique if possible) to your PhotoImport folder. I think you’ll be able to modify that file once it syncs on your PhotoLibrary SMB share.

If that works, you’ll need to chmod your entire PhotoLibrary folder to 775. Then you should be in good shape!


I reinstalled PhotoStructure (with new, empty, shares) and added that variable:

I am now able to edit files which has been imported! :slight_smile:

1 Like

Awesome, glad to hear it! @mrm updated the official Unraid template to include that variable, so new users won’t experience the same issue going forward!