Somehow an entire directory got changed into binary files, including my folders
up vote
2
down vote
favorite
Totally new to linux - trying to learn it as I'm a PHP developer. I was having some issues with wordpress and in trying to fix them my permissions got out of whack for my /var/www/html folder, to the point where I had to launch Atom using sudo atom
just so I could write to my files. Today I tried to fix the issue, and honestly I don't understand the linux permission system whatsoever, so I just turned to Google. I found a recommendation to use:
sudo chmod 766 -R /var/www/html
I used that, and now everything in the html directory has been changed to a binary file (Binary (application/octet-stream)). All of the folders have been changed to binary files with the same name as before and all of the files that were inside of those folders are nowhere to be found. Is there any way to recover these files?
16.04
add a comment |Â
up vote
2
down vote
favorite
Totally new to linux - trying to learn it as I'm a PHP developer. I was having some issues with wordpress and in trying to fix them my permissions got out of whack for my /var/www/html folder, to the point where I had to launch Atom using sudo atom
just so I could write to my files. Today I tried to fix the issue, and honestly I don't understand the linux permission system whatsoever, so I just turned to Google. I found a recommendation to use:
sudo chmod 766 -R /var/www/html
I used that, and now everything in the html directory has been changed to a binary file (Binary (application/octet-stream)). All of the folders have been changed to binary files with the same name as before and all of the files that were inside of those folders are nowhere to be found. Is there any way to recover these files?
16.04
3
It's almost always a bad idea to usechmod -R
, particularly with an insane mode like766
. Fix the permissions and see if that resolves the problem. I'd imagine you could use mode644
for regular files and mode755
for directories.
â Chai T. Rex
Mar 8 at 1:18
Maybe your wordpress got hacked you are ramsoned?
â davidbaumann
Mar 8 at 8:04
Could you please add the output ofsudo ls -l /var/www/html
to your question ?
â Soren A
Mar 8 at 8:58
I guess you seeapplication/octet-stream
because you are owner of these files and you set all of them to executeable (766)... in regards to "ll of the files that were inside of those folders are nowhere to be found" I guessnautilus
might have a problem with that? try to navigate on the commandline
â Robert Riedl
Mar 8 at 11:30
add a comment |Â
up vote
2
down vote
favorite
up vote
2
down vote
favorite
Totally new to linux - trying to learn it as I'm a PHP developer. I was having some issues with wordpress and in trying to fix them my permissions got out of whack for my /var/www/html folder, to the point where I had to launch Atom using sudo atom
just so I could write to my files. Today I tried to fix the issue, and honestly I don't understand the linux permission system whatsoever, so I just turned to Google. I found a recommendation to use:
sudo chmod 766 -R /var/www/html
I used that, and now everything in the html directory has been changed to a binary file (Binary (application/octet-stream)). All of the folders have been changed to binary files with the same name as before and all of the files that were inside of those folders are nowhere to be found. Is there any way to recover these files?
16.04
Totally new to linux - trying to learn it as I'm a PHP developer. I was having some issues with wordpress and in trying to fix them my permissions got out of whack for my /var/www/html folder, to the point where I had to launch Atom using sudo atom
just so I could write to my files. Today I tried to fix the issue, and honestly I don't understand the linux permission system whatsoever, so I just turned to Google. I found a recommendation to use:
sudo chmod 766 -R /var/www/html
I used that, and now everything in the html directory has been changed to a binary file (Binary (application/octet-stream)). All of the folders have been changed to binary files with the same name as before and all of the files that were inside of those folders are nowhere to be found. Is there any way to recover these files?
16.04
16.04
edited Mar 8 at 1:26
wjandrea
7,22342256
7,22342256
asked Mar 8 at 1:12
user393466
142
142
3
It's almost always a bad idea to usechmod -R
, particularly with an insane mode like766
. Fix the permissions and see if that resolves the problem. I'd imagine you could use mode644
for regular files and mode755
for directories.
â Chai T. Rex
Mar 8 at 1:18
Maybe your wordpress got hacked you are ramsoned?
â davidbaumann
Mar 8 at 8:04
Could you please add the output ofsudo ls -l /var/www/html
to your question ?
â Soren A
Mar 8 at 8:58
I guess you seeapplication/octet-stream
because you are owner of these files and you set all of them to executeable (766)... in regards to "ll of the files that were inside of those folders are nowhere to be found" I guessnautilus
might have a problem with that? try to navigate on the commandline
â Robert Riedl
Mar 8 at 11:30
add a comment |Â
3
It's almost always a bad idea to usechmod -R
, particularly with an insane mode like766
. Fix the permissions and see if that resolves the problem. I'd imagine you could use mode644
for regular files and mode755
for directories.
â Chai T. Rex
Mar 8 at 1:18
Maybe your wordpress got hacked you are ramsoned?
â davidbaumann
Mar 8 at 8:04
Could you please add the output ofsudo ls -l /var/www/html
to your question ?
â Soren A
Mar 8 at 8:58
I guess you seeapplication/octet-stream
because you are owner of these files and you set all of them to executeable (766)... in regards to "ll of the files that were inside of those folders are nowhere to be found" I guessnautilus
might have a problem with that? try to navigate on the commandline
â Robert Riedl
Mar 8 at 11:30
3
3
It's almost always a bad idea to use
chmod -R
, particularly with an insane mode like 766
. Fix the permissions and see if that resolves the problem. I'd imagine you could use mode 644
for regular files and mode 755
for directories.â Chai T. Rex
Mar 8 at 1:18
It's almost always a bad idea to use
chmod -R
, particularly with an insane mode like 766
. Fix the permissions and see if that resolves the problem. I'd imagine you could use mode 644
for regular files and mode 755
for directories.â Chai T. Rex
Mar 8 at 1:18
Maybe your wordpress got hacked you are ramsoned?
â davidbaumann
Mar 8 at 8:04
Maybe your wordpress got hacked you are ramsoned?
â davidbaumann
Mar 8 at 8:04
Could you please add the output of
sudo ls -l /var/www/html
to your question ?â Soren A
Mar 8 at 8:58
Could you please add the output of
sudo ls -l /var/www/html
to your question ?â Soren A
Mar 8 at 8:58
I guess you see
application/octet-stream
because you are owner of these files and you set all of them to executeable (766)... in regards to "ll of the files that were inside of those folders are nowhere to be found" I guess nautilus
might have a problem with that? try to navigate on the commandlineâ Robert Riedl
Mar 8 at 11:30
I guess you see
application/octet-stream
because you are owner of these files and you set all of them to executeable (766)... in regards to "ll of the files that were inside of those folders are nowhere to be found" I guess nautilus
might have a problem with that? try to navigate on the commandlineâ Robert Riedl
Mar 8 at 11:30
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
-1
down vote
I'm not going to pretend to know anything about Linux permissions or why this happened, but per advice in the comments I tried resetting all of the permissions for /var/. I used the step-by-step guide here and it totally fixed the issue - my files are back. Thanks!
Don't use answers to add comments. Update your question with relevant new information, or add a comment.
â Soren A
Mar 8 at 6:48
@SorenA I'm not going to say you are wrong, but the website has a button that clearly says "Answer Your Own Question." I posted a question here, and I found the answer and linked to the steps I used. If you have an issue with my use of that button for exactly what it says, take it up with the design team.
â user393466
Mar 8 at 18:19
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
-1
down vote
I'm not going to pretend to know anything about Linux permissions or why this happened, but per advice in the comments I tried resetting all of the permissions for /var/. I used the step-by-step guide here and it totally fixed the issue - my files are back. Thanks!
Don't use answers to add comments. Update your question with relevant new information, or add a comment.
â Soren A
Mar 8 at 6:48
@SorenA I'm not going to say you are wrong, but the website has a button that clearly says "Answer Your Own Question." I posted a question here, and I found the answer and linked to the steps I used. If you have an issue with my use of that button for exactly what it says, take it up with the design team.
â user393466
Mar 8 at 18:19
add a comment |Â
up vote
-1
down vote
I'm not going to pretend to know anything about Linux permissions or why this happened, but per advice in the comments I tried resetting all of the permissions for /var/. I used the step-by-step guide here and it totally fixed the issue - my files are back. Thanks!
Don't use answers to add comments. Update your question with relevant new information, or add a comment.
â Soren A
Mar 8 at 6:48
@SorenA I'm not going to say you are wrong, but the website has a button that clearly says "Answer Your Own Question." I posted a question here, and I found the answer and linked to the steps I used. If you have an issue with my use of that button for exactly what it says, take it up with the design team.
â user393466
Mar 8 at 18:19
add a comment |Â
up vote
-1
down vote
up vote
-1
down vote
I'm not going to pretend to know anything about Linux permissions or why this happened, but per advice in the comments I tried resetting all of the permissions for /var/. I used the step-by-step guide here and it totally fixed the issue - my files are back. Thanks!
I'm not going to pretend to know anything about Linux permissions or why this happened, but per advice in the comments I tried resetting all of the permissions for /var/. I used the step-by-step guide here and it totally fixed the issue - my files are back. Thanks!
answered Mar 8 at 5:12
user393466
142
142
Don't use answers to add comments. Update your question with relevant new information, or add a comment.
â Soren A
Mar 8 at 6:48
@SorenA I'm not going to say you are wrong, but the website has a button that clearly says "Answer Your Own Question." I posted a question here, and I found the answer and linked to the steps I used. If you have an issue with my use of that button for exactly what it says, take it up with the design team.
â user393466
Mar 8 at 18:19
add a comment |Â
Don't use answers to add comments. Update your question with relevant new information, or add a comment.
â Soren A
Mar 8 at 6:48
@SorenA I'm not going to say you are wrong, but the website has a button that clearly says "Answer Your Own Question." I posted a question here, and I found the answer and linked to the steps I used. If you have an issue with my use of that button for exactly what it says, take it up with the design team.
â user393466
Mar 8 at 18:19
Don't use answers to add comments. Update your question with relevant new information, or add a comment.
â Soren A
Mar 8 at 6:48
Don't use answers to add comments. Update your question with relevant new information, or add a comment.
â Soren A
Mar 8 at 6:48
@SorenA I'm not going to say you are wrong, but the website has a button that clearly says "Answer Your Own Question." I posted a question here, and I found the answer and linked to the steps I used. If you have an issue with my use of that button for exactly what it says, take it up with the design team.
â user393466
Mar 8 at 18:19
@SorenA I'm not going to say you are wrong, but the website has a button that clearly says "Answer Your Own Question." I posted a question here, and I found the answer and linked to the steps I used. If you have an issue with my use of that button for exactly what it says, take it up with the design team.
â user393466
Mar 8 at 18:19
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1012911%2fsomehow-an-entire-directory-got-changed-into-binary-files-including-my-folders%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
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
3
It's almost always a bad idea to use
chmod -R
, particularly with an insane mode like766
. Fix the permissions and see if that resolves the problem. I'd imagine you could use mode644
for regular files and mode755
for directories.â Chai T. Rex
Mar 8 at 1:18
Maybe your wordpress got hacked you are ramsoned?
â davidbaumann
Mar 8 at 8:04
Could you please add the output of
sudo ls -l /var/www/html
to your question ?â Soren A
Mar 8 at 8:58
I guess you see
application/octet-stream
because you are owner of these files and you set all of them to executeable (766)... in regards to "ll of the files that were inside of those folders are nowhere to be found" I guessnautilus
might have a problem with that? try to navigate on the commandlineâ Robert Riedl
Mar 8 at 11:30