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

mount failed: Operation not permitted #61

Closed
hasamba opened this issue Feb 5, 2024 · 2 comments
Closed

mount failed: Operation not permitted #61

hasamba opened this issue Feb 5, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@hasamba
Copy link

hasamba commented Feb 5, 2024

trying to hash several windows iso's, getting mount failed every time, even when running as SUDO
docker run -it --network hashr_net -v /opt/hashr/windows_iso:/data/windows us-docker.pkg.dev/osdfir-registry/hashr/release/hashr -storage postgres -postgres_host hashr_postgresql -postgres_port 5432 -postgres_user XXX -postgres_password XXX -postgres_db hashr -importers windows -windows_iso_repo_path /data/windows -exporters postgres

error:
Stderr: mount: /tmp/hashr-server2022.iso-3119761407/mnt: mount failed: Operation not permitted.

thanks

@jkppr jkppr self-assigned this Mar 8, 2024
@jkppr
Copy link
Collaborator

jkppr commented Mar 8, 2024

Thanks for raising this issue.

hashr is trying to directly mount the ISO file within the Docker container. iirc, Docker doesn't allow this by default for security reasons.

For an easy workaround, use the --privileged flag with your docker run command.

I'll create a follow-up issue to explore alternatives to using mount e.g. by extracting the iso content instead.

@jkppr jkppr added the bug Something isn't working label Mar 8, 2024
@jkppr
Copy link
Collaborator

jkppr commented Mar 8, 2024

I tested your command with the --privileged flag and a Windows ISO file and can confirm it is working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants