I went to change the settings in admin/settings/performance because I was seeing function.unlink error messages when I tried enabling GZip CSS: Do not generate .htaccess file and editing my .htaccess file as per the README.txt and the errors persisted and then I lost css styling. I tried clearing chickflicksurvival.com/sites/default/files/css and according to the permissions I wasn't able to. So I attempted CHMODding them to 0700 and it said I had no permission. So I tried through SSH and still can't CHMOD them on my VPS.
Errors I've been receiving:
* The selected file /tmp/fileGDQO6W could not be uploaded, because the destination sites/default/files/css/b14725236a2a6631a701067e31e30451.css is not properly configured.
* The selected file /tmp/filea52LxZ could not be uploaded, because the destination sites/default/files/css/d7b29e38f089a364bd04a03f57dd5244.css is not properly configured.
* warning: unlink(sites/default/files/css/.htaccess) [function.unlink]: Permission denied in /home/beccag/chickflicksurvival.com/includes/file.inc on line 435.
* The selected file /tmp/fileOVuduW could not be uploaded, because the destination sites/default/files/css/b14725236a2a6631a701067e31e30451.css is not properly configured.
* The selected file /tmp/filegd78o7 could not be uploaded, because the destination sites/default/files/css/d7b29e38f089a364bd04a03f57dd5244.css is not properly configured.
* warning: unlink(sites/default/files/css/.htaccess) [function.unlink]: Permission denied in /home/beccag/chickflicksurvival.com/includes/file.inc on line 435.
* warning: unlink(sites/default/files/css/8fce77878ef2f87da4b3a350a0f15874.css) [function.unlink]: Permission denied in /home/beccag/chickflicksurvival.com/includes/file.inc on line 435.
* warning: unlink(sites/default/files/css/a27188f0d9b4945384b2e91ba3967323.css.gz) [function.unlink]: Permission denied in /home/beccag/chickflicksurvival.com/includes/file.inc on line 435.
* warning: unlink(sites/default/files/css/2d3bb73978b437a32606dfa934c67cda.css.gz) [function.unlink]: Permission denied in /home/beccag/chickflicksurvival.com/includes/file.inc on line 435.
* warning: unlink(sites/default/files/css/1ecc7b2f08d7020b6b8ca98b00de5273.css.gz) [function.unlink]: Permission denied in /home/beccag/chickflicksurvival.com/includes/file.inc on line 435.
* warning: unlink(sites/default/files/css/8dc4fdf756ae28e3ff1863503a9cf078.css) [function.unlink]: Permission denied in /home/beccag/chickflicksurvival.com/includes/file.inc on line 435.
* warning: unlink(sites/default/files/css/ae067a145e2c243a66e7977a734fbb76.css) [function.unlink]: Permission denied in /home/beccag/chickflicksurvival.com/includes/file.inc on line 435.
* warning: unlink(sites/default/files/css/d28e18b500605772bea111722eddc208.css) [function.unlink]: Permission denied in /home/beccag/chickflicksurvival.com/includes/file.inc on line 435.
* warning: unlink(sites/default/files/css/73bc22c2a67700cfbfa5c4f4987e8ee1.css) [function.unlink]: Permission denied in /home/beccag/chickflicksurvival.com/includes/file.inc on line 435.
* warning: unlink(sites/default/files/css/9435623daffa262a290bf146c0a8b7e8.css) [function.unlink]: Permission denied in /home/beccag/chickflicksurvival.com/includes/file.inc on line 435.
* warning: unlink(sites/default/files/css/2d3bb73978b437a32606dfa934c67cda.css) [function.unlink]: Permission denied in /home/beccag/chickflicksurvival.com/includes/file.inc on line 435.
* warning: unlink(sites/default/files/css/ae067a145e2c243a66e7977a734fbb76.css.gz) [function.unlink]: Permission denied in /home/beccag/chickflicksurvival.com/includes/file.inc on line 435.
* warning: unlink(sites/default/files/css/8dc4fdf756ae28e3ff1863503a9cf078.css.gz) [function.unlink]: Permission denied in /home/beccag/chickflicksurvival.com/includes/file.inc on line 435.
* warning: unlink(sites/default/files/css/9435623daffa262a290bf146c0a8b7e8.css.gz) [function.unlink]: Permission denied in /home/beccag/chickflicksurvival.com/includes/file.inc on line 435.
* warning: unlink(sites/default/files/css/73bc22c2a67700cfbfa5c4f4987e8ee1.css.gz) [function.unlink]: Permission denied in /home/beccag/chickflicksurvival.com/includes/file.inc on line 435.
* warning: unlink(sites/default/files/css/79ba3c92b8256bcd7d309c0a9c2704c6.css) [function.unlink]: Permission denied in /home/beccag/chickflicksurvival.com/includes/file.inc on line 435.
* warning: unlink(sites/default/files/css/7efce4847aa374cbcbc3263e5b1e0a74.css.gz) [function.unlink]: Permission denied in /home/beccag/chickflicksurvival.com/includes/file.inc on line 435.
* warning: unlink(sites/default/files/css/18af0fdbffd00397890f3ed0a920e844.css) [function.unlink]: Permission denied in /home/beccag/chickflicksurvival.com/includes/file.inc on line 435.
* warning: unlink(sites/default/files/css/7efce4847aa374cbcbc3263e5b1e0a74.css) [function.unlink]: Permission denied in /home/beccag/chickflicksurvival.com/includes/file.inc on line 435.
* warning: unlink(sites/default/files/css/a27188f0d9b4945384b2e91ba3967323.css) [function.unlink]: Permission denied in /home/beccag/chickflicksurvival.com/includes/file.inc on line 435.
* warning: unlink(sites/default/files/css/18af0fdbffd00397890f3ed0a920e844.css.gz) [function.unlink]: Permission denied in /home/beccag/chickflicksurvival.com/includes/file.inc on line 435.
* warning: unlink(sites/default/files/css/d28e18b500605772bea111722eddc208.css.gz) [function.unlink]: Permission denied in /home/beccag/chickflicksurvival.com/includes/file.inc on line 435.
* warning: unlink(sites/default/files/css/79ba3c92b8256bcd7d309c0a9c2704c6.css.gz) [function.unlink]: Permission denied in /home/beccag/chickflicksurvival.com/includes/file.inc on line 435.
* warning: unlink(sites/default/files/css/8fce77878ef2f87da4b3a350a0f15874.css.gz) [function.unlink]: Permission denied in /home/beccag/chickflicksurvival.com/includes/file.inc on line 435.
* warning: unlink(sites/default/files/css/1ecc7b2f08d7020b6b8ca98b00de5273.css) [function.unlink]: Permission denied in /home/beccag/chickflicksurvival.com/includes/file.inc on line 435.
So now I'm going to try to disable the module :( It seemed to be working great at first, and I made sure that I checked the README to see if there were any extra steps. Any help, suggestions or advice would be great.
Comments
Comment #1
geekgirlweb commentedIt seems like the module changes the group of these files and therefore you become unable to CHMOD/CHOWN or even CHGRP of the /css folder or the files making the user unable to edit them.
Comment #2
mikeytown2 commentedThanks for the bug report; this will take some time to diagnose and fix.
What the CHMOD #'s for your sites/default/files dir & sites/default/files/css dir?
Do you get the same errors when optimize css is enabled and my module is disabled?
Comment #3
mikeytown2 commentedThis is most likely the way to fix this error since your running your own VPS: Unable to upload "because the destination is not properly configured". Do you get
The selected file /tmp/*** could not be uploaded, because the destination sites/default/files/css/*** is not properly configuredafter every cron run/flush of caches? This error code lives in http://api.drupal.org/api/function/file_copy -> http://api.drupal.org/api/function/file_check_path. The reason for all the unlink errors is because of some assumptions I made... because of your misconfigured server the file_delete function assumes that any file inside the files dir can be nuked.I should check for file permissions and throw an error if drupal can't erase it's own files in side the files dir. 99% sure this is a misconfiguration of your server setup.
Comment #4
geekgirlweb commentedI did run cron.php after I had these error messages to see if it would fix anything, however it did not. In order to solve this issue, I had to contact my host to CHOWN the files for me. Even though I have SSH access I could not CHMOD nor CHOWN these files or associated folders. I tried different techniques to see if I could erase the files in /css but I could not. Disabling this module still left me with no CSS styling whatsoever.
It's possible that this was merely a misconfiguration with my setup, or some other sort of conflict, however I think this might only be able to be replicated through the use of CSS Gzip. I plan on installing a local server soon to test out this sort of thing sometime.
Thank you for your input :)
Comment #5
mikeytown2 commentedAfter digging around the drupal API I need to add this code to the module, along with various checks.
via http://api.drupal.org/api/function/drupal_build_css_cache -> http://api.drupal.org/api/function/drupal_get_css
It's a little redundant, but I think necessary. Optimize CSS files: Enabled won't work because the files/css dir is not writable. This won't fix your problem, next release will throw an error saying something to the effect "you don't have the correct permissions set for the files/css dir AND/OR your file downloads are not public."
Comment #6
mikeytown2 commentedLatest dev should address this issue, it cannot fix it. Server operator has to fix it.
Comment #7
mfuggle commentedI have a similar issue. When I reset the cache I get a series of errors as shown below:
unlink(sites/default/files/js/e1ed4f7bff74d1c7ee333c20e50e7803.js) [function.unlink]: Permission denied in /home/pobfsjv/public_html/harlequins/includes/file.inc on line 435
This seems to have happened only recently.
I am using Drupal 6.10, php 5.2.8 and MySQL 5.0.67-community
Comment #8
mikeytown2 commentedThe error you showed me is for the javascript directory; but they are related. Describe your hosting: Shared, VPS, ect...
Some things to check for:
That error comes about when cron is run; Drupal clears the files/js & files/css directories. It's not a critical error but it does mean your server is incorrectly configured. If you encounter frontend (display/presentation) problems, FTP into your site and del all the files in the files/js & files/css dirs.
Comment #10
Alexander Kosarev commentedI got related problems with updating js and css files when aggregations was enabled.
It is windows environment, as result "is_writeble " return true, but unlick still generate warning.
For now I just replace unlink with exec("del ....") and it is only one solution which I found.
PS: Files have all permission for all and php can overwrite them via "fopen/fwrite/flose" with different flag combinations.
PSS: happy new Year uncle Bill.