After migrating from Apache server to IIS (7.5), I have some permission problems in Drupal: modules don't seem to have the permissions to delete (unlink) or create files, not even from/into "sites/default/files" folder.
What really interesting is, that if I create my own
test.php with a simple
file_put_contents in it, it does create and unlink files without any error messages.
BUT for example from AddThis module I got the following error message:
sites/default/files/addthis/addthis_widget.js) [function.unlink]: Permission denied in
C:\<mydrupalpath>\source\includes\file.incon line 481.
After that, I right clicked the mentioned file, Properties > Security tab > added Everyone with "Full control" rights. Not surprising, this way unlink was already successful.
BUT after that, I can see this it in the Drupal log:
sites/default/files/addthisis not writable, because it does not have the correct permissions set"
OK, tried to set the right permissions with
icacls with granting "modify" and "write" permission to
sites/default/files directory like this:
c:\<mydrupalpath>\source\sites\default\files /t /grant "IIS APPPOOL\MyDrupalAppPool":(OI)(CI)(M,W,RX)
OK, result is "Successfully processed 228 files".
Refreshing Drupal site in browser...
Hmm, didn't work, the same error message again (permission problems)...
I don't understand... if I query the rights with icacls on "
files\addthis directory, it says my application pool does have "modify" rights:
I do have permission problems with Gallery module too... :(
What should I do not to have permission problems in "files" folder when modules try to delete from/write into it?
Thanks in advance!