What happens if I change chmod permissions to rrr












0















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?










share|improve this question









New contributor




Vitali Pom is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





















  • The permissions of which files, exactly?

    – Jeff Schaller
    2 hours ago











  • Fixed it in edit. The permission of which chmod itslef

    – Vitali Pom
    2 hours ago
















0















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?










share|improve this question









New contributor




Vitali Pom is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





















  • The permissions of which files, exactly?

    – Jeff Schaller
    2 hours ago











  • Fixed it in edit. The permission of which chmod itslef

    – Vitali Pom
    2 hours ago














0












0








0








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?










share|improve this question









New contributor




Vitali Pom is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












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






share|improve this question









New contributor




Vitali Pom is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




Vitali Pom is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited 2 hours ago







Vitali Pom













New contributor




Vitali Pom is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked 2 hours ago









Vitali PomVitali Pom

1044




1044




New contributor




Vitali Pom is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





Vitali Pom is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






Vitali Pom is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.













  • The permissions of which files, exactly?

    – Jeff Schaller
    2 hours ago











  • Fixed it in edit. The permission of which chmod itslef

    – Vitali Pom
    2 hours ago



















  • The permissions of which files, exactly?

    – Jeff Schaller
    2 hours ago











  • Fixed it in edit. The permission of which chmod itslef

    – Vitali Pom
    2 hours ago

















The permissions of which files, exactly?

– Jeff Schaller
2 hours ago





The permissions of which files, exactly?

– Jeff Schaller
2 hours ago













Fixed it in edit. The permission of which chmod itslef

– Vitali Pom
2 hours ago





Fixed it in edit. The permission of which chmod itslef

– Vitali Pom
2 hours ago










2 Answers
2






active

oldest

votes


















2














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.






share|improve this answer


























  • 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
    2 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
    36 mins ago



















2














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.






share|improve this answer


























  • yes it's okay, but this is chmod, will I be able to revert it somehow?

    – Vitali Pom
    2 hours ago











  • @VitaliPom Do you understand the difference between executing a program and calling the kernel syscall?

    – tchrist
    2 hours ago











  • Now I do yes after reading the answers

    – Vitali Pom
    2 hours ago











  • Actually, there are several ways of getting back, from toybox to install. But that's properly another question.

    – JdeBP
    1 hour ago











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.










draft saved

draft discarded


















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









2














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.






share|improve this answer


























  • 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
    2 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
    36 mins ago
















2














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.






share|improve this answer


























  • 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
    2 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
    36 mins ago














2












2








2







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.






share|improve this answer















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.







share|improve this answer














share|improve this answer



share|improve this answer








edited 2 hours ago

























answered 2 hours ago









HenrikHenrik

3,6211419




3,6211419













  • 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
    2 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
    36 mins 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
    2 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
    36 mins 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
2 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
2 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
36 mins 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
36 mins ago













2














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.






share|improve this answer


























  • yes it's okay, but this is chmod, will I be able to revert it somehow?

    – Vitali Pom
    2 hours ago











  • @VitaliPom Do you understand the difference between executing a program and calling the kernel syscall?

    – tchrist
    2 hours ago











  • Now I do yes after reading the answers

    – Vitali Pom
    2 hours ago











  • Actually, there are several ways of getting back, from toybox to install. But that's properly another question.

    – JdeBP
    1 hour ago
















2














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.






share|improve this answer


























  • yes it's okay, but this is chmod, will I be able to revert it somehow?

    – Vitali Pom
    2 hours ago











  • @VitaliPom Do you understand the difference between executing a program and calling the kernel syscall?

    – tchrist
    2 hours ago











  • Now I do yes after reading the answers

    – Vitali Pom
    2 hours ago











  • Actually, there are several ways of getting back, from toybox to install. But that's properly another question.

    – JdeBP
    1 hour ago














2












2








2







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.






share|improve this answer















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.







share|improve this answer














share|improve this answer



share|improve this answer








edited 2 hours ago

























answered 2 hours ago









tchristtchrist

24919




24919













  • yes it's okay, but this is chmod, will I be able to revert it somehow?

    – Vitali Pom
    2 hours ago











  • @VitaliPom Do you understand the difference between executing a program and calling the kernel syscall?

    – tchrist
    2 hours ago











  • Now I do yes after reading the answers

    – Vitali Pom
    2 hours ago











  • Actually, there are several ways of getting back, from toybox to install. But that's properly another question.

    – JdeBP
    1 hour ago



















  • yes it's okay, but this is chmod, will I be able to revert it somehow?

    – Vitali Pom
    2 hours ago











  • @VitaliPom Do you understand the difference between executing a program and calling the kernel syscall?

    – tchrist
    2 hours ago











  • Now I do yes after reading the answers

    – Vitali Pom
    2 hours ago











  • Actually, there are several ways of getting back, from toybox to install. But that's properly another question.

    – JdeBP
    1 hour ago

















yes it's okay, but this is chmod, will I be able to revert it somehow?

– Vitali Pom
2 hours ago





yes it's okay, but this is chmod, will I be able to revert it somehow?

– Vitali Pom
2 hours ago













@VitaliPom Do you understand the difference between executing a program and calling the kernel syscall?

– tchrist
2 hours ago





@VitaliPom Do you understand the difference between executing a program and calling the kernel syscall?

– tchrist
2 hours ago













Now I do yes after reading the answers

– Vitali Pom
2 hours ago





Now I do yes after reading the answers

– Vitali Pom
2 hours ago













Actually, there are several ways of getting back, from toybox to install. But that's properly another question.

– JdeBP
1 hour ago





Actually, there are several ways of getting back, from toybox to install. But that's properly another question.

– JdeBP
1 hour ago










Vitali Pom is a new contributor. Be nice, and check out our Code of Conduct.










draft saved

draft discarded


















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.




draft saved


draft discarded














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





















































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 label and detect the document text images

Vallis Paradisi

Tabula Rosettana