What happens if I change chmod permissions to rrr [closed]












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















closed as unclear what you're asking by Romeo Ninov, Rui F Ribeiro, Jeff Schaller, Christopher, RalfFriedl Jan 22 at 20:48


Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.



















  • The permissions of which files, exactly?

    – Jeff Schaller
    Jan 19 at 20:08











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

    – Vitali Pom
    Jan 19 at 20:10
















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















closed as unclear what you're asking by Romeo Ninov, Rui F Ribeiro, Jeff Schaller, Christopher, RalfFriedl Jan 22 at 20:48


Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.



















  • The permissions of which files, exactly?

    – Jeff Schaller
    Jan 19 at 20:08











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

    – Vitali Pom
    Jan 19 at 20:10














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
















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















share|improve this question













share|improve this question




share|improve this question








edited Jan 19 at 20:09







Vitali Pom

















asked Jan 19 at 19:46









Vitali PomVitali Pom

1044




1044




closed as unclear what you're asking by Romeo Ninov, Rui F Ribeiro, Jeff Schaller, Christopher, RalfFriedl Jan 22 at 20:48


Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.









closed as unclear what you're asking by Romeo Ninov, Rui F Ribeiro, Jeff Schaller, Christopher, RalfFriedl Jan 22 at 20:48


Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.















  • The permissions of which files, exactly?

    – Jeff Schaller
    Jan 19 at 20:08











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

    – Vitali Pom
    Jan 19 at 20:10



















  • The permissions of which files, exactly?

    – Jeff Schaller
    Jan 19 at 20:08











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

    – Vitali Pom
    Jan 19 at 20:10

















The permissions of which files, exactly?

– Jeff Schaller
Jan 19 at 20:08





The permissions of which files, exactly?

– Jeff Schaller
Jan 19 at 20:08













Fixed it in edit. The permission of which chmod itslef

– Vitali Pom
Jan 19 at 20:10





Fixed it in edit. The permission of which chmod itslef

– Vitali Pom
Jan 19 at 20:10










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
    Jan 19 at 20:18











  • 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
    Jan 19 at 21:56



















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
    Jan 19 at 20:16











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

    – tchrist
    Jan 19 at 20:17











  • Now I do yes after reading the answers

    – Vitali Pom
    Jan 19 at 20:18











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

    – JdeBP
    Jan 19 at 20:46


















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
    Jan 19 at 20:18











  • 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
    Jan 19 at 21:56
















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
    Jan 19 at 20:18











  • 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
    Jan 19 at 21:56














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 Jan 19 at 20:19

























answered Jan 19 at 20:16









HenrikHenrik

3,6311419




3,6311419













  • 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
    Jan 19 at 20:18











  • 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
    Jan 19 at 21:56



















  • 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
    Jan 19 at 20:18











  • 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
    Jan 19 at 21:56

















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
Jan 19 at 20:18





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
Jan 19 at 20:18













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
Jan 19 at 21:56





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
Jan 19 at 21:56













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
    Jan 19 at 20:16











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

    – tchrist
    Jan 19 at 20:17











  • Now I do yes after reading the answers

    – Vitali Pom
    Jan 19 at 20:18











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

    – JdeBP
    Jan 19 at 20:46
















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
    Jan 19 at 20:16











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

    – tchrist
    Jan 19 at 20:17











  • Now I do yes after reading the answers

    – Vitali Pom
    Jan 19 at 20:18











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

    – JdeBP
    Jan 19 at 20:46














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 Jan 19 at 20:19

























answered Jan 19 at 20:14









tchristtchrist

369210




369210













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

    – Vitali Pom
    Jan 19 at 20:16











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

    – tchrist
    Jan 19 at 20:17











  • Now I do yes after reading the answers

    – Vitali Pom
    Jan 19 at 20:18











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

    – JdeBP
    Jan 19 at 20:46



















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

    – Vitali Pom
    Jan 19 at 20:16











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

    – tchrist
    Jan 19 at 20:17











  • Now I do yes after reading the answers

    – Vitali Pom
    Jan 19 at 20:18











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

    – JdeBP
    Jan 19 at 20:46

















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

– Vitali Pom
Jan 19 at 20:16





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

– Vitali Pom
Jan 19 at 20:16













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

– tchrist
Jan 19 at 20:17





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

– tchrist
Jan 19 at 20:17













Now I do yes after reading the answers

– Vitali Pom
Jan 19 at 20:18





Now I do yes after reading the answers

– Vitali Pom
Jan 19 at 20:18













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

– JdeBP
Jan 19 at 20:46





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

– JdeBP
Jan 19 at 20:46



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