Can't modify files in a directory even with root












0















While following this answer: https://askubuntu.com/a/715310



I ran the command:



sudo ln -s /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/backlight/amdgpu_bl0/brightness /sys/class/backlight


and I got the error:



ln: failed to create symbolic link '/sys/class/backlight/brightness': Operation not permitted



Other commands like mkdir and touch return the same error: Operation not permitted



I have tried running chown -R root /sys/class/backlight and running all the commands threw root but that didn't help either.



How come sudo cannot perform this operation and how can I fix it?










share|improve this question























  • That directory is not actually a directory you can create new links in - that directory isn't a 'normal' directory location. Why're you trying to create such a link?

    – Thomas Ward
    Jan 1 at 21:30













  • I am just following the instructions in: askubuntu.com/a/715310

    – can
    Jan 1 at 21:34
















0















While following this answer: https://askubuntu.com/a/715310



I ran the command:



sudo ln -s /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/backlight/amdgpu_bl0/brightness /sys/class/backlight


and I got the error:



ln: failed to create symbolic link '/sys/class/backlight/brightness': Operation not permitted



Other commands like mkdir and touch return the same error: Operation not permitted



I have tried running chown -R root /sys/class/backlight and running all the commands threw root but that didn't help either.



How come sudo cannot perform this operation and how can I fix it?










share|improve this question























  • That directory is not actually a directory you can create new links in - that directory isn't a 'normal' directory location. Why're you trying to create such a link?

    – Thomas Ward
    Jan 1 at 21:30













  • I am just following the instructions in: askubuntu.com/a/715310

    – can
    Jan 1 at 21:34














0












0








0








While following this answer: https://askubuntu.com/a/715310



I ran the command:



sudo ln -s /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/backlight/amdgpu_bl0/brightness /sys/class/backlight


and I got the error:



ln: failed to create symbolic link '/sys/class/backlight/brightness': Operation not permitted



Other commands like mkdir and touch return the same error: Operation not permitted



I have tried running chown -R root /sys/class/backlight and running all the commands threw root but that didn't help either.



How come sudo cannot perform this operation and how can I fix it?










share|improve this question














While following this answer: https://askubuntu.com/a/715310



I ran the command:



sudo ln -s /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/backlight/amdgpu_bl0/brightness /sys/class/backlight


and I got the error:



ln: failed to create symbolic link '/sys/class/backlight/brightness': Operation not permitted



Other commands like mkdir and touch return the same error: Operation not permitted



I have tried running chown -R root /sys/class/backlight and running all the commands threw root but that didn't help either.



How come sudo cannot perform this operation and how can I fix it?







permissions sudo






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Jan 1 at 21:27









cancan

31




31













  • That directory is not actually a directory you can create new links in - that directory isn't a 'normal' directory location. Why're you trying to create such a link?

    – Thomas Ward
    Jan 1 at 21:30













  • I am just following the instructions in: askubuntu.com/a/715310

    – can
    Jan 1 at 21:34



















  • That directory is not actually a directory you can create new links in - that directory isn't a 'normal' directory location. Why're you trying to create such a link?

    – Thomas Ward
    Jan 1 at 21:30













  • I am just following the instructions in: askubuntu.com/a/715310

    – can
    Jan 1 at 21:34

















That directory is not actually a directory you can create new links in - that directory isn't a 'normal' directory location. Why're you trying to create such a link?

– Thomas Ward
Jan 1 at 21:30







That directory is not actually a directory you can create new links in - that directory isn't a 'normal' directory location. Why're you trying to create such a link?

– Thomas Ward
Jan 1 at 21:30















I am just following the instructions in: askubuntu.com/a/715310

– can
Jan 1 at 21:34





I am just following the instructions in: askubuntu.com/a/715310

– can
Jan 1 at 21:34










1 Answer
1






active

oldest

votes


















1














Files inside of /sys and /proc are virtual file systems like procfs where the files aren't real.




The proc filesystem (procfs) is a special filesystem in Unix-like operating systems that presents information about processes and other system information in a hierarchical file-like structure, providing a more convenient and standardized method for dynamically accessing process data held in the kernel than traditional tracing methods or direct access to kernel memory.




More info see proc on Wikipedia



Also see man procfs






share|improve this answer
























  • So if you can't create links in /sys how come the answer askubuntu.com/a/715310/909484 got accepted?

    – can
    Jan 1 at 21:39











  • I believe the reason is that you can write and modify some contents of the pseudo-file system, but you cannot create new files within it, since they have nowhere to go. In this case it seems like you are trying to create a new file instead of symlinking to an existing file. Eg. try symlinking the amdgpu_bl0 directory not the specific brightness "file"

    – Kristopher Ives
    Jan 2 at 0:39











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%2f1106100%2fcant-modify-files-in-a-directory-even-with-root%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









1














Files inside of /sys and /proc are virtual file systems like procfs where the files aren't real.




The proc filesystem (procfs) is a special filesystem in Unix-like operating systems that presents information about processes and other system information in a hierarchical file-like structure, providing a more convenient and standardized method for dynamically accessing process data held in the kernel than traditional tracing methods or direct access to kernel memory.




More info see proc on Wikipedia



Also see man procfs






share|improve this answer
























  • So if you can't create links in /sys how come the answer askubuntu.com/a/715310/909484 got accepted?

    – can
    Jan 1 at 21:39











  • I believe the reason is that you can write and modify some contents of the pseudo-file system, but you cannot create new files within it, since they have nowhere to go. In this case it seems like you are trying to create a new file instead of symlinking to an existing file. Eg. try symlinking the amdgpu_bl0 directory not the specific brightness "file"

    – Kristopher Ives
    Jan 2 at 0:39
















1














Files inside of /sys and /proc are virtual file systems like procfs where the files aren't real.




The proc filesystem (procfs) is a special filesystem in Unix-like operating systems that presents information about processes and other system information in a hierarchical file-like structure, providing a more convenient and standardized method for dynamically accessing process data held in the kernel than traditional tracing methods or direct access to kernel memory.




More info see proc on Wikipedia



Also see man procfs






share|improve this answer
























  • So if you can't create links in /sys how come the answer askubuntu.com/a/715310/909484 got accepted?

    – can
    Jan 1 at 21:39











  • I believe the reason is that you can write and modify some contents of the pseudo-file system, but you cannot create new files within it, since they have nowhere to go. In this case it seems like you are trying to create a new file instead of symlinking to an existing file. Eg. try symlinking the amdgpu_bl0 directory not the specific brightness "file"

    – Kristopher Ives
    Jan 2 at 0:39














1












1








1







Files inside of /sys and /proc are virtual file systems like procfs where the files aren't real.




The proc filesystem (procfs) is a special filesystem in Unix-like operating systems that presents information about processes and other system information in a hierarchical file-like structure, providing a more convenient and standardized method for dynamically accessing process data held in the kernel than traditional tracing methods or direct access to kernel memory.




More info see proc on Wikipedia



Also see man procfs






share|improve this answer













Files inside of /sys and /proc are virtual file systems like procfs where the files aren't real.




The proc filesystem (procfs) is a special filesystem in Unix-like operating systems that presents information about processes and other system information in a hierarchical file-like structure, providing a more convenient and standardized method for dynamically accessing process data held in the kernel than traditional tracing methods or direct access to kernel memory.




More info see proc on Wikipedia



Also see man procfs







share|improve this answer












share|improve this answer



share|improve this answer










answered Jan 1 at 21:35









Kristopher IvesKristopher Ives

2,53711322




2,53711322













  • So if you can't create links in /sys how come the answer askubuntu.com/a/715310/909484 got accepted?

    – can
    Jan 1 at 21:39











  • I believe the reason is that you can write and modify some contents of the pseudo-file system, but you cannot create new files within it, since they have nowhere to go. In this case it seems like you are trying to create a new file instead of symlinking to an existing file. Eg. try symlinking the amdgpu_bl0 directory not the specific brightness "file"

    – Kristopher Ives
    Jan 2 at 0:39



















  • So if you can't create links in /sys how come the answer askubuntu.com/a/715310/909484 got accepted?

    – can
    Jan 1 at 21:39











  • I believe the reason is that you can write and modify some contents of the pseudo-file system, but you cannot create new files within it, since they have nowhere to go. In this case it seems like you are trying to create a new file instead of symlinking to an existing file. Eg. try symlinking the amdgpu_bl0 directory not the specific brightness "file"

    – Kristopher Ives
    Jan 2 at 0:39

















So if you can't create links in /sys how come the answer askubuntu.com/a/715310/909484 got accepted?

– can
Jan 1 at 21:39





So if you can't create links in /sys how come the answer askubuntu.com/a/715310/909484 got accepted?

– can
Jan 1 at 21:39













I believe the reason is that you can write and modify some contents of the pseudo-file system, but you cannot create new files within it, since they have nowhere to go. In this case it seems like you are trying to create a new file instead of symlinking to an existing file. Eg. try symlinking the amdgpu_bl0 directory not the specific brightness "file"

– Kristopher Ives
Jan 2 at 0:39





I believe the reason is that you can write and modify some contents of the pseudo-file system, but you cannot create new files within it, since they have nowhere to go. In this case it seems like you are trying to create a new file instead of symlinking to an existing file. Eg. try symlinking the amdgpu_bl0 directory not the specific brightness "file"

– Kristopher Ives
Jan 2 at 0:39


















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%2f1106100%2fcant-modify-files-in-a-directory-even-with-root%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

How to change which sound is reproduced for terminal bell?

Can I use Tabulator js library in my java Spring + Thymeleaf project?

Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents