You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
Create an 20.4 Ubuntu image
mulitpass start
multipass shell
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
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.
Thank you for your response. That clarifies my problem.
I did similar thing with vbox, and I had the same issue.
When generating the file inside the vm fisystem, it worked fine.
Describe the bug
I am trying to create a kernel node using
mknod
but it results in operation not permittedsudo mknod -m 666 dev/null c 5 1
mknod: dev/null: Operation not permitted
To Reproduce
How, and what happened?
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
multipass version
: 1.13.1multipass 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.
The text was updated successfully, but these errors were encountered: