Changes of premissions/ownership for a file revert back to root automatically












0















I have this character device file called /dev/kvm, that Android Studio needs to run it's emulator with. Android studio also needs permissions for it and by default this kvm file is with root ownership (as shown from ls -la):



crw-rw----   1 root kvm      10, 232 мар  6 18:25 kvm


I try changing it's ownership to my default sudo user, with sudo chown myusrname /dev/kvm and it works, the emulator starts, no problems.



HOWEVER after some time the file reverts back to root ownership automatically. Seems pretty strange. The same goes for changing rwx permissions on that file (using sudo chmod 755 /dev/kvm). After the computer reboots, or after the file has been used once it just reverts back to it's original permissions and root ownership.



Do you have any idea what is causing this and how to fix it?










share|improve this question

























  • Device nodes are dynamically created by udev - although it is possible to write udev rules to assign specific ownership/permissions to particular devices, it would be better IMHO to assign appropriate group membership to the Android Studio user. See for example Android Studio: /dev/kvm device permission denied

    – steeldriver
    yesterday











  • Related: Ubuntu 14 Android Studio 3 xrdp /dev/kvm permission denied

    – steeldriver
    yesterday











  • Looks like you should add the user to the kvm-group instead of changing the ownership of the character device file.

    – mook765
    yesterday


















0















I have this character device file called /dev/kvm, that Android Studio needs to run it's emulator with. Android studio also needs permissions for it and by default this kvm file is with root ownership (as shown from ls -la):



crw-rw----   1 root kvm      10, 232 мар  6 18:25 kvm


I try changing it's ownership to my default sudo user, with sudo chown myusrname /dev/kvm and it works, the emulator starts, no problems.



HOWEVER after some time the file reverts back to root ownership automatically. Seems pretty strange. The same goes for changing rwx permissions on that file (using sudo chmod 755 /dev/kvm). After the computer reboots, or after the file has been used once it just reverts back to it's original permissions and root ownership.



Do you have any idea what is causing this and how to fix it?










share|improve this question

























  • Device nodes are dynamically created by udev - although it is possible to write udev rules to assign specific ownership/permissions to particular devices, it would be better IMHO to assign appropriate group membership to the Android Studio user. See for example Android Studio: /dev/kvm device permission denied

    – steeldriver
    yesterday











  • Related: Ubuntu 14 Android Studio 3 xrdp /dev/kvm permission denied

    – steeldriver
    yesterday











  • Looks like you should add the user to the kvm-group instead of changing the ownership of the character device file.

    – mook765
    yesterday
















0












0








0








I have this character device file called /dev/kvm, that Android Studio needs to run it's emulator with. Android studio also needs permissions for it and by default this kvm file is with root ownership (as shown from ls -la):



crw-rw----   1 root kvm      10, 232 мар  6 18:25 kvm


I try changing it's ownership to my default sudo user, with sudo chown myusrname /dev/kvm and it works, the emulator starts, no problems.



HOWEVER after some time the file reverts back to root ownership automatically. Seems pretty strange. The same goes for changing rwx permissions on that file (using sudo chmod 755 /dev/kvm). After the computer reboots, or after the file has been used once it just reverts back to it's original permissions and root ownership.



Do you have any idea what is causing this and how to fix it?










share|improve this question
















I have this character device file called /dev/kvm, that Android Studio needs to run it's emulator with. Android studio also needs permissions for it and by default this kvm file is with root ownership (as shown from ls -la):



crw-rw----   1 root kvm      10, 232 мар  6 18:25 kvm


I try changing it's ownership to my default sudo user, with sudo chown myusrname /dev/kvm and it works, the emulator starts, no problems.



HOWEVER after some time the file reverts back to root ownership automatically. Seems pretty strange. The same goes for changing rwx permissions on that file (using sudo chmod 755 /dev/kvm). After the computer reboots, or after the file has been used once it just reverts back to it's original permissions and root ownership.



Do you have any idea what is causing this and how to fix it?







chmod chown






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited yesterday







Vlad Skurtolov

















asked yesterday









Vlad SkurtolovVlad Skurtolov

1296




1296













  • Device nodes are dynamically created by udev - although it is possible to write udev rules to assign specific ownership/permissions to particular devices, it would be better IMHO to assign appropriate group membership to the Android Studio user. See for example Android Studio: /dev/kvm device permission denied

    – steeldriver
    yesterday











  • Related: Ubuntu 14 Android Studio 3 xrdp /dev/kvm permission denied

    – steeldriver
    yesterday











  • Looks like you should add the user to the kvm-group instead of changing the ownership of the character device file.

    – mook765
    yesterday





















  • Device nodes are dynamically created by udev - although it is possible to write udev rules to assign specific ownership/permissions to particular devices, it would be better IMHO to assign appropriate group membership to the Android Studio user. See for example Android Studio: /dev/kvm device permission denied

    – steeldriver
    yesterday











  • Related: Ubuntu 14 Android Studio 3 xrdp /dev/kvm permission denied

    – steeldriver
    yesterday











  • Looks like you should add the user to the kvm-group instead of changing the ownership of the character device file.

    – mook765
    yesterday



















Device nodes are dynamically created by udev - although it is possible to write udev rules to assign specific ownership/permissions to particular devices, it would be better IMHO to assign appropriate group membership to the Android Studio user. See for example Android Studio: /dev/kvm device permission denied

– steeldriver
yesterday





Device nodes are dynamically created by udev - although it is possible to write udev rules to assign specific ownership/permissions to particular devices, it would be better IMHO to assign appropriate group membership to the Android Studio user. See for example Android Studio: /dev/kvm device permission denied

– steeldriver
yesterday













Related: Ubuntu 14 Android Studio 3 xrdp /dev/kvm permission denied

– steeldriver
yesterday





Related: Ubuntu 14 Android Studio 3 xrdp /dev/kvm permission denied

– steeldriver
yesterday













Looks like you should add the user to the kvm-group instead of changing the ownership of the character device file.

– mook765
yesterday







Looks like you should add the user to the kvm-group instead of changing the ownership of the character device file.

– mook765
yesterday












0






active

oldest

votes











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1123535%2fchanges-of-premissions-ownership-for-a-file-revert-back-to-root-automatically%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Ask Ubuntu!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1123535%2fchanges-of-premissions-ownership-for-a-file-revert-back-to-root-automatically%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

數位音樂下載

When can things happen in Etherscan, such as the picture below?

格利澤436b