What happens if I change chmod permissions to rrr
I want to try to change /bin/chmod
permissions file to rrr
but afraid to loose my machine. What happens next if I change them?
permissions root chmod
New contributor
add a comment |
I want to try to change /bin/chmod
permissions file to rrr
but afraid to loose my machine. What happens next if I change them?
permissions root chmod
New contributor
The permissions of which files, exactly?
– Jeff Schaller
6 hours ago
Fixed it in edit. The permission ofwhich chmod
itslef
– Vitali Pom
6 hours ago
add a comment |
I want to try to change /bin/chmod
permissions file to rrr
but afraid to loose my machine. What happens next if I change them?
permissions root chmod
New contributor
I want to try to change /bin/chmod
permissions file to rrr
but afraid to loose my machine. What happens next if I change them?
permissions root chmod
permissions root chmod
New contributor
New contributor
edited 6 hours ago
Vitali Pom
New contributor
asked 6 hours ago
Vitali PomVitali Pom
1044
1044
New contributor
New contributor
The permissions of which files, exactly?
– Jeff Schaller
6 hours ago
Fixed it in edit. The permission ofwhich chmod
itslef
– Vitali Pom
6 hours ago
add a comment |
The permissions of which files, exactly?
– Jeff Schaller
6 hours ago
Fixed it in edit. The permission ofwhich chmod
itslef
– Vitali Pom
6 hours ago
The permissions of which files, exactly?
– Jeff Schaller
6 hours ago
The permissions of which files, exactly?
– Jeff Schaller
6 hours ago
Fixed it in edit. The permission of
which chmod
itslef– Vitali Pom
6 hours ago
Fixed it in edit. The permission of
which chmod
itslef– Vitali Pom
6 hours ago
add a comment |
2 Answers
2
active
oldest
votes
Why do you want to do that? I don't see any potentially worthwhile point to that.
You won't lose your machine from doing that, but you'll make it a little harder to change permissions (anybody who'll want to do that will have to find - or make - another program that performs the chmod(2)
system call.
I would recommend against doing that, and if you have done so (by accident) I would hurry to find another tool that could undo the change.
oh, so you're saying I'll have to write a little bit more complex program similar tochmod
to revert the changes to chmod itself (like something in C that revert the metadata settings to the original file itself (akachmod
).
– Vitali Pom
5 hours ago
There are many, many possibilities. You could archive yourchmod
binary, e.g. usingpax
,tar
, orcpio
, then change the permission metadata inside the archive using a hex editor, then extract it again. Or, just runruby -e 'File.chmod(0755, "/bin/chmod"'
, or the Perl, Python, PHP, or Tcl equivalent.
– Jörg W Mittag
4 hours ago
add a comment |
If you remove execute permissions from the chmod binary, then all shell scripts (including Makefiles!) that try to execute it will get an error when they try. This includes countless administrative and installation scripts. Your system will fail to work correctly in many unforeseen ways.
Actual programs that call the Unix syscall directly instead of exec’ing another program to do their dirty work for them will be unaffected. But this is little consolation, and your system will still be seriously broken and potentially damaged.
To revert, you would have to write an actual program that can access the real syscall, which means using something like C or Perl, not the shell.
yes it's okay, but this ischmod
, will I be able to revert it somehow?
– Vitali Pom
5 hours ago
@VitaliPom Do you understand the difference between executing a program and calling the kernel syscall?
– tchrist
5 hours ago
Now I do yes after reading the answers
– Vitali Pom
5 hours ago
Actually, there are several ways of getting back, from toybox toinstall
. But that's properly another question.
– JdeBP
5 hours ago
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
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: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
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
});
}
});
Vitali Pom is a new contributor. Be nice, and check out our Code of Conduct.
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%2funix.stackexchange.com%2fquestions%2f495513%2fwhat-happens-if-i-change-chmod-permissions-to-rrr%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
Why do you want to do that? I don't see any potentially worthwhile point to that.
You won't lose your machine from doing that, but you'll make it a little harder to change permissions (anybody who'll want to do that will have to find - or make - another program that performs the chmod(2)
system call.
I would recommend against doing that, and if you have done so (by accident) I would hurry to find another tool that could undo the change.
oh, so you're saying I'll have to write a little bit more complex program similar tochmod
to revert the changes to chmod itself (like something in C that revert the metadata settings to the original file itself (akachmod
).
– Vitali Pom
5 hours ago
There are many, many possibilities. You could archive yourchmod
binary, e.g. usingpax
,tar
, orcpio
, then change the permission metadata inside the archive using a hex editor, then extract it again. Or, just runruby -e 'File.chmod(0755, "/bin/chmod"'
, or the Perl, Python, PHP, or Tcl equivalent.
– Jörg W Mittag
4 hours ago
add a comment |
Why do you want to do that? I don't see any potentially worthwhile point to that.
You won't lose your machine from doing that, but you'll make it a little harder to change permissions (anybody who'll want to do that will have to find - or make - another program that performs the chmod(2)
system call.
I would recommend against doing that, and if you have done so (by accident) I would hurry to find another tool that could undo the change.
oh, so you're saying I'll have to write a little bit more complex program similar tochmod
to revert the changes to chmod itself (like something in C that revert the metadata settings to the original file itself (akachmod
).
– Vitali Pom
5 hours ago
There are many, many possibilities. You could archive yourchmod
binary, e.g. usingpax
,tar
, orcpio
, then change the permission metadata inside the archive using a hex editor, then extract it again. Or, just runruby -e 'File.chmod(0755, "/bin/chmod"'
, or the Perl, Python, PHP, or Tcl equivalent.
– Jörg W Mittag
4 hours ago
add a comment |
Why do you want to do that? I don't see any potentially worthwhile point to that.
You won't lose your machine from doing that, but you'll make it a little harder to change permissions (anybody who'll want to do that will have to find - or make - another program that performs the chmod(2)
system call.
I would recommend against doing that, and if you have done so (by accident) I would hurry to find another tool that could undo the change.
Why do you want to do that? I don't see any potentially worthwhile point to that.
You won't lose your machine from doing that, but you'll make it a little harder to change permissions (anybody who'll want to do that will have to find - or make - another program that performs the chmod(2)
system call.
I would recommend against doing that, and if you have done so (by accident) I would hurry to find another tool that could undo the change.
edited 5 hours ago
answered 5 hours ago
HenrikHenrik
3,6211419
3,6211419
oh, so you're saying I'll have to write a little bit more complex program similar tochmod
to revert the changes to chmod itself (like something in C that revert the metadata settings to the original file itself (akachmod
).
– Vitali Pom
5 hours ago
There are many, many possibilities. You could archive yourchmod
binary, e.g. usingpax
,tar
, orcpio
, then change the permission metadata inside the archive using a hex editor, then extract it again. Or, just runruby -e 'File.chmod(0755, "/bin/chmod"'
, or the Perl, Python, PHP, or Tcl equivalent.
– Jörg W Mittag
4 hours ago
add a comment |
oh, so you're saying I'll have to write a little bit more complex program similar tochmod
to revert the changes to chmod itself (like something in C that revert the metadata settings to the original file itself (akachmod
).
– Vitali Pom
5 hours ago
There are many, many possibilities. You could archive yourchmod
binary, e.g. usingpax
,tar
, orcpio
, then change the permission metadata inside the archive using a hex editor, then extract it again. Or, just runruby -e 'File.chmod(0755, "/bin/chmod"'
, or the Perl, Python, PHP, or Tcl equivalent.
– Jörg W Mittag
4 hours ago
oh, so you're saying I'll have to write a little bit more complex program similar to
chmod
to revert the changes to chmod itself (like something in C that revert the metadata settings to the original file itself (aka chmod
).– Vitali Pom
5 hours ago
oh, so you're saying I'll have to write a little bit more complex program similar to
chmod
to revert the changes to chmod itself (like something in C that revert the metadata settings to the original file itself (aka chmod
).– Vitali Pom
5 hours ago
There are many, many possibilities. You could archive your
chmod
binary, e.g. using pax
, tar
, or cpio
, then change the permission metadata inside the archive using a hex editor, then extract it again. Or, just run ruby -e 'File.chmod(0755, "/bin/chmod"'
, or the Perl, Python, PHP, or Tcl equivalent.– Jörg W Mittag
4 hours ago
There are many, many possibilities. You could archive your
chmod
binary, e.g. using pax
, tar
, or cpio
, then change the permission metadata inside the archive using a hex editor, then extract it again. Or, just run ruby -e 'File.chmod(0755, "/bin/chmod"'
, or the Perl, Python, PHP, or Tcl equivalent.– Jörg W Mittag
4 hours ago
add a comment |
If you remove execute permissions from the chmod binary, then all shell scripts (including Makefiles!) that try to execute it will get an error when they try. This includes countless administrative and installation scripts. Your system will fail to work correctly in many unforeseen ways.
Actual programs that call the Unix syscall directly instead of exec’ing another program to do their dirty work for them will be unaffected. But this is little consolation, and your system will still be seriously broken and potentially damaged.
To revert, you would have to write an actual program that can access the real syscall, which means using something like C or Perl, not the shell.
yes it's okay, but this ischmod
, will I be able to revert it somehow?
– Vitali Pom
5 hours ago
@VitaliPom Do you understand the difference between executing a program and calling the kernel syscall?
– tchrist
5 hours ago
Now I do yes after reading the answers
– Vitali Pom
5 hours ago
Actually, there are several ways of getting back, from toybox toinstall
. But that's properly another question.
– JdeBP
5 hours ago
add a comment |
If you remove execute permissions from the chmod binary, then all shell scripts (including Makefiles!) that try to execute it will get an error when they try. This includes countless administrative and installation scripts. Your system will fail to work correctly in many unforeseen ways.
Actual programs that call the Unix syscall directly instead of exec’ing another program to do their dirty work for them will be unaffected. But this is little consolation, and your system will still be seriously broken and potentially damaged.
To revert, you would have to write an actual program that can access the real syscall, which means using something like C or Perl, not the shell.
yes it's okay, but this ischmod
, will I be able to revert it somehow?
– Vitali Pom
5 hours ago
@VitaliPom Do you understand the difference between executing a program and calling the kernel syscall?
– tchrist
5 hours ago
Now I do yes after reading the answers
– Vitali Pom
5 hours ago
Actually, there are several ways of getting back, from toybox toinstall
. But that's properly another question.
– JdeBP
5 hours ago
add a comment |
If you remove execute permissions from the chmod binary, then all shell scripts (including Makefiles!) that try to execute it will get an error when they try. This includes countless administrative and installation scripts. Your system will fail to work correctly in many unforeseen ways.
Actual programs that call the Unix syscall directly instead of exec’ing another program to do their dirty work for them will be unaffected. But this is little consolation, and your system will still be seriously broken and potentially damaged.
To revert, you would have to write an actual program that can access the real syscall, which means using something like C or Perl, not the shell.
If you remove execute permissions from the chmod binary, then all shell scripts (including Makefiles!) that try to execute it will get an error when they try. This includes countless administrative and installation scripts. Your system will fail to work correctly in many unforeseen ways.
Actual programs that call the Unix syscall directly instead of exec’ing another program to do their dirty work for them will be unaffected. But this is little consolation, and your system will still be seriously broken and potentially damaged.
To revert, you would have to write an actual program that can access the real syscall, which means using something like C or Perl, not the shell.
edited 5 hours ago
answered 5 hours ago
tchristtchrist
24919
24919
yes it's okay, but this ischmod
, will I be able to revert it somehow?
– Vitali Pom
5 hours ago
@VitaliPom Do you understand the difference between executing a program and calling the kernel syscall?
– tchrist
5 hours ago
Now I do yes after reading the answers
– Vitali Pom
5 hours ago
Actually, there are several ways of getting back, from toybox toinstall
. But that's properly another question.
– JdeBP
5 hours ago
add a comment |
yes it's okay, but this ischmod
, will I be able to revert it somehow?
– Vitali Pom
5 hours ago
@VitaliPom Do you understand the difference between executing a program and calling the kernel syscall?
– tchrist
5 hours ago
Now I do yes after reading the answers
– Vitali Pom
5 hours ago
Actually, there are several ways of getting back, from toybox toinstall
. But that's properly another question.
– JdeBP
5 hours ago
yes it's okay, but this is
chmod
, will I be able to revert it somehow?– Vitali Pom
5 hours ago
yes it's okay, but this is
chmod
, will I be able to revert it somehow?– Vitali Pom
5 hours ago
@VitaliPom Do you understand the difference between executing a program and calling the kernel syscall?
– tchrist
5 hours ago
@VitaliPom Do you understand the difference between executing a program and calling the kernel syscall?
– tchrist
5 hours ago
Now I do yes after reading the answers
– Vitali Pom
5 hours ago
Now I do yes after reading the answers
– Vitali Pom
5 hours ago
Actually, there are several ways of getting back, from toybox to
install
. But that's properly another question.– JdeBP
5 hours ago
Actually, there are several ways of getting back, from toybox to
install
. But that's properly another question.– JdeBP
5 hours ago
add a comment |
Vitali Pom is a new contributor. Be nice, and check out our Code of Conduct.
Vitali Pom is a new contributor. Be nice, and check out our Code of Conduct.
Vitali Pom is a new contributor. Be nice, and check out our Code of Conduct.
Vitali Pom is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- 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%2funix.stackexchange.com%2fquestions%2f495513%2fwhat-happens-if-i-change-chmod-permissions-to-rrr%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
The permissions of which files, exactly?
– Jeff Schaller
6 hours ago
Fixed it in edit. The permission of
which chmod
itslef– Vitali Pom
6 hours ago