Can't modify files in a directory even with root
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
add a comment |
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
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
add a comment |
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
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
permissions sudo
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
add a comment |
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
add a comment |
1 Answer
1
active
oldest
votes
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
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
add a comment |
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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
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
add a comment |
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
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
add a comment |
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
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
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
add a comment |
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
add a comment |
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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