Re: [PHP] permission failure with fopen
- From: aballard@xxxxxxxxx ("Andrew Ballard")
- Date: Fri, 7 Nov 2008 09:46:27 -0500
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
.
- Follow-Ups:
- Re: [PHP] permission failure with fopen
- From: Lupus Michaelis
- Re: [PHP] permission failure with fopen
- References:
- permission failure with fopen
- From: cr . vegelin
- Re: [PHP] permission failure with fopen
- From: "Richard Heyes"
- Re: [PHP] permission failure with fopen
- From: cr . vegelin
- Re: [PHP] permission failure with fopen
- From: "Richard Heyes"
- permission failure with fopen
- Prev by Date: Re: [PHP] object persistence within a session
- Next by Date: RE: [PHP] Re: take me off the list
- Previous by thread: Re: [PHP] permission failure with fopen
- Next by thread: Re: [PHP] permission failure with fopen
- Index(es):
Relevant Pages
|