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

[Error: EACCES: permission denied, open '/app/data/secrets.json'] #58

Closed
2boom-ua opened this issue Aug 18, 2023 · 20 comments
Closed

[Error: EACCES: permission denied, open '/app/data/secrets.json'] #58

2boom-ua opened this issue Aug 18, 2023 · 20 comments

Comments

@2boom-ua
Copy link

2boom-ua commented Aug 18, 2023

Hello!
first install with docker-compose
root@NUC10-NAS:~/neonlink# docker-compose up
Creating network "neonlink_default" with the default driver
Creating neonlink ... done
Attaching to neonlink
neonlink | [Error: EACCES: permission denied, open '/app/data/secrets.json'] {
neonlink | errno: -13,
neonlink | code: 'EACCES',
neonlink | syscall: 'open',
neonlink | path: '/app/data/secrets.json'
neonlink | }
neonlink exited with code 1

@AlexSciFier
Copy link
Owner

Hello. It looks like a problem with folder permissions. Try to give the folder the same permissions as the user under which docker is running.

@2boom-ua
Copy link
Author

Hello.
works, thank you

@AdwaitNPradhan
Copy link

Hi @Vladimi2boom, can you share what you did to make this work? 🤔

@2boom-ua
Copy link
Author

Hi @AdwaitNPradhan,
chmod -R 0755 app/

@AdwaitNPradhan
Copy link

Thanks for the reply but the thing is, the container does not start so I cant attach to it to run the command. Am I doing it correctly?

@2boom-ua
Copy link
Author

Hi @AdwaitNPradhan,
need stop container then go to /root, find /app, chmod -R 0755 app/

@TheLux83
Copy link

Hey hey.
I have the same issues, but I'm using docker volumes, so there "should" be no permission issue, if I see that correctly.

  neonlink:
    image: alexscifier/neonlink
    container_name: neonlink
    volumes:
      - neonlink_data:/app/data
      - neonlink_background:/app/public/static/media/background
    restart: unless-stopped
    networks:
      - proxy
    ports:
      - "80"

The volumes were generated, but neonlink complains about access issues as well

neonlink  | [Error: EACCES: permission denied, open '/app/data/secrets.json'] {
neonlink  |   errno: -13,
neonlink  |   code: 'EACCES',
neonlink  |   syscall: 'open',
neonlink  |   path: '/app/data/secrets.json'
neonlink  | }

I can confirm, that there weren't any files in the volume.
All the other docker container are running fine with the same settings.

@AlexSciFier
Copy link
Owner

I tried to recreate the problem and indeed, if you connect volume, then the problem that you wrote about appears. As a temporary solution, I can offer you to connect the entire /app folder.

    volumes:
      - neonlink_data:/app

@AlexSciFier
Copy link
Owner

Fixed in 1.4.4

@kyob
Copy link

kyob commented Aug 23, 2023

I pulled version 1.4.4 and error still exists. Nothing changed.

@AlexSciFier
Copy link
Owner

I pulled version 1.4.4 and error still exists. Nothing changed.

Can you send docker-compose file and also logs from docker?

@kyob
Copy link

kyob commented Aug 24, 2023

docker-compose -v

docker-compose version 1.27.4, build 40524192

git log --oneline -n 5

3b0d505 (HEAD -> master, origin/master, origin/HEAD) Merge pull request #62 from AlexSciFier/change-default-values
7c53e73 change default columns and max items values
4660abe (tag: v1.4.5) Merge pull request #61 from AlexSciFier/fix-no-login
d181636 change version
a53be5d Merge branch 'master' into fix-no-login

docker-compose.yml

version: "3.8"

services:
  neonlink:
    image: alexscifier/neonlink
    container_name: neonlink
    volumes:
      - ./data:/app/data
      - ./background:/app/public/static/media/background
    restart: unless-stopped
    ports:
      - "80:3333"

docker-compose logs

neonlink    | [Error: EACCES: permission denied, open '/app/data/secrets.json'] {
neonlink    |   errno: -13,
neonlink    |   code: 'EACCES',
neonlink    |   syscall: 'open',
neonlink    |   path: '/app/data/secrets.json'
neonlink    | }

@CharlotteCross1998
Copy link

I'm having the same issue, even with the permissions fixed. There are also no files in any of the folders.

docker-compose:

version: "3.8"

services:
  neonlink:
    image: alexscifier/neonlink
    container_name: neonlink
    volumes:
      - /home/charlotte/PodmanContainers/neonlink/data:/app/data
      - /home/charlotte/PodmanContainers/neonlink/background:/app/public/static/media/background
    restart: unless-stopped
    ports:
      - "3333:3333"

ls -Ral

~/PodmanContainers/neonlink> ls -Ral 
.:
total 16
drwxr-xr-x  4 1024 users 4096 Aug 24 12:24 .
drwxr-xr-x 23 root root  4096 Aug 24 12:22 ..
drwxr-xr-x  2 1024 users 4096 Aug 24 12:24 background
drwxr-xr-x  2 1024 users 4096 Aug 24 12:30 data

./background:
total 8
drwxr-xr-x 2 1024 users 4096 Aug 24 12:24 .
drwxr-xr-x 4 1024 users 4096 Aug 24 12:24 ..

./data:
total 8
drwxr-xr-x 2 1024 users 4096 Aug 24 12:30 .
drwxr-xr-x 4 1024 users 4096 Aug 24 12:24 ..

@xrfmkrh
Copy link

xrfmkrh commented Aug 24, 2023

In my case, I solved this by 'user: uid:gid'

example

services:
  neonlink:
    image: alexscifier/neonlink:1.4.5
    user: uid:gid
    volumes:
      - ./data:/app/data
    restart: unless-stopped

@AlexSciFier
Copy link
Owner

In my case, I solved this by 'user: uid:gid'

You can also create folder first and then run container.

@xrfmkrh
Copy link

xrfmkrh commented Aug 24, 2023

You can also create folder first and then run container.

without 'user: uid:gid'? not worked

@CharlotteCross1998
Copy link

In my case, I solved this by 'user: uid:gid'

example

services:
  neonlink:
    image: alexscifier/neonlink:1.4.5
    user: uid:gid
    volumes:
      - ./data:/app/data
    restart: unless-stopped

This didn't work for me, still getting the same error.

In my case, I solved this by 'user: uid:gid'

You can also create folder first and then run container.

That's what I did originally, creating the folders then changing the ownership to the docker user, this didn't fix it unfortunately.

@xrfmkrh
Copy link

xrfmkrh commented Aug 24, 2023

@CharlotteCross1998 Did you try 'user: 0:0'?

@CharlotteCross1998
Copy link

@CharlotteCross1998 Did you try 'user: 0:0'?

That worked, thanks!

@xrfmkrh
Copy link

xrfmkrh commented Aug 24, 2023

@CharlotteCross1998 I don't know exactly but if 'user: 0:0' works then other user(have RW permission to your folder) will works too like 'user :1015:100'

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

7 participants