Cant read css or any scripts in my webpage
Hi all,
I need your help, I have got a problem with reading my css files on my webpage as it have stop it working. Some idiots that I hired on freelancer, he have changed the whole things that make things stop working especially the files and folder permissions where I could not see the files and folders. I had asked him to fix it and he came to fixed it and got it working, but i cant read the css files. It was working fine before.
What he used in the putty commend:
I can be able to get access to my website with no problem, but then I can't be able to read my css files after he made the changes. I have changed the public_html and files_backup folders permissions to 755, I can read my php and images files with no problem, but i cant read any of css files or any other scripts. :( There is something wrong that prevent me from reading it. Can you please help me how I can be able to read my css and other language files in my webpage?? If you can be able to help me to get it working again that would be great. I have learned my lesson in the hard way to never trust anyone whoever ask me for ssh or anything I will refuse and find someone else who I can trust.
chown -R myusername:myusername public_htmlI can be able to get access to my website with no problem, but then I can't be able to read my css files after he made the changes. I have changed the public_html and files_backup folders permissions to 755, I can read my php and images files with no problem, but i cant read any of css files or any other scripts. :( There is something wrong that prevent me from reading it. Can you please help me how I can be able to read my css and other language files in my webpage?? If you can be able to help me to get it working again that would be great. I have learned my lesson in the hard way to never trust anyone whoever ask me for ssh or anything I will refuse and find someone else who I can trust.
-
Folders should be 755 and all files should be 644 In shell terminal, you can bulk change using find /home//public_html/ -type f -exec chmod 644 {} \; find /home//public_html/* -type d -exec chmod 755 {} \;
Obviously change the for the actual username0 -
Folders should be 755 and all files should be 644 In shell terminal, you can bulk change using
find /home//public_html/ -type f -exec chmod 644 {} \; find /home//public_html/* -type d -exec chmod 755 {} \;
Obviously change the for the actual username
Thanks for your quick reply, I have input both of them in the commend. When I try it, I still cant be able to read my css, js or any language files. Any idea??0 -
What are the ownership and permissions of the specific css file? ls -al /home//public_html/path/to/css/file.css What is the owernship and permissions of the user's home directory? ls -ald /home/ The ownership and permissions of the /home//public_html might should be :nobody and 750. But : and 755 should also work. Edit: Is this referring to the account's main domain or is this referring to an addon domain? Something that might exist outside of the public_html folder? 0 -
What are the ownership and permissions of the specific css file? ls -al /home//public_html/path/to/css/file.css What is the owernship and permissions of the user's home directory? ls -ald /home/ The ownership and permissions of the /home//public_html might should be :nobody and 750. But : and 755 should also work. Edit: Is this referring to the account's main domain or is this referring to an addon domain? Something that might exist outside of the public_html folder?
Ok here it is:# ls -al /home//public_html/files_backup/style.css -rw-r--r-- 1 17565 Feb 5 16:37 /home//public_html/files_backup/style.css #ls -ald /home/ drwx--x--x 21 4096 Feb 1 00:46 /home/ #ls -ald /home//public_html drwxr-xr-x 21 4096 Feb 5 17:02 /home//public_html
Can you please paste the code that I could use in the ssh terminal for the :nobody 750 and 755??0 -
Your issue does not appear to be permission related What is the permissions of /home//public_html/files_backup ? ls -ald /home//public_html/files_backup Are you able to access the css file directory: [plain]http://example.tld/files_backup/style.css[/plain] 0 -
Your issue does not appear to be permission related What is the permissions of /home//public_html/files_backup ? ls -ald /home//public_html/files_backup Are you able to access the css file directory: [plain]http://example.tld/files_backup/style.css[/plain]
Here it is:# ls -ald /home//public_html/files_backup drwxr-xr-x 3 4096 Feb 5 16:37 /home//public_html/files_backup
yes I can be able to access to the file directory but not the file. I cant read it.0 -
What specific error message are you getting when you go to [plain]http://example.tld/files_backup/style.css[/plain] Are you sure your domain name is resolving to the account on your server? You will have to review the Apache error log to figure out why Apache is denying permission. I do not know why. What level of access did you give these people that made changes to your account? Did you give them root access? 0 -
What specific error message are you getting when you go to [plain]http://example.tld/files_backup/style.css[/plain] Are you sure your domain name is resolving to the account on your server? You will have to review the Apache error log to figure out why Apache is denying permission. I do not know why. What level of access did you give these people that made changes to your account? Did you give them root access?
There is no error when I go to [plain]http://example.tld/files_backup/style.css[/plain] Yes I am sure that my domain name is resolving to the account on my server as I can be able get access to my domain and my files. I dont know how I can review the Apache error log to figure out why Apache is denying the permission. You will have to tell me how and where it is so i will report it back. Yes I did give them my root access to fix my server and then here it is.0 -
There is no error when I go to [plain]http://example.tld/files_backup/style.css[/plain]
Then what specifically do you see?0 -
I wonder if they added anything into any of the htaccess files ? Check the file modification dates. 0 -
Then what specifically do you see?
At all I can see is a blank screen when I try to read my css file.0 -
I wonder if they added anything into any of the htaccess files ? Check the file modification dates.
I don't think so. Here is the htaccess:RewriteEngine On RewriteBase / #RewriteCond %{REQUEST_FILENAME} !-f #RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} -f [OR] # add a trailing slash to /wp-admin RewriteRule ^wp-admin$ wp-admin/ [R=301,L] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^ - [L] RewriteRule ^(wp-(content|admin|includes).*) $1 [L] RewriteRule ^(.*\.php)$ $1 [L] RewriteRule . index.php [L]0 -
Just found the problem, there was a problem with htaccess. I used this: RewriteRule . index.php [L]
which it have stop me getting access to any files so i have removed it and now it is working again! :)0 -
Just in case you need them, the official WP htaccess files, and tips and tricks, are published in their Codex : htaccess " WordPress Codex 0 -
Hello, I'm glad to see the responses were helpful. I've marked this thread as solved. 0
Please sign in to leave a comment.
Comments
17 comments