Suwayomi / docker-tachidesk

Run Suwayomi-Server in a docker container
Mozilla Public License 2.0
224 stars 56 forks source link

Permission Issues #22

Closed arbuilder closed 1 year ago

arbuilder commented 2 years ago

For permission issues test with develop tag i.e. - ghcr.io/suwayomi/tachidesk:develop and edit uid and gid in compose or command line as mentioned in this link https://github.com/boxboat/fixuid

Ex -

docker compose

tachidesk:
  image: ghcr.io/suwayomi/tachidesk:develop
  user: ${FIXUID:-1005}:${FIXGID:-1005}
  volumes:
    - etc: etc

command line docker run --rm -it -u 1005:1005 <image name> sh

mention it below if it works or doesnt work. i will not put it into stable untill majority of people test it out

alysson-souza commented 2 years ago

Thanks. This fixes the issues I was having not being able to write to the config folder. I installed Tachidesk on synology dsm 7 succesfully by using the following command: sudo docker run -P --name tachidesk -e TZ=Europe/Dublin -v /volume1/docker/tachidesk:/home/suwayomi/.local/share/Tachidesk -u $(id -u):$(id -g) ghcr.io/suwayomi/tachidesk:develop

arbuilder commented 2 years ago

@alysson-souza are there any issues in reading your exsisting manga which was downloaded before ?

alysson-souza commented 2 years ago

No, no issues. Everything seems to work fine.

tatsumara commented 1 year ago

Running it like this doesn't even get it past the startup_script, says permission denied as well

CaptainVincent commented 1 year ago

Try this sudo chmod o+w Tachidesk

0chroma commented 1 year ago

Taking a look at the dockerfile, I think part of the issue is that it's hard coding a uid and gid of 1000:1000. Changing it with the PUID and PGID env vars as is customary with docker doesn't work.

Generally it's not necessary to create a user within a Dockerfile, since which user it's run as is determined by Docker itself. Instead, consider removing lines 3-7, changing the configuration to reside in a /config directory, and changing line 9 to run the application out of a /tachidesk folder.

I'm happy to make a pull request for these changes if it's ok.

C3004 commented 1 year ago

Hi, tested on unraid and works fine.

0chroma has a good point. That would remove the issues we currently have on unraid with the container. Anyway the guys at fixuid don't want it to be used in a production container; which probably would create more problems than having users use the default user env vars if they need the container with a specific user.

Indribell commented 1 year ago
  1. The default Tachidesk container when used with Unraid does not work and container stop working.
  2. Adding a docker manually with no parameters using the "ghcr.io/suwayomi/tachidesk:develop" result in a container that runs. But no ability to access it from a IP instead of localhost. Probably because its just a pure raw docker added with no parameters.
  3. Updating the default Techidesk unraid container with the "ghcr.io/suwayomi/tachidesk:develop" does not work and container stop working.

Number 3 shows:

fixuid: fixuid should only ever be used on development systems. DO NOT USE IN PRODUCTION
fixuid: runtime UID '1000' already matches container user 'suwayomi' UID
fixuid: runtime GID '1000' already matches container group 'suwayomi' GID
touch: cannot touch '/home/suwayomi/.local/share/Tachidesk/docker_touchfile': Permission denied
/home/suwayomi/startup/startup_script.sh: 21: cannot create /home/suwayomi/.local/share/Tachidesk/logfile.log: Permission denied

Number 2 shows:

fixuid: fixuid should only ever be used on development systems. DO NOT USE IN PRODUCTION
fixuid: runtime UID '1000' already matches container user 'suwayomi' UID
fixuid: runtime GID '1000' already matches container group 'suwayomi' GID
touch: cannot touch '/home/suwayomi/.local/share/Tachidesk/docker_touchfile': No such file or directory

The rest of te output is the same with number 1 and 3 failing to continue.

C3004 commented 1 year ago
  1. The default Tachidesk container when used with Unraid does not work and container stop working.

    1. Adding a docker manually with no parameters using the "ghcr.io/suwayomi/tachidesk:develop" result in a container that runs. But no ability to access it from a IP instead of localhost. Probably because its just a pure raw docker added with no parameters.

    2. Updating the default Techidesk unraid container with the "ghcr.io/suwayomi/tachidesk:develop" does not work and container stop working.

1: Yes it does not work because the tachidesk user 1000:1000 does not exist on the default unraid system. 2: yeah if the port is not passed through it wont work 3: Did you add the user Flag? The log shows you did not. add -u 99:100 in extra parameters grafik

Indribell commented 1 year ago

1: Yes it does not work because the tachidesk user 1000:1000 does not exist on the default unraid system. 2: yeah if the port is not passed through it wont work 3: Did you add the user Flag? The log shows you did not. add -u 99:100 in extra parameters grafik

That works ... Thanks.

I like to point out that the description is fully confusing and i ended a hour trying different combinations to get this to work. When you know, its easy but for somebody running this the first time with google search and outdate information...

This text:

The Container has a specified User inside. On Unraid this can lead to errors if the User is nonexistent on the Hostsystem. I haven't found a easy workaround yet but the specified User PUID is 1000 which on Unraid is the first User created when using the Users option in the GUI to add a user. So you could create a new user if you get errors but it feels very sketchy. Also note that the Docker will write it's files with that PUID. There is now a :develop tag that allows to change the running user like this in extra parameters: -u 99:100 .But it can be removed again so be sure to create Backups!

This needs to be rewritten as:

If the container does not start (with error ... ), you can try the following:

Change **Repository** from "ghcr.io/suwayomi/tachidesk" to "ghcr.io/suwayomi/tachidesk:develop"
Click on Advanced and add to the **Extra** line: "-u 99:100" without quotations

These changes may stop working with future update, so be sure to create Backups!

So much easier to understand.

C3004 commented 1 year ago

There is now a :develop tag tha...

Ah, Sorry. This part wasn't meant to be in the Template yet. I changed it to refer to the unraid forum where my explanation may be better.

Syer10 commented 1 year ago

Closing old issues due to container rewrite, its may be fixed in the preview tag. Re-open if its not.

lavavex commented 1 year ago

Issue still exists with preview tag. Using develp branch with -u 99:100 works fine, but would like updates. can we just fix the reliance on the baked in 1000:1000 please? Unraid 6.12.3

chachoCL commented 1 month ago

Try this sudo chmod o+w Tachidesk

thanks, it worked