When in LESS developer mode I get lots of the same errors...

Warning: rmdir(C:\*\sites\default\files\less\sites\default\modules\wa_sbf\css) [function.rmdir]: Directory not empty in drupal_rmdir() (line 2271 of C:\*\includes\file.inc).

This is using XAMPP for windows 7 (as localhost), any idea how to fix?

Comments

corey.aufang’s picture

That is weird considering I also use xampp on windows 7.

Check to make sure that you have full permissions configured for the files directory, such that apache can create and delete files.

corey.aufang’s picture

From the documentation at
http://api.drupal.org/api/drupal/includes--file.inc/function/drupal_rmdir/7

PHP's rmdir() is broken on Windows, as it can fail to remove a directory when it has a read-only flag set.

Web Assistant’s picture

Strange, I have full control in permissions and folders are not set to read only but still I get tons of error messages. I've also checked for hidden files and there are none.

I'll find the problem until it kills me!!

Web Assistant’s picture

I'm pretty sure all my permissions are correct, and no files or folders are set to read-only.

In file.inc, inside the drupal_rmdir() function, if I comment out the rmdir() function...

<?php
  //return rmdir($uri);
?>

... all my problems go away, and everything seems to work.

So what I want to do now is override this core function so I can supress the warnings with @, anyone know of a non-hacky way to do this?

corey.aufang’s picture

If you comment that out, Drupal will not be able to delete folders.

This is like having a huge mess in a room and fixing it by just not going into that room anymore ;)

Also, its not which permissions you have, you have to make sure the user that XAMPP is running under has the proper permissions.

Web Assistant’s picture

I agree, this why I just want to suppress the warnings with @, but only until I figure out how to sort permissions.... sigh! I'll keep fiddling, and post if I figure it out.

Web Assistant’s picture

Priority: Normal » Minor

I'm still seeing those error messages with the same site, but this time it's on my remote server which is Linux. Folder permissions are 755. I use this module for other sites and don't have this problem, do you have any ideas?

I've probably made a silly error somewhere, here is the error message..

    Warning: rmdir(/home/**/public_html/**/sites/default/files/less/sites/default/themes) [function.rmdir]: No such file or directory in drupal_rmdir() (line 2288 of /home/**/public_html/**/includes/file.inc).

    Warning: rmdir(/home/**/public_html/**/sites/default/files/less/sites/default) [function.rmdir]: Directory not empty in drupal_rmdir() (line 2288 of /home/prototyp/public_html/88/includes/file.inc).

    Warning: rmdir(/home/**/public_html/**/sites/default/files/less/sites) [function.rmdir]: Directory not empty in drupal_rmdir() (line 2288 of /home/prototyp/public_html/88/includes/file.inc).

    Warning: rmdir(/home/**/public_html/**/sites/default/files/less) [function.rmdir]: Directory not empty in drupal_rmdir() (line 2288 of /home/**/public_html/**/includes/file.inc).
Web Assistant’s picture

Priority: Minor » Normal

So just to update, I keep seeing this error in both my localhost and remote server (unix), but only when LESS is development mode.

wusel’s picture

Edited copy of http://www.apachefriends.org/en/xampp-windows.html:

Because of missing or insufficient write permissions in e.g. "\Program Files", we recommend to use alternate folder for XAMPP ("\xampp" or "\mydata\xampp").
Web Assistant’s picture

My xampp is installed in C:\xampp and have UAC disabled, also, I have seen these same messages on the linux server I have, very strange!

jnettik’s picture

Priority: Minor » Normal

I am also getting this error on my remote server (CentOS). I don't think this should be getting caused by file permissions as everything else seems to work and the permissions look good.

maustyle’s picture

I've got the same error when I flush LESS files but only on production. The Less folder /sites/default/files/less has chmod 777.

Warning: rmdir(xxxxxxx/sites/all/themes/theme687) [function.rmdir]: Permission denied in drupal_rmdir() (line 2371 of xxxxxxx/includes/file.inc).

corey.aufang’s picture

For those that are having this problem, are you using XAMPP as a service?

If you are not running as a service, can you test changing it to a service and vice-versa?

corey.aufang’s picture

Issue summary: View changes
Status: Active » Closed (cannot reproduce)

Closing as there has been no updates from reporters.

If you are still having the issue, please upgrade to the latest version of the module and required libraries.

If after this you are still having the issue, please open a new issue.

Do not respond to this ticket please.