What happens if I change chmod permissions to rrr [closed]
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
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.
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
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 ofwhich chmod
itslef
– Vitali Pom
Jan 19 at 20:10
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
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
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 ofwhich chmod
itslef
– Vitali Pom
Jan 19 at 20:10
add a comment |
The permissions of which files, exactly?
– Jeff Schaller
Jan 19 at 20:08
Fixed it in edit. The permission ofwhich 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
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
Jan 19 at 20:18
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
Jan 19 at 21:56
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
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 toinstall
. But that's properly another question.
– JdeBP
Jan 19 at 20:46
add a comment |
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
Jan 19 at 20:18
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
Jan 19 at 21:56
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
Jan 19 at 20:18
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
Jan 19 at 21:56
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 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 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
Jan 19 at 20:18
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
Jan 19 at 21:56
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
Jan 19 at 20:18
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
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
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
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 toinstall
. But that's properly another question.
– JdeBP
Jan 19 at 20:46
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
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 toinstall
. But that's properly another question.
– JdeBP
Jan 19 at 20:46
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 Jan 19 at 20:19
answered Jan 19 at 20:14
tchristtchrist
369210
369210
yes it's okay, but this ischmod
, 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 toinstall
. But that's properly another question.
– JdeBP
Jan 19 at 20:46
add a comment |
yes it's okay, but this ischmod
, 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 toinstall
. 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
add a comment |
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