6

When I clear the cache of the site, I get lot of warnings with

"Permission denied in drupal_unlink() (line 2199 of home/public_html/sitename/includes/file.inc)."

And I am unable to upload any default image to the site with the warning

"File Could not be uploaded"

4
  • Make sure your permissions are set correctly for the specified folders mentioned in the errors. The web server must have permission to edit the files in the folders (user is usually something like www-data).
    – monymirza
    Commented Feb 25, 2013 at 12:29
  • You could also be out of space .
    – drcelus
    Commented Feb 25, 2013 at 13:41
  • Are you doing this from the UI or from drush?
    – mpdonadio
    Commented Feb 25, 2013 at 14:05
  • I am doing this from the UI
    – Prem Anand
    Commented Feb 26, 2013 at 7:02

4 Answers 4

2

Check your temp folder under "admin > config > media > file system": It should be writeable.

screenshot

6
  • The permission for the tmp folder is set to 777
    – Prem Anand
    Commented Feb 25, 2013 at 12:42
  • check its path.
    – monymirza
    Commented Feb 25, 2013 at 12:43
  • sites/default/files/tmp . This is the path
    – Prem Anand
    Commented Feb 25, 2013 at 12:45
  • give this path in "Temporary directory" as in image.
    – monymirza
    Commented Feb 25, 2013 at 14:52
  • This doesn't resolve the issue.
    – Prem Anand
    Commented Feb 26, 2013 at 7:05
1

If write permission set already but still not resolve this, try manually delete all files (.css) in "sites\default\files\colorizer" folder first, then Clear Cache again! I have done sucessfully in my Windows 7 OS.

Regards

Chungph

1

I know an answers already been accepted, but I wanted to add that I found (weirdly) that clearing my browser cache also fixed this issue.

0

In my case I used nginx and this issue was just related to wrong nginx configurations. This token parameter was totally ignored by Drupal:

https://[DRUPAL-URL]/admin/flush?token=[GET-PARAMETER]

So the token became empty and it caused the "permission denied" issue. To fix that, I changed the nginx configuration to this:

try_files $uri $uri/ /index.php?q=$uri&$args;

Seems that resolved the problem for me.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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