473,473 Members | 2,155 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

PHP & NTFS Permissions

Hello group!

I'm having a problem and I hope some of you may be able to point me in the
right direction.

I inherited a web site using php, running on Windows 2000 & IIS. The site
was developed by a consulting firm about a year before I came on board, the
consultant has since gone out of business. Overall, I've never had a
problem with the site and have been able to figure out nearly everything
they configured on it.

The server with the site is getting old, so I'm trying to migrate it to a
new box. I've configured the new box to be identical to the old one - in
terms of partition layout, directory structure, NTFS users / groups & NTFS
permissions, php.ini, etc. I have php installed with IIS & it is working
properly. All aspects of the site work, except for one. We have a feature
that allows users to log in to a file manager & edit existing pages. When I
try to edit one of thes pages, I get an fopen error, complaining that
permission is denied.

To reach this file manager, the users log in twice. They first log in using
a web-based form, which pulls their user details from MySQL. To reach the
file manager itself, they have to enter a username / password using basic
IIS authentication (the pop-up box). The username / password they use to
access the file manager is a local account on the web server.

The user they are logging in as has full NTFS permission on the web root.
When they attempt to edit a file, the php script is supposed to create a
temp "lock" file in the current directory. When the script attempt to
create this temp file, the "permission denied" error is generated.

If I set the Everyone group to have write permission on the web root, the
problem goes away. Obviously, I don't want to do this. This was not needed
on the old server.

My question, seeing as my users / permissions / etc on the new machine match
what I have on the old machine, why would I be having this "permission
denied" error. What user would php try to create the file as??

The files, as well as the directories, in question here have the proper
permissions set - at least they match what I have on the old server.

Doing a phpinfo(); on the old server & new server shows identical values for
temp files, etc etc.

What could I be missing here?

Thanks a bunch!

(reply to group only please)
Jul 16 '05 #1
1 7993
BingoHandJob wrote:
Hello group!

I'm having a problem and I hope some of you may be able to point me in the
right direction.

I inherited a web site using php, running on Windows 2000 & IIS. The site
was developed by a consulting firm about a year before I came on board, the
consultant has since gone out of business. Overall, I've never had a
problem with the site and have been able to figure out nearly everything
they configured on it.

The server with the site is getting old, so I'm trying to migrate it to a
new box. I've configured the new box to be identical to the old one - in
terms of partition layout, directory structure, NTFS users / groups & NTFS
permissions, php.ini, etc. I have php installed with IIS & it is working
properly. All aspects of the site work, except for one. We have a feature
that allows users to log in to a file manager & edit existing pages. When I
try to edit one of thes pages, I get an fopen error, complaining that
permission is denied.

To reach this file manager, the users log in twice. They first log in using
a web-based form, which pulls their user details from MySQL. To reach the
file manager itself, they have to enter a username / password using basic
IIS authentication (the pop-up box). The username / password they use to
access the file manager is a local account on the web server.

The user they are logging in as has full NTFS permission on the web root.
When they attempt to edit a file, the php script is supposed to create a
temp "lock" file in the current directory. When the script attempt to
create this temp file, the "permission denied" error is generated.

If I set the Everyone group to have write permission on the web root, the
problem goes away. Obviously, I don't want to do this. This was not needed
on the old server.

My question, seeing as my users / permissions / etc on the new machine match
what I have on the old machine, why would I be having this "permission
denied" error. What user would php try to create the file as??

The files, as well as the directories, in question here have the proper
permissions set - at least they match what I have on the old server.

Doing a phpinfo(); on the old server & new server shows identical values for
temp files, etc etc.

What could I be missing here?

Thanks a bunch!

(reply to group only please)


Could be that IIS is running as a user with insufficient permissions
(who the user logs in to your web page as is irrelevent). Go to the
services control pannel and look for the world wide web servivice item.
select properties and view/change who the web server runs as.

Another remote posibility is that you can "log" the users in without
logging them in. ie. uncheck the box with "Allow anonymous connections"
somewhere in IIS). If you need to make sure they have access, there is
an environement variable now populated (think it is called NTAUTH_LOGIN)
or something which you can use (check phpinfo()). This will be their
windows login name. MAYBE stuff will run under this user's credentials.

Jul 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: travelling_nerd | last post by:
Hi, I'm trying to write a script that will allow validated users to download a file that has specific ntfs permissions. Here's a summary: Scenario: 1) The name of the file is "binary.zip"....
9
by: Ben Dewey | last post by:
Project: ---------------------------- I am creating a HTTPS File Transfer App using ASP.NET and C#. I am utilizing ActiveDirectory and windows security to manage the permissions. Why reinvent...
2
by: Ram | last post by:
Hey, I'v managed to find a way of adding NTFS permissions to a certain folder, But the problem is, the folder has a couple of inherited permissions which I want to delete. How can I remove the...
0
by: David Kyle | last post by:
Hello, I’m currently having some difficulties finding an example and the recommended practices for setting NTFS Permissions on Files and Folders. I will also need to do some impersonation and I...
0
by: VP | last post by:
Hi there, well i am stuck on a problem with regards to obtaining security permissions on folders. At the moment I have created a simple treeview example which shows all sub-directories in a tree...
4
by: Ram | last post by:
Hey, I'v managed to find a way of adding NTFS permissions to a certain folder, But the problem is, the folder has a couple of inherited permissions which I want to delete. How can I remove the...
3
by: Ray Cassick \(Home\) | last post by:
I am starting to think there is some kind of conspiracy :) but everywhere I try to locate some (working) code showing how to change NTFS partitions on a network share I end up at a dead end. I...
8
by: paquer | last post by:
Database Users need to have Read/Write etc... permissions to the folder where the Database resides in order to create the lock file. I have read only users. I have set up the Shortcut that links...
3
by: palepimp | last post by:
Hello all, I have searched far and wide for a solution to my issue. In short, here is the problem: 1. 3 PC's enter data into an Access 2003 database (PC's are running Vista w/ Office 2007...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.