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

mknod: Operation not permitted #3453

Closed
efra-mx opened this issue Mar 28, 2024 · 2 comments
Closed

mknod: Operation not permitted #3453

efra-mx opened this issue Mar 28, 2024 · 2 comments
Labels

Comments

@efra-mx
Copy link

efra-mx commented Mar 28, 2024

Describe the bug
I am trying to create a kernel node using mknod but it results in operation not permitted

sudo mknod -m 666 dev/null c 5 1
mknod: dev/null: Operation not permitted

To Reproduce
How, and what happened?

  1. Create an 20.4 Ubuntu image
  2. mulitpass start
  3. multipass shell
  4. sudo mknod -m 666 dev/null c 1 3

Expected behavior
What did you expect to happen?
I should create the dev/null file the the current folder

Logs
Please provide logs from the daemon, see accessing logs on where to find them on your platform.

mar 28 00:20:55 Efra-Desktop sudo[1320399]: efra-mx : TTY=pts/1 ; PWD=/home/efra-mx/workspaces/colorado-university/assignment-1-efra-mx ; USER=root ; COMMAND=/usr/bin/mknod linux-build/rootfs/dev/consol>
mar 28 00:20:55 Efra-Desktop sudo[1320399]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=1000)
mar 28 00:20:55 Efra-Desktop sudo[1320399]: pam_unix(sudo:session): session closed for user root

Mar 28 09:43:43 entranced-treefrog sudo[3255]: ubuntu : TTY=pts/0 ; PWD=/home/ubuntu/assignment ; USER=root ; COMMAND=/usr/bin/mknod -m 666 linux-build/rootfs/dev/console c 5 1
Mar 28 09:43:43 entranced-treefrog sudo[3255]: pam_unix(sudo:session): session opened for user root by ubuntu(uid=0)
Mar 28 09:43:43 entranced-treefrog sudo[3255]: pam_unix(sudo:session): session closed for user root
Mar 28 09:46:00 entranced-treefrog sudo[3298]: ubuntu : TTY=pts/0 ; PWD=/home/ubuntu/assignment ; USER=root ; COMMAND=/usr/bin/mknod -m 666 linux-build/rootfs/dev/null c 1 3
Mar 28 09:46:00 entranced-treefrog sudo[3298]: pam_unix(sudo:session): session opened for user root by ubuntu(uid=0)
Mar 28 09:46:00 entranced-treefrog sudo[3298]: pam_unix(sudo:session): session closed for user root

Additional info

  • OS: ubuntu 22
  • multipass version: 1.13.1
  • multipass info --all
    -Name: primary
    State: Stopped
    Snapshots: 0
    IPv4: --
    Release: --
    Image hash: 304983616fcb (Ubuntu 22.04 LTS)
    CPU(s): --
    Load: --
    Disk usage: --
    Memory usage: --
    Mounts: /home/efra-mx => Home
    UID map: 1000:default
    GID map: 1000:default

Name: entranced-treefrog
State: Running
Snapshots: 0
IPv4: 10.0.245.173
172.17.0.1
Release: Ubuntu 20.04.6 LTS
Image hash: edf43eb9f4e5 (Ubuntu 20.04 LTS)
CPU(s): 1
Load: 0.00 0.00 0.00
Disk usage: 9.4GiB out of 58.1GiB
Memory usage: 242.4MiB out of 3.8GiB
Mounts: /home/efra-mx/workspaces/colorado-university/assignment-1-efra-mx => /home/ubuntu/assignment
UID map: 1000:default
GID map: 1000:default

  • multipass get local.driver
    qemu

Additional context
Add any other context about the problem here.

@efra-mx efra-mx added bug needs triage Issue needs to be triaged labels Mar 28, 2024
@sharder996
Copy link
Contributor

Hi @efra-mx,

The reason you are getting a permission denied here is because you are executing the mknod command with a path that is inside your mount. Special files are not supported by mounts since your host filesystem doesn't know what to do with it. While it might not be an issue if you're are using a Linux host, Multipass supports Windows and macOS and those OS's are not going to know what those files are.

@efra-mx
Copy link
Author

efra-mx commented Mar 28, 2024 via email

@townsend2010 townsend2010 removed the needs triage Issue needs to be triaged label Apr 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants