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?
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.sudo ls -l /var/www/html
to your question ?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