1

I have an IIS 7.5 web server running on Windows 2008r2. When I try to write to a file I get a Permission Denied error, but I can't figure out how to fix the permissions.

  1. I have PHP configured via FastCGI to allow impersonation
  2. I have IIS using kerberos to get the authenticated user via Windows Authentication. The AppPool the site runs under is running under a service account. That service account is a member of the Administrators group on the server.
  3. I can see (in PHP) who this user is via the $_SERVER['REMOTE_USER'] global.
  4. That user should be who is trying to edit the file. On this system, I am an Administrator.
  5. The file has SYSTEM and Administrators with Full Control. Users have Read and Read & Execute permissions to the file (which are being inherited from all the way at the root C:\). These are the only users/groups listed as having permissions to the file.
  6. Via PHP, I can read the file, but I cannot write.
  7. When I run phpinfo(), it lists $_SERVER['USERNAME'] as servername$, but that isn't an account I can provide permissions to (windows can't find it).

So far, I have attempted:

  1. Adding the IUSR, Authenticated Users, Anonymous Logon, NETWORK SERVICE accounts and giving them full control. Just to see if I could write. No success.
  2. Giving full control to the Users group. No success.
  3. Recreating the file. No success.
  4. Ensured that SYSTEM, Administrators, and Users have permissions inherited all the way from root C:\ so that it shouldn't be an inaccessible path issue.

I am not sure where to go from here. I am a Linux/Mac guy normally but I have to deploy this site to Windows.

Any suggestions on where to check permissions that I may have missed?

  • Have you tried giving the meta-user Everyone write access to your file? If you do that and that works, that at least does confirm that it's a permissions issue, as opposed to, well... I don't know, I'm a Linux guy myself working in a Linux/Mac/Windows environment, but I've definitely seen weird behavior in IIS with PHP that at first blush appeared to be permissions related, but in actuality wasn't (I think in my case it was a setting somewhere in IIS, but that was a long time and 3 jobs ago...). – Kromey Apr 8 '14 at 15:09
  • Tried it before, but I also just tried again and no success. – Daryl Gubler Apr 8 '14 at 15:18
  • That says to me that your issue is not permissions related, then. I don't know what else it would be, but I'd strongly suggest you start looking at other IIS and PHP settings to see what could be your culprit. – Kromey Apr 8 '14 at 15:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.