[英]kvm permission denied on Android Studio emulator
When I try to run an AVD, I get this erros:当我尝试运行 AVD 时,出现以下错误:
/dev/kvm device permission denied
Yeah, I know, I don't have the permission to access /dev/kvm
, I know that I can "solve" it by changing the /dev/kvm
permission to my user, and set my user to kvm group, it is working but when I restart my user session, the /dev/kvm
permission return to root user and root group, and I need to set the permission to my group again and again...是的,我知道,我没有访问
/dev/kvm
的权限,我知道我可以通过更改我的用户的/dev/kvm
权限来“解决”它,并将我的用户设置为 kvm 组,它是工作但是当我重新启动我的用户 session 时, /dev/kvm
权限返回到 root 用户和 root 组,我需要一次又一次地为我的组设置权限......
How to set this permission and prevent that when I reboot my computer my permission are not changed anymore?如何设置此权限并防止当我重新启动计算机时我的权限不再更改?
SO: Ubuntu 18.04.01所以:Ubuntu 18.04.01
This command should help you:此命令应该可以帮助您:
sudo setfacl -m u:$USER:rwx /dev/kvm
Using it you will grant to current user rwx permissions to /dev/kvm.使用它,您将授予当前用户对 /dev/kvm 的 rwx 权限。 Or just replace $USER to any user you need.
或者只是将 $USER 替换为您需要的任何用户。
As mentioned in setfacl manpages "This utility sets Access Control Lists (ACLs) of files and directories."正如 setfacl 联机帮助页中提到的“此实用程序设置文件和目录的访问控制列表 (ACL)”。 It's a little bit different from chmod and chown.
它与 chmod 和 chown 有点不同。 Using it you can grant required permissions to specific user.
使用它,您可以向特定用户授予所需的权限。 It's a bit more powerful tool and much more fine-grained.
它是一个更强大的工具,更细粒度。 If you want to dive deeper, read about Access Control Lists.
如果您想深入了解,请阅读访问控制列表。 For example, in ubuntu docs: https://help.ubuntu.com/community/FilePermissionsACLs
例如,在 ubuntu 文档中: https : //help.ubuntu.com/community/FilePermissionsACLs
Had same problem, it worked when you restart the program.有同样的问题,当您重新启动程序时它起作用了。
sudo chmod 777 -R /dev/kvm须藤 chmod 777 -R /dev/kvm
在 ubuntu 系统中,可以使用命令sudo chmod 777 -R /dev/kvm
更新内核虚拟机的权限。
Update system BIOS Setting Assus更新系统 BIOS 设置 Assus
正确的权限是:
sudo chmod 666 /dev/kvm
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.