Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Symlinks on the photos directory break Pigallery2 #39

Closed
tkedwards opened this issue Jan 23, 2019 · 8 comments
Closed

Symlinks on the photos directory break Pigallery2 #39

tkedwards opened this issue Jan 23, 2019 · 8 comments
Labels

Comments

@tkedwards
Copy link

If you have any symlinks in the photos directory (Images folder) you get the following error in the UI:

Unknown indexing error for: ./
"[object Object]" 

Errors from the logs (from docker logs, I'm using the docker image):

1/23/2019, 12:19:26 AM[WARN] Handled error:
ErrorDTO {
  code: 7,
  message: 'Error during listing the directory',
  details:
   { error:
      'Error: ENOENT: no such file or directory, stat \'/pigallery2-release/demo/images/convert_video_to_MP4.sh\'' } }
{ error:
   'Error: ENOENT: no such file or directory, stat \'/pigallery2-release/demo/images/convert_video_to_MP4.sh\'' }
1/23/2019, 12:19:26 AM[WARN] Handled error:
ErrorDTO {
  code: 7,
  message: 'Error during listing the directory',
  details:
   { error:
      'Error: ENOENT: no such file or directory, stat \'/pigallery2-release/demo/images/convert_video_to_MP4.sh\'' } }
@bpatrik
Copy link
Owner

bpatrik commented Jan 23, 2019

Hi,

Thank you for your report.
Can you give me same more details:
Are you setting your root images folder as a symlink so like: -v <path to a symlink>:/pigallery2-release/demo/images ? Or you have a regular root images folder that contains several symlinks?
Also can you double check if the app has read right on the folder/symlink?

Patrik

@bpatrik bpatrik added the bug label Jan 23, 2019
@tkedwards
Copy link
Author

Hi Patrik,

Are you setting your root images folder as a symlink so like: -v :/pigallery2-release/demo/images ? Or you have a regular root images folder that contains several symlinks?

The root images folder path is a symlink. The problem only happens when I have symlinks inside the root images folder, once I moved the symlinks elsewhere the problem went away

Also can you double check if the app has read right on the folder/symlink?

The symlinks had 777 permissions, and the app is running in Docker so is effectively root AFAICT

BTW thanks for developing Pigallery2! I searched for ages to find a photo gallery that would work with my existing folders (since I manage the photos using Digikam) and that actually has basic features like video playback and display of comments. Piwigo and Lychee were no good, Nextcloud Gallery is pretty hopeless. Yours is the only one that does things right!

@bpatrik
Copy link
Owner

bpatrik commented Jan 23, 2019

Hi,

Thank you. I'll look into it and get back to you in the next few days (worst case weeks).

Thank you! I'm glad that you like it :)
Yes, this project is helpful for those who manage their photos separately.
I'm doing hobby photography with lightroom post production and I try to put a lot of effort in organizing the photos (like: geo tagging, keywording, adding faces). This app suits the best for those who does the same :)

@bpatrik
Copy link
Owner

bpatrik commented Jan 26, 2019

Hi,

I've checked and the problem seems to be with docker.
I've also tested it on raspbian with direct install (so no docker) and I could use both folder and file symlinks within the images folder.

Here you can read more about the docker's symlink issue:
https://stackoverflow.com/questions/38485607/mount-host-directory-with-a-symbolic-link-inside-in-docker-container

You can try changing the way, you make your image folder accessible by docker, but I cannot really give any guidance with that. Maybe look around here: https://docs.docker.com/storage/

@tkedwards
Copy link
Author

Thanks, it's annoying Docker can't handle that well. In that case not a pigallery2 issue so I'll close this.

I ended up removing the symlinks from inside the 'photos' directory because they weren't really needed.

@bpatrik
Copy link
Owner

bpatrik commented Jan 26, 2019 via email

@tkedwards
Copy link
Author

Thanks, that's probably it since the symlinks were to a folder outside of the 'photos' folder

@peterge1998
Copy link

Hey, I just found this issue.
I am having problems getting PiGallery2 working with symlinks.

My idea was to create a folder in the Nextcloud folder, where I can sync my photos from my iPhone to.
Then I would like to display them in PiGallery2, that's why I linked the folder from the Nextcloud folder to the folder where PiGallery displays the pictures from with ln -s.

When I want to access the subfolder, where the images are in, I get this error:
image

My version is latest_2.0.11.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants