Re: [PHP] permission failure with fopen



On Fri, Nov 7, 2008 at 8:35 AM, Richard Heyes <richard@xxxxxxx> wrote:
So I guess that making "somefile.txt" with PHP is not possible for Win XP

Er, no. But the permissions system on Windows is greatly different to
Unix. You could make it (and the containing directory) world
writeable, and work backwards from there (ie making it not so world
writeable).


On the subject of not-so-world-writeable, you just need to identify
the user that your web server uses. By default in IIS, that user is
the Internet Guest Account and is usually named IUSR_[machine name],
though it can be different (especially if the web server is part of a
domain). I'm not sure what account Apache for Windows uses.

Once you identify the account, it needs to have Modify (which, for
files, includes Read & Execute, Read, and Write) permission on the
file being edited. If the file does not already exist, then that
account needs to have Modify (which, for folders, includes Read &
Execute, List Folder Contents, Read, and Write) permission on the
folder where it will be created.

It's still technically "world-writeable" since you are giving
permission to your web server to write files and anyone in the world
that is using your web site is running as that user, but it's not as
open as giving permission to the Everyone group.

Also, I'm not sure if is_writeable()/is_writable() work correctly
under Windows. There are some comments in the documentation about it
not using Groups or Windows ACLs. YMMV

Andrew
.



Relevant Pages

  • Re-post - Same Problem with Update to W2K with SP4
    ... Please contact your system administrator. ... You do not have permission to update Windows 2000. ... Update.exe extended error code = 0xf004 ...
    (microsoft.public.windowsupdate)
  • Re: Update fails
    ... Please contact your system administrator. ... You do not have permission to update Windows 2000. ... Update.exe extended error code = 0xf004 ...
    (microsoft.public.windowsupdate)
  • Re: Windows XP SP2
    ... permission to update Windows XP - Please see your administrator" Towards the ... UnRegisterSpuninstForRecovery, failed to delete SpRecoverCmdLine ... Please contact your system administrator. ...
    (microsoft.public.windowsxp.security_admin)
  • RE: BITS 2.0 Install Fails - heres the log
    ... Please contact your system administrator. ... You do not have permission to update Windows XP. ... Update.exe extended error code = 0xf004 ...
    (microsoft.public.windowsupdate)
  • Permissions Problem
    ... I am trying to determine a permission problem trying to write a text file ... from one web server to another. ... NT4 web server. ... logged in with an admin account of the 2003 box. ...
    (microsoft.public.dotnet.framework.aspnet)