1. Installed Drupal 7 on LAMP stack
2. Installed CTools (latest alpha and also tried dev)
3. Getting Status Report Error below:

CTools CSS Cache Unable to create
The CTools CSS cache directory, ctools/css could not be created due to a misconfigured files directory. Please ensure that the files directory is correctly configured and that the webserver has permission to create directories.

4. Tried chmod 777 /var/www/drupal/sites/all/modules/ctools/css - still producing error
5. Tried sudo chown -R www-data:www-data /var/www/drupal/sites/all/modules/ctools - still producing error

Help???

Comments

wjaspers’s picture

Issue tags: -CSS, -permissions, -directory, -drupal 7, -created

Is your filesystem default service setting "Private"?. (Go to: /admin/config/media/file-system)
If you didn't define a directory for private files to reside, CTools should try to put cached files into there. If no directory is defined, it might error out.
If one isn't set, it's important to define a temporary directory as well.

PS. Please be respectful of issue tags (http://drupal.org/node/1023102).

bkfitz’s picture

Sorry about the issue tags... will do next time.

I don't have an /admin/config/media/file-system folder? Running Ubuntu 10.10 with standard AMP install...

wjaspers’s picture

Its not a physical folder. You need to login as an administrator, and go to the "Administration" menu item, then to "Config", and click on "File System" under the "Media" section.

If you haven't found/installed it, I'd highly recommend the "Admin menu" (http://drupal.org/project/admin_menu) module. Makes accessing admin tasks drastically easier. Or, if you're just learning drupal, download the Acquia Drupal7 distribution from http://www.acquia.com. It includes a good number of popular modules, and things to help learn Drupal.

bkfitz’s picture

Ok... I figured it out... when I went to file system, the temp directory was set to /tmp and it was also set to "Public"... problem was there was a warning msg at the top of the screen saying it couldn't read the .htaccess file inside /sites/default/files and that I should create one with the following lines in it:

SetHandler Drupal_Security_Do_Not_Remove_See_SA_2006_006
Options None
Options +FollowSymLinks

... so i did... to do so I had to chmod the /sites/default/files directory to 777 because for some reason it had the following perms:

drw-rw-rw- 2 root root 4096 2011-04-15 15:49 files

but after the chmod, I was able to create the .htaccess file and now I'm not getting the error... I guess it had something to do with mod-rewrite???

Thx for your help!

wjaspers’s picture

Status: Active » Closed (fixed)
nicodv’s picture

Hi wjaspers, I tried what you said, but the file system demands me a folder fully readable and writable, is that correct? Anyway, once placed the sites/default/private folder with full permissions, the error persists. Any other idea? something I'm doing wrong?

Thanks a lot.
nico
PS: I've copied and pasted a drupal installation from localhost to localhost (none was ever in a server)

nicodv’s picture

a newbie here: a chmod 777 is the same as writable and readable for everyone, admin and myself for that folder?
If so, after that I still get the error message. In localhost, there is no .htaccess, right? Any idea what else can i do?

thanks

nico

wjaspers’s picture

If you're not the owner or a group member with appropriate filesystem permissions, you won't be able to chgrp, chown, or chmod folders.
I'll assume since you installed a LAMP stack on your own, you do have the appropriate permissions.

Make sure the folder owner and group match those of the Drupal root.
If you ls -l the Drupal folder and it tells you the owner is www-user and group is www-user, set the sites/default/files folder to the same.
You can do this by running chgrp -R <group_name> <yoursite>/sites/default/files and chown -R <user_name> <yoursite>/sites/default/files.
If the owner of the folder is not a member of the group that owns it, there is a very good chance you will encounter errors.


Perhaps my prior suggestions were missing something, too; a recursion flag.
"chmod -R 777 /sites/default/files"

EDIT: This was terrible suggestion (and im sorry for offering it as such), and a nasty security concern. Just make the folder writable by the appropriate PHP/Apache user. The executable flag should not be used unless you know exactly what you're doing.

sonicthoughts’s picture

Assigned: bkfitz » Unassigned

This drove me crazy - there are MANY reports of this. turned out it was the session cache. deleted it, logged out and it went away!