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

permission issue #43

Open
Findus23 opened this issue Feb 5, 2019 · 6 comments
Open

permission issue #43

Findus23 opened this issue Feb 5, 2019 · 6 comments

Comments

@Findus23
Copy link

Findus23 commented Feb 5, 2019

see also #42 (comment)

Since f3828fd the container doesn't start anymore.

After deleting the container and /srv/fdroid on every start I only get the following error:

➜  ~ docker logs playmaker
error initializing fdroid repository CRITICAL: Android SDK path "/opt/android-sdk-linux" does not contain "platform-tools/"!
CRITICAL: Unknown exception found!
Traceback (most recent call last):
  File "/usr/bin/fdroid", line 147, in <module>
    main()
  File "/usr/bin/fdroid", line 124, in main
    mod.main()
  File "/usr/lib/python3/dist-packages/fdroidserver/init.py", line 125, in main
    os.mkdir('repo')
PermissionError: [Errno 13] Permission denied: 'repo'

I think this has something to do that /srv/fdroid (outside of the container) is only readable by root,
and I think this line only runs on container creation and not when starting the container.

RUN chown -R pmuser:pmuser /data/fdroid && \

But I know too little about how docker works correctly to suggest a solution.

@Jonny007-MKD
Copy link

Did build the container yourself?

@Findus23
Copy link
Author

No, I pulled it from the repository.

@Jonny007-MKD
Copy link

Well, that worked for me. But when building it on my own I had the same error and I could fix it by modifying the Dockerfile:
RUN echo 'y' | tools/bin/sdkmanager --sdk_root=/opt/android-sdk-linux --verbose "platforms;android-26" "build-tools;26.0.1" "platform-tools" \
You can also check the existance of the platform-tools directory in /opt/android-sdk-linux in the container by running
docker exec -i CONTAINER bash

@Findus23
Copy link
Author

I found the "solution" (not really what I wished for):

The user inside of docker has the id 999, so I had to chown -R 999:999 the /srv/fdroid directory outside of docker so that it can read it.

@Exist2Resist
Copy link

Exist2Resist commented Feb 22, 2019

I run my container with UID=99 and GID=100
Is there no way to enable that again, was working well before, what changed?

While this is a workaround the host OS will have trouble accessing those files.

@dogabone
Copy link

@Exist2Resist currently, to change that you can edit the Dockerfile and rebuild the image.

@Findus23 there are some docker images that do this automatically by using a shellscript as the entrypoint (e.g. postgres and fireflyIII). In my RPi I created a shellscript to do the pre-checks (path exists and is owned by 999:999) and start the container.

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

4 participants