1

I made a backup of my prod CentOS site to local Ubuntu. The site is all core --- Both by means of templates or modules; No contribs whatsoever. No customizations.

Yet the CSS won't load for whatever theme.

These are the only errors in drush ws --full

 128377  file      File temporary://filedOb2TA could not be moved/copied because the destination directory public://js is not configured correctly.   notice    http://localhost/benia/  127.0.0.1  19/Aug 22:15    
 128376  file      The file permissions could not be set on public://js.                                                                              error     http://localhost/benia/  127.0.0.1  19/Aug 22:15    
 128375  file      File temporary://fileEzTm0r could not be moved/copied because the destination directory public://css is not configured correctly.  notice    http://localhost/benia/  127.0.0.1  19/Aug 22:15    
 128374  file      The file permissions could not be set on public://css.                                                                             error     http://localhost/benia/  127.0.0.1  19/Aug 22:15    
 128373  file      File temporary://fileBagPhj could not be moved/copied because the destination directory public://css is not configured correctly.  notice    http://localhost/benia/  127.0.0.1  19/Aug 22:15    
 128372  file      The file permissions could not be set on public://css.                                                                             error     http://localhost/benia/  127.0.0.1  19/Aug 22:15    
 128371  file      File temporary://fileII1wDa could not be moved/copied because the destination directory public://css is not configured correctly.  notice    http://localhost/benia/  127.0.0.1  19/Aug 22:15    
 128370  file      The file permissions could not be set on public://css.                                                                             error     http://localhost/benia/  127.0.0.1  19/Aug 22:15    
 128369  file      File temporary://fileYPV93p could not be moved/copied because the destination directory public://js is not configured correctly.   notice    http://localhost/benia/  127.0.0.1  19/Aug 22:06    
 128368  file      The file permissions could not be set on public://js.  

Trying to fix it, I made sure that under admin/config/media/file-system the tmp folder is /tmp and then created a directory named tmp folder in root and gave it 755. I also gave 755 to sites/default/files

  • Tried 777 for both (including sudo chmod 777 files/ -R).
  • Tried sudo chgrp www-data files -R

While reading on how to fix these in D.O but it wasn't quite clear from what I've read; Most solutions included patches and I don't think its valid for my case. Maybe a Linux expert could shed some light why it happens.

1

Did you try the 777 recursively inside the files folder? (so it applies on files/css and files/js subfolders)

Also I would check if SELinux is enabled on your CentOS server to discard you downloaded an incomplete copy of your website due to lack of permissions. Use the getenforce command to check if it's set to permissive. In case of necessary you can use the following command to set the context of files folder to read/write:

chcon -R -t httpd_sys_rw_content_t files
  • Gave 777 -R to files, didn't help. Seems I need to check what you mention with the server. – JohnDoea Aug 19 '16 at 22:26
0

A few thoughts:

  1. Have you made sure that you have a /css and /js folder in your /sites/default/files directory?
  2. Have you tried just deleting these folders and recreating them (I think you should be able to do this without any issues)?
  3. Have you tried turning JS and CSS aggregation off in /admin/config/development/performance to see if that works?
  4. Have you cleared your caches? You can go to /admin/config/development/performance or /rebuild.php to do that.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.