Subject:*
<
Name/Email:*
<
Message Icon:*
<
Select*
<
Message:*
<



Click the Preview to see the content in action.
Options:*
<
Confirmation Code*
<
2 + 7 = ?  
Input the result from the expression
Maximum attempts you can try: 10
*
<
   

Re: Verify manifile.php....How ?
by lapsa2000 on 2006/11/7 23:04:12

Tripmon... .ok, then I won't worry about the error message... ..and is not for any client, it is personal use, therefore it doesn't care if it leaves the error message.

Alone I wanted to make sure that I was making all well.


Regards....
Re: Verify manifile.php....How ?
by Dave_L on 2006/11/7 20:36:44

Thanks for the explanation
Re: Verify manifile.php....How ?
by tripmon on 2006/11/7 20:13:40

Hi Dave,

Yes, fwrite should fail under the assumption that IIS has only 'read' permissions. Of course mainfile would never be set to 'Read-Only' until after install was complete.

re: is_writeable alternative, sadly...

microsoft c runtime library only reports the read-only flag from its stat() implementation; if the file is not marked as read-only in the regular file attributes (eg: what you see using attrib or dir commands), then PHP (and any other ANSI C program) will see it as writable.

Many Windows hosts will allow you to set actual file permissions via their control panels, but this is almost always implemented per directory not per file.

Actual message in admin section reads:Quote:
WARNING: File /inetpub/account/xoopsfolder/mainfile.php is writeable by the server.
Please change the permission of this file for security reasons.
in Unix (444), in Win32 (read-only)

Which is about as good as it gets I guess.

Of course that's Just my opinion, and I could be wrong... would love to hear more input on this as it confused me significantly when I first ran up on it.
Re: Verify manifile.php....How ?
by Dave_L on 2006/11/7 19:40:36

Quote:
Notice that this does not have anything to do with the web server (IIS) or the accounts that the web server is running, but is done at an operating system (windows) level.


If IIS doesn't have permission to modify the file, does that mean that an fwrite() call on the file within XOOPS would fail?

I'm just curious, since I'm not that proficient in Windows-specific permissions or IIS.

If the answer is "yes", is there an alternative to is_writable() that would correctly reflect the IIS permissions?
Re: Verify manifile.php....How ?
by tripmon on 2006/11/7 19:04:03

If you set all of the accounts (common user, administrator, and server) to 'read', then ALL IS WELL...

While the file is actually writeable by the operating system (EXAMPLE: an administrator who is logged on to the windows server) it is not writeable by the **web server** process and you can ignore the error message.

To make the error go away: Quote:
This can be done by opening windows explorer (from the server), finding mainfile.php, right clicking, choosing properties, and setting the attributes to READ ONLY.


Very confusing isn't it

If you are doing work for a customer and do not want the message to appear & do not have the ability to set the file permission to READ ONLY, you can edit the admin.php file to remove the error message.

Who's Online

403 user(s) are online (328 user(s) are browsing Support Forums)


Members: 0


Guests: 403


more...

Donat-O-Meter

Stats
Goal: $15.00
Due Date: Jul 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $15.00
Make donations with PayPal!

Latest GitHub Commits