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

[bug] Can't view local files on my Synology NAS #729

Open
srahimeen opened this issue Aug 2, 2024 · 8 comments
Open

[bug] Can't view local files on my Synology NAS #729

srahimeen opened this issue Aug 2, 2024 · 8 comments

Comments

@srahimeen
Copy link

srahimeen commented Aug 2, 2024

Description of the bug

I have installed filestash on my Synology DS923+ NAS using the following docker-compose.yml:

version: '2'
services:
  app:
    container_name: filestash
    image: machines/filestash
    restart: always
    environment:
    - APPLICATION_URL=
    - GDRIVE_CLIENT_ID=<gdrive_client>
    - GDRIVE_CLIENT_SECRET=<gdrive_secret>
    - DROPBOX_CLIENT_ID=<dropbox_key>
    - ONLYOFFICE_URL=http://onlyoffice
    ports:
    - "8334:8334"
    volumes:
    - filestash:/app/data/state/

  onlyoffice:
    container_name: filestash_oods
    image: onlyoffice/documentserver
    restart: always
    security_opt:
      - seccomp:unconfined

volumes:
    filestash: {}

It's running and I can access it. I have set it to only local.

image

When I try to view my files, I get the "Oops! Not Found" error.

image

What do I need to do to view my files from my NAS? I would specifically like to just view the volume1/NAS-BACKUPS/Backup Photos folder from my NAS.

Step by step instructions to reproduce the bug

  1. Install filestash on Synology DS923+ NAS using above docker-compose.yml
  2. Set it to only have local config as per above screenshot

Can you replicate that error from the demo?

Observed behavior

"Oops! Not Found" error when trying to view files.

Expected behavior

I am able to view the local files in my Synology NAS volume1/NAS-BACKUPS/Photos folder

@vatsalkgor
Copy link

vatsalkgor commented Aug 5, 2024

I think you need to select Authentication Middleware like below!

Screenshot 2024-08-05 at 13 33 12

@srahimeen
Copy link
Author

@vatsalkgor what settings need to go in the middleware?

@vatsalkgor
Copy link

Each auth middleware have different settings.
Details are shown here for many of the Auth middleware.
However for local storage with docker container, it will only have access to folders that are mounted on the container.

Let's say you want to add /path/to/files from your host system to the filestash, you first need to mount this path to a path in the container like /path/to/files:/my-files in the docker-compose's volume section. Then in the admin UI select Local and select Admin Auth middleware. Then select local in Attribute Mapping section. That will give you configuration for the local backend. Add your admin password in the password field and /my-files in the path. Then go to your filestash instance and add Admin password to login and you should have your files shown to you.

@srahimeen
Copy link
Author

srahimeen commented Aug 5, 2024

I run immich on my NAS to in the docker compose of that app I had to add the following:

volumes:
  - "/volume1/NAS-BACKUPS/Backup Photos":/usr/src/app/external

To allow access to the local shared folder I want the app to access.

If I want to do something similar in filestash, do I add something like:

    volumes:
    - filestash:/app/data/state/
    - "/volume1/NAS-BACKUPS/Backup Photos":/usr/src/photos

And then expose it in the admin UI? Does the settings here look correct? Is the password here my filestash password or my NAS admin password?

image

@vatsalkgor still getting the Oops error with the above settings so was curious what I'm doing wrong.

@vatsalkgor
Copy link

The password is your filestash password, not your NAS Password. And sometimes cache can also play effect so please try in incognito as well.

Thanks

@srahimeen
Copy link
Author

srahimeen commented Aug 5, 2024

I have it set up as the above screenshot, but still seem to get the Oops error. Tried it in incognito mode and in another browser as well. Is mounting to /usr/src/photos not allowed, or should I mount some other way?

My docker compose is now:

version: '2'
services:
  app:
    container_name: filestash
    image: machines/filestash
    restart: always
    environment:
    - APPLICATION_URL=
    - GDRIVE_CLIENT_ID=<gdrive_client>
    - GDRIVE_CLIENT_SECRET=<gdrive_secret>
    - DROPBOX_CLIENT_ID=<dropbox_key>
    - ONLYOFFICE_URL=http://onlyoffice
    ports:
    - "8334:8334"
    volumes:
    - filestash:/app/data/state/
    - "/volume1/NAS-BACKUPS/Google Photos":/usr/src/photos

  onlyoffice:
    container_name: filestash_oods
    image: onlyoffice/documentserver
    restart: always
    security_opt:
      - seccomp:unconfined

volumes:
    filestash: {}

I don't see anything in the logs indicating it failed to mount the volume or something.

@srahimeen
Copy link
Author

I also went ahead and gave the filestash containers access to the volume in the Synology Container Manager UI

image

image

Now I seem to get a different error which says "Permission denied".

image

@srahimeen
Copy link
Author

@vatsalkgor @mickael-kerjean any ideas on what to do here?

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

No branches or pull requests

2 participants