Skip to content

Change Default File Permissions for Seluser #1398

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

Closed
therealdjryan opened this issue Sep 16, 2021 · 3 comments
Closed

Change Default File Permissions for Seluser #1398

therealdjryan opened this issue Sep 16, 2021 · 3 comments

Comments

@therealdjryan
Copy link
Contributor

therealdjryan commented Sep 16, 2021

🚀 Feature Proposal

It would be helpful if the browser images included umask so the default file permissions for the 'seluser' user can be changed. It would be even better if /etc/profile included umask 002

Motivation

I am running docker-selenium in podman. Our tests depend heavily on operations such as downloading file templates from sites, updating them and re-uploading. A major pain point is because the user running tests has a different userid and groupid. Given the default file permission for seluser is 644 our tests can't directly write to downloaded files. The most straightforward way to handle this is to map the local user to seluser, but I have not been successful doing this. I propose the addition of umask 002 to /etc/profile (in NodeBase/Dockerfile?) in order for the default permissions for files become 664. At this time umask is not included in the distribution on the docker image so that would need to be included as well.

Example

Please provide an example for how this feature would be used.

@ghost ghost added the needs-triaging label Sep 16, 2021
@therealdjryan
Copy link
Contributor Author

therealdjryan commented Sep 16, 2021

Actually, doing the following will get me what I want but in a less draconian way:

#!/bin/bash
# Note: exec -a below is a bashism.
umask 002
exec -a "$0" "/opt/google/chrome/google-chrome-base" --no-sandbox "$@"

I'm happy to do make the changes myself if you approve this sort of change.

@diemol
Copy link
Member

diemol commented Oct 26, 2021

Fixed by the merged PR. Will be part of the next release.

@diemol diemol closed this as completed Oct 26, 2021
@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked and limited conversation to collaborators Nov 26, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants