ERROR: rmdir_recursive(): argument cache/themes/SuiteP/modules is not a file or a dir.

Hi,
after every quick-repair the following error occurs and is written to the suitecrm.log-file:

ERROR: rmdir_recursive(): argument cache/themes/SuiteP/modules is not a file or a dir.

The written text is correct…the file/folder really not exists but also never existed. So why this errors occurs?
Permission is set to full-access to the owner (IIS AppPool\SUITECRM_TEST) for the complete website-folder.

Regards, MT

I installed a new test-system with suiteCRM 7.10.0.
The only changes are

  • [the current language-pack (German)
  • Curreny to € /Euro
  • Changed SMTP-Server our Exchange-Server

I cleared the firefox-cache…and after each “quick repair” the Error “[FATAL] ERROR: rmdir_recursive(): argument cache/themes/SuiteP/modules is not a file or a dir.” is written to the log…

I cant reproduce the Server Error 500, but if it happens, then the suitecrm.log contains the ^^ error.

I tried with IIS AppPool\SUITECRM_TEST as the owner and also IUSR as owner of all the files/folder with full access…no difference

If we cant solve this problem, we must abort the suitecrm-project :S

Our configuration:

  • [SuiteCRM 7.10
  • [MySQL 5.7
  • Windows Server 2012
  • IIS 8.5
  • PHP 7.0.15

Ok I now tried a complete clean installation. Just install and start quick repair/rebuild and the error occurs

[FATAL] ERROR: rmdir_recursive(): argument cache/themes/SuiteP/modules is not a file or a dir.

Tried with IIS AppPool\SUITECRM_TEST as the owner and also IUSR as owner.

I ran into this problem as well, both on Apache and Azure WebApps(IIS). Sometimes a clean install fixed it. I think I fixed it once by creating the directory so it could remove it. Also, make sure the permissions are set correctly. Try an install without a sub directory and see if you get the same results. IIRC I had some sort of issue with a subdir install on IIS.

Also, are you using a language pack?

If so, there was an error on the language files.
Please download again your language pack:

Make sure the pack matches your SuiteCRM version

Hi,
I tried with language-pack 7.10.2 and without language-pack, but the error still occurs :frowning:

If I manually create a folder “modules” in cache/themes/SuiteP , then the folder gets removed and no error occurs :lol:

But this works only onetimes…then the folder is removed and the error occurs again.

Sry I wanted to edit my post, but I was to late and couldn´t do this.

Try fixing the default_permissions array in your config.php

 
'default_permissions' => 
    array (
    'dir_mode' => 1528,
    'file_mode' => 493,
    'user' => '',
    'group' => '',
  ),

…and hit quick repair…and the error occurs.

Ok, so now put your web server username and group in there (like when you do a “chown”), and if necessry raise the permissions a bit.

You can put the typical octal numbers in there, starting with a 0. In fact, it’s better to do it like that.

So it would be something like

'default_permissions' => 
    array (
    'dir_mode' => "02755",
    'file_mode' => "0755",
    'user' => 'www-data',
    'group' => 'www-data',
  ),

I´m using Windows and IIS, so I can´t make chown.

The owner of all the files is IUSR. So is it right to change it to


'default_permissions' => 
    array (
    'dir_mode' => "02755",
    'file_mode' => "0755",
    'user' => 'IUSR',
    'group' => 'IUSR',
  ),

???

Edit:
Ok I tried as user/group “IUSR” and “www-data”. In both cases the error occurs, after i hit quick repair.

The root-folder is
\wwwroot\SuiteCRM-7.8.2
Do I have to use wwwroot? I´m asking this, because “www-data” sounds to me like a folder-name.

Sorry - I missed the part about “Windows”. I don’t think those options have any effect at all on Windows, they’re just ignored.

(www-data is the Apache web server user name on Ubuntu)

Ok, so maybe you can turn your attention to permissions inheritance in the parent folder, cache/themes/SuiteP

This is what controls the permissions that a new directory created there will receive.

If you install SysInternals Suite from Microsoft’s site, you won’t regret it. They are simply excellent, especially Process Explorer, Autoruns and Process Monitor.

With this last one, you can set it up to watch exactly which directories your web server process is creating, reading, deleting, etc., and exactly which error it is getting.