Accidentally ran `chmod -R 755 *`. Is the situation desperate?Is NTFS under linux able to save a linux file,...

Replace data between quotes in a file

Dereferencing a pointer in a for loop initializer creates a seg fault

Why couldn't soldiers sight their own weapons without officers' orders?

What is a "Genuine Geraldo interviewee"?

Is this cheap "air conditioner" able to cool a room?

How do I explain to a team that the project they will work on for six months will 100% fail?

How can glass marbles naturally occur in a desert?

Why should public servants be apolitical?

Why are physicists so interested in irreps if in their non-block-diagonal form they mix all components of a vector?

Why are the inside diameters of some pipe larger than the stated size?

Ex-contractor published company source code and secrets online

Should I self-publish my novella on Amazon or try my luck getting publishers?

In a topological space if there exists a loop that cannot be contracted to a point does there exist a simple loop that cannot be contracted also?

Can I call myself an assistant professor without a PhD

Is there a loss of quality when converting RGB to HEX?

How can I read one message at a time from /var/mail

Yajilin minicubes: the Hullabaloo, the Brouhaha, the Bangarang

Does this Foo machine halt?

Plausibility of Ice Eaters in the Arctic

SQL Minimum Row count

Is it really ~648.69 km/s delta-v to "land" on the surface of the Sun?

Blocking people from taking pictures of me with smartphone

Does the United States guarantee any unique freedoms?

Atari ST DRAM timing puzzle



Accidentally ran `chmod -R 755 *`. Is the situation desperate?


Is NTFS under linux able to save a linux file, with its chown and chmod settings?Deluge permissions on a Synology NASHow to give permission to group to read/edit unowned files on archlinux?chmod 755 has stopped access to databasesWhat are the right permissions to set to make files unreadable unless it's my main user accessing them?Accidentall CHMOD 755 -R in home userCan I change the permissions of files that root has read only access to?How to revert a “sudo chmod 644 .*”?chmod and chown changes list






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







0















I accidentally ran chmod +x * inside ~/.config which contained two .sh file that I wanted to make executable. There is no prompt for password nor confirmation window in this situation, and I knew it, but that was a moment of inattention and it was already too late when I realized what I just typed.



Turns out that at some point, in a moment of panic, I ran chmod -R 755 * based on the beginning of this answer, as if reacting fast in that moment would make things better. This totally made things worse, spreading the issue to the whole system.



Fortunately, I was not super user (I would probably have thought more carefully if I had been, maybe I would have avoided the issue in the first place), but the extent of the damage already seems quite massive. All files and folders on my system that my user owned are now executable. This includes pretty much every kind of file, and over 10 TB in total, because I had several HDD mounted in /run/media/.



There are probably some folders of my system that I could fix because I know they contained mostly data that should not be executable, like pictures or videos. But I am mostly concerned about the rest.



Can I chmod -x /home to at least limit the security issue, and then fix just ~/.local/share/applications/*.desktop, or are there some other folders that I should check?



What about other / subfolders that my user might have been able to alter? I'm concerned about folders on the Linux system, and /home, but also the HDDs mounted in /run/media/myself (some of them contained software, not just static files).



Could there be a pattern that could help making a list of files for which execution permission is actually relevant, either by extension or from their content? This would perhaps allow me to chmod -x * to revert the massive change and then review manually the list to restore execution permissions on individuals files that should actually be executed.



I am backing up everything I can as I type, but I am backing up files that have been affected. Is there hope?



[Edit] Note that I have a laptop with the same distribution, same username, and many programs in common. Not everything is the exactly the same, but could I list files that are actually executable across the system on the laptop, and then have a script comparing this list to the other computer? If everything is made non-executable on the other computer with chmod -x *, then maybe the executable files found on the laptop that also occur on the other computer could be made executable automatically? Similar approach here.










share|improve this question









New contributor



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

















  • 2





    If you ran that command in that directory then it would have only given execute permissions to the files and directories located in the top level of that directory. In order for it to have operated on the files and directories located deeper in the directory, you would have had to used the -R switch with chmod and it even if you had done that, it wouldn't have operated on all of the files and directories that you own that are not in that directory.

    – Nasir Riley
    59 mins ago













  • You are right. I carefully reviewed the history of my commands. Turns out that at some point, in a moment of panic, I ran chmod -R 755 * based on the beginning of this answer, as if reacting fast in that moment would make things better. Fortunately I was still a normal user, not root, but this is likely what spread the issue to all files and subfolder in / that my user could edit.

    – Koubak
    41 mins ago




















0















I accidentally ran chmod +x * inside ~/.config which contained two .sh file that I wanted to make executable. There is no prompt for password nor confirmation window in this situation, and I knew it, but that was a moment of inattention and it was already too late when I realized what I just typed.



Turns out that at some point, in a moment of panic, I ran chmod -R 755 * based on the beginning of this answer, as if reacting fast in that moment would make things better. This totally made things worse, spreading the issue to the whole system.



Fortunately, I was not super user (I would probably have thought more carefully if I had been, maybe I would have avoided the issue in the first place), but the extent of the damage already seems quite massive. All files and folders on my system that my user owned are now executable. This includes pretty much every kind of file, and over 10 TB in total, because I had several HDD mounted in /run/media/.



There are probably some folders of my system that I could fix because I know they contained mostly data that should not be executable, like pictures or videos. But I am mostly concerned about the rest.



Can I chmod -x /home to at least limit the security issue, and then fix just ~/.local/share/applications/*.desktop, or are there some other folders that I should check?



What about other / subfolders that my user might have been able to alter? I'm concerned about folders on the Linux system, and /home, but also the HDDs mounted in /run/media/myself (some of them contained software, not just static files).



Could there be a pattern that could help making a list of files for which execution permission is actually relevant, either by extension or from their content? This would perhaps allow me to chmod -x * to revert the massive change and then review manually the list to restore execution permissions on individuals files that should actually be executed.



I am backing up everything I can as I type, but I am backing up files that have been affected. Is there hope?



[Edit] Note that I have a laptop with the same distribution, same username, and many programs in common. Not everything is the exactly the same, but could I list files that are actually executable across the system on the laptop, and then have a script comparing this list to the other computer? If everything is made non-executable on the other computer with chmod -x *, then maybe the executable files found on the laptop that also occur on the other computer could be made executable automatically? Similar approach here.










share|improve this question









New contributor



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

















  • 2





    If you ran that command in that directory then it would have only given execute permissions to the files and directories located in the top level of that directory. In order for it to have operated on the files and directories located deeper in the directory, you would have had to used the -R switch with chmod and it even if you had done that, it wouldn't have operated on all of the files and directories that you own that are not in that directory.

    – Nasir Riley
    59 mins ago













  • You are right. I carefully reviewed the history of my commands. Turns out that at some point, in a moment of panic, I ran chmod -R 755 * based on the beginning of this answer, as if reacting fast in that moment would make things better. Fortunately I was still a normal user, not root, but this is likely what spread the issue to all files and subfolder in / that my user could edit.

    – Koubak
    41 mins ago
















0












0








0








I accidentally ran chmod +x * inside ~/.config which contained two .sh file that I wanted to make executable. There is no prompt for password nor confirmation window in this situation, and I knew it, but that was a moment of inattention and it was already too late when I realized what I just typed.



Turns out that at some point, in a moment of panic, I ran chmod -R 755 * based on the beginning of this answer, as if reacting fast in that moment would make things better. This totally made things worse, spreading the issue to the whole system.



Fortunately, I was not super user (I would probably have thought more carefully if I had been, maybe I would have avoided the issue in the first place), but the extent of the damage already seems quite massive. All files and folders on my system that my user owned are now executable. This includes pretty much every kind of file, and over 10 TB in total, because I had several HDD mounted in /run/media/.



There are probably some folders of my system that I could fix because I know they contained mostly data that should not be executable, like pictures or videos. But I am mostly concerned about the rest.



Can I chmod -x /home to at least limit the security issue, and then fix just ~/.local/share/applications/*.desktop, or are there some other folders that I should check?



What about other / subfolders that my user might have been able to alter? I'm concerned about folders on the Linux system, and /home, but also the HDDs mounted in /run/media/myself (some of them contained software, not just static files).



Could there be a pattern that could help making a list of files for which execution permission is actually relevant, either by extension or from their content? This would perhaps allow me to chmod -x * to revert the massive change and then review manually the list to restore execution permissions on individuals files that should actually be executed.



I am backing up everything I can as I type, but I am backing up files that have been affected. Is there hope?



[Edit] Note that I have a laptop with the same distribution, same username, and many programs in common. Not everything is the exactly the same, but could I list files that are actually executable across the system on the laptop, and then have a script comparing this list to the other computer? If everything is made non-executable on the other computer with chmod -x *, then maybe the executable files found on the laptop that also occur on the other computer could be made executable automatically? Similar approach here.










share|improve this question









New contributor



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











I accidentally ran chmod +x * inside ~/.config which contained two .sh file that I wanted to make executable. There is no prompt for password nor confirmation window in this situation, and I knew it, but that was a moment of inattention and it was already too late when I realized what I just typed.



Turns out that at some point, in a moment of panic, I ran chmod -R 755 * based on the beginning of this answer, as if reacting fast in that moment would make things better. This totally made things worse, spreading the issue to the whole system.



Fortunately, I was not super user (I would probably have thought more carefully if I had been, maybe I would have avoided the issue in the first place), but the extent of the damage already seems quite massive. All files and folders on my system that my user owned are now executable. This includes pretty much every kind of file, and over 10 TB in total, because I had several HDD mounted in /run/media/.



There are probably some folders of my system that I could fix because I know they contained mostly data that should not be executable, like pictures or videos. But I am mostly concerned about the rest.



Can I chmod -x /home to at least limit the security issue, and then fix just ~/.local/share/applications/*.desktop, or are there some other folders that I should check?



What about other / subfolders that my user might have been able to alter? I'm concerned about folders on the Linux system, and /home, but also the HDDs mounted in /run/media/myself (some of them contained software, not just static files).



Could there be a pattern that could help making a list of files for which execution permission is actually relevant, either by extension or from their content? This would perhaps allow me to chmod -x * to revert the massive change and then review manually the list to restore execution permissions on individuals files that should actually be executed.



I am backing up everything I can as I type, but I am backing up files that have been affected. Is there hope?



[Edit] Note that I have a laptop with the same distribution, same username, and many programs in common. Not everything is the exactly the same, but could I list files that are actually executable across the system on the laptop, and then have a script comparing this list to the other computer? If everything is made non-executable on the other computer with chmod -x *, then maybe the executable files found on the laptop that also occur on the other computer could be made executable automatically? Similar approach here.







permissions chmod






share|improve this question









New contributor



Koubak 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



Koubak 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 15 mins ago







Koubak













New contributor



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








asked 1 hour ago









KoubakKoubak

61 bronze badge




61 bronze badge




New contributor



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




New contributor




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













  • 2





    If you ran that command in that directory then it would have only given execute permissions to the files and directories located in the top level of that directory. In order for it to have operated on the files and directories located deeper in the directory, you would have had to used the -R switch with chmod and it even if you had done that, it wouldn't have operated on all of the files and directories that you own that are not in that directory.

    – Nasir Riley
    59 mins ago













  • You are right. I carefully reviewed the history of my commands. Turns out that at some point, in a moment of panic, I ran chmod -R 755 * based on the beginning of this answer, as if reacting fast in that moment would make things better. Fortunately I was still a normal user, not root, but this is likely what spread the issue to all files and subfolder in / that my user could edit.

    – Koubak
    41 mins ago
















  • 2





    If you ran that command in that directory then it would have only given execute permissions to the files and directories located in the top level of that directory. In order for it to have operated on the files and directories located deeper in the directory, you would have had to used the -R switch with chmod and it even if you had done that, it wouldn't have operated on all of the files and directories that you own that are not in that directory.

    – Nasir Riley
    59 mins ago













  • You are right. I carefully reviewed the history of my commands. Turns out that at some point, in a moment of panic, I ran chmod -R 755 * based on the beginning of this answer, as if reacting fast in that moment would make things better. Fortunately I was still a normal user, not root, but this is likely what spread the issue to all files and subfolder in / that my user could edit.

    – Koubak
    41 mins ago










2




2





If you ran that command in that directory then it would have only given execute permissions to the files and directories located in the top level of that directory. In order for it to have operated on the files and directories located deeper in the directory, you would have had to used the -R switch with chmod and it even if you had done that, it wouldn't have operated on all of the files and directories that you own that are not in that directory.

– Nasir Riley
59 mins ago







If you ran that command in that directory then it would have only given execute permissions to the files and directories located in the top level of that directory. In order for it to have operated on the files and directories located deeper in the directory, you would have had to used the -R switch with chmod and it even if you had done that, it wouldn't have operated on all of the files and directories that you own that are not in that directory.

– Nasir Riley
59 mins ago















You are right. I carefully reviewed the history of my commands. Turns out that at some point, in a moment of panic, I ran chmod -R 755 * based on the beginning of this answer, as if reacting fast in that moment would make things better. Fortunately I was still a normal user, not root, but this is likely what spread the issue to all files and subfolder in / that my user could edit.

– Koubak
41 mins ago







You are right. I carefully reviewed the history of my commands. Turns out that at some point, in a moment of panic, I ran chmod -R 755 * based on the beginning of this answer, as if reacting fast in that moment would make things better. Fortunately I was still a normal user, not root, but this is likely what spread the issue to all files and subfolder in / that my user could edit.

– Koubak
41 mins ago












0






active

oldest

votes














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
});


}
});






Koubak 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%2f534833%2faccidentally-ran-chmod-r-755-is-the-situation-desperate%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes








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










draft saved

draft discarded


















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













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












Koubak 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%2f534833%2faccidentally-ran-chmod-r-755-is-the-situation-desperate%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

Taj Mahal Inhaltsverzeichnis Aufbau | Geschichte | 350-Jahr-Feier | Heutige Bedeutung | Siehe auch |...

Baia Sprie Cuprins Etimologie | Istorie | Demografie | Politică și administrație | Arii naturale...

Nicolae Petrescu-Găină Cuprins Biografie | Opera | In memoriam | Varia | Controverse, incertitudini...