21
tripmon
Re: Verify manifile.php....How ?
  • 2006/11/7 17:07

  • tripmon

  • Module Developer

  • Posts: 462

  • Since: 2004/2/28


NTFS stands for NT File System. Which is what most windows servers configured for production environments use as their file system.

With windows, you need to set the file as read only through the operating system (as opposed to setting the permissions of the web server accounts) in order to get the message to go away.

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.

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.

It is very confusing because you can also protect the file by IIS Account permissions which is what you were talking about re: single reading" for the common user and "total control" for the administrator and server...

If you set all of the accounts above (common user, administrator, and server) to 'read'... it does the same thing as far as restricting access (well almost), but the message in your administration section will remain. The reason is that the script checks to see if the file is writeable by the operating system.

Hope that helps

22
lapsa2000
Re: Verify manifile.php....How ?
  • 2006/11/7 17:51

  • lapsa2000

  • Quite a regular

  • Posts: 247

  • Since: 2006/10/27


is what you want to tell me with this that the message will continue appearing, but the "mainfile.php" is not in fact writable?. in summary....that I don't worry that this all well?
Persevera...y seguiras
Perseverando !!!

23
tripmon
Re: Verify manifile.php....How ?
  • 2006/11/7 19:04

  • tripmon

  • Module Developer

  • Posts: 462

  • Since: 2004/2/28


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.

24
Dave_L
Re: Verify manifile.php....How ?
  • 2006/11/7 19:40

  • Dave_L

  • XOOPS is my life!

  • Posts: 2277

  • Since: 2003/11/7


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?

25
tripmon
Re: Verify manifile.php....How ?
  • 2006/11/7 20:13

  • tripmon

  • Module Developer

  • Posts: 462

  • Since: 2004/2/28


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.

26
Dave_L
Re: Verify manifile.php....How ?
  • 2006/11/7 20:36

  • Dave_L

  • XOOPS is my life!

  • Posts: 2277

  • Since: 2003/11/7


Thanks for the explanation

27
lapsa2000
Re: Verify manifile.php....How ?
  • 2006/11/7 23:04

  • lapsa2000

  • Quite a regular

  • Posts: 247

  • Since: 2006/10/27


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....
Persevera...y seguiras
Perseverando !!!

Login

Who's Online

192 user(s) are online (117 user(s) are browsing Support Forums)


Members: 0


Guests: 192


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits