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

Allow non root usage #135

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

bzsparks
Copy link

@bzsparks bzsparks commented Nov 30, 2023

Checklist:

  • My pull request has a descriptive title. (unlike Update index.md). Check this guide regarding titles.
  • If applicable, I have tested these changes.

Closes #XXXXX

@bzsparks
Copy link
Author

add ability to run as non root user

Copy link
Owner

@ChristianLempa ChristianLempa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For some reason this does not work for me. Can you specify which host OS you're using and whether the 100 user already exists on the host?

@bzsparks
Copy link
Author

bzsparks commented Dec 1, 2023

The host OS is Ubuntu 22.04. Both user and group IDs were already taken on my host OS, after the script is run my folders look like below. The uid maps to the user '_apt' and the gid maps to 'systemd-journal', but I don't think this matters in the container. Additionally the folders have a 775 mask.

ll | grep -E 'cache|config|records'
drwxrwxr-x 2 _apt    systemd-journal 4.0K Dec  1 14:37 cache/
drwxrwxr-x 2 _apt    systemd-journal 4.0K Nov 30 14:15 config/
drwxrwxr-x 2 _apt    systemd-journal 4.0K Nov 30 00:15 records/

@ChristianLempa
Copy link
Owner

When I execute this on my system, I get the errors:

dns-prod-1  | 01-Dec-2023 16:40:23.493 the working directory is not writable
dns-prod-1  | 01-Dec-2023 16:40:23.501 loading configuration: permission denied
dns-prod-1  | 01-Dec-2023 16:40:23.501 exiting (due to fatal error)

I don't know why that occurs, doesn't matter if I set the compose folder to rw.

@bzsparks
Copy link
Author

bzsparks commented Dec 1, 2023

Just updated the shell script to set a 775 mask on the folders. See if that works

@bzsparks
Copy link
Author

bzsparks commented Dec 4, 2023

Did mask 775 allow the container to access those directories?

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

Successfully merging this pull request may close these issues.

None yet

2 participants