Skip to main content

Cant read css or any scripts in my webpage

Comments

17 comments

  • rpvw
    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
    0
  • chris0147
    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
  • sparek-3
    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
  • rpvw
    Check the file ownership on a working site, if your dev chowned the files, you may need to chown them back EDIT:
    0
  • chris0147
    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
  • sparek-3
    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
  • chris0147
    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
  • sparek-3
    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
  • chris0147
    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
  • sparek-3
    There is no error when I go to [plain]http://example.tld/files_backup/style.css[/plain]

    Then what specifically do you see?
    0
  • rpvw
    I wonder if they added anything into any of the htaccess files ? Check the file modification dates.
    0
  • chris0147
    Then what specifically do you see?

    At all I can see is a blank screen when I try to read my css file.
    0
  • chris0147
    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
  • chris0147
    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
  • rpvw
    Just in case you need them, the official WP htaccess files, and tips and tricks, are published in their Codex : htaccess " WordPress Codex
    0
  • chris0147
    Just in case you need them, the official WP htaccess files, and tips and tricks, are published in their Codex :

    Thank you very much for this, I have copied and pasted by using the 3.5 version and it's working great again. Thank you!
    0
  • cPanelMichael
    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.