Click to See Complete Forum and Search --> : Permission Denied


Anon
07-05-2001, 04:29 AM
Ever have that feeling like your head is going to explode? Well that's the feeling I have right now. I've got PHP installed in Windows 2000 Server (IIS4), and it compiles all my scripts fine, excepts when I want to write to a file. Whenever I try, PHP complains "Permission denied" and all following attempts to use the file pointer variable fail. I have, however, made sure that the directory has write access in the Internet Services Manager, and have tried several different folders, all with the same result. Does anyone have any clues as to what could be going on? Thanks for any help.

-Matt S

ame12
07-05-2001, 06:28 AM
Sounds like your permissions aren't write. If you're not authenticating to the page (entering username and password), then your coming in as the anonymous user. IIS lets you specify who the anonymous user is... check your properties to verify that anonymous is supported and that the anonymous account is who you think it is. Then check your folder security on your inetpub folders and make sure that same anonymous account has read/execute access.

Dave


===========================================
http://badblue.com/helpphp.htm
Free small footprint web server for Windows
PHP, file-sharing, Access/Excel transcoding
===========================================

Anon
07-05-2001, 11:16 AM
IIS runs with an anonymous user called IUSR_ followed by your computer name (i.e. IUSR_MYCOMPUTER) you will need to go to the folder you are trying to write to, right-click and choose Properties. Click the Security Tab, then Add. In the drop-down, select your computer if it isn't already selected, and look for the IUSR_ account. Add it with read and write permissions and click OK.

Hope this helps

steveness
07-06-2001, 09:06 AM
I had a similar problem with NT 4.0/IIS4/PHP4.

The file permissions would work, then would fail. Turned out that the web server sat on a shared directory, and the share permissions were more restrictive. The more restrictive permissions over-rode the ones I set at the folder/file level.

Further, even giving IUSER_MYCOMPUTER full permissions did not solve all my problems. I had to give everyone write permissions at the share, and at the folders I wanted PHP to write to.

HTH,
Steveness

Anon
08-01-2002, 06:03 PM
I was experiencing the same Permission Denied errors. The way that I solved it was to share out the folder holding the accessed files, give everyone full control. Then I went to the specific file properties and give the Web Anonymous Users Read&Execute permissions. However, this tweak does not solve the problem of creating files, of which I still have not solved.

Anon
08-08-2002, 07:12 AM
for IIS users, if your default home is \"c:\\inetpub\\wwwroot\", change the IUSR_hostname (internet user account)\'s write permissions with: Write (Allow). By default, Write is denied for IUSR_hostname. hostname refers to your mechine identifier. So, if your machine name is XP, the internet guest account is IUSR_XP..Voila, A bientot!