mafiatfc Posted January 6, 2010 Share Posted January 6, 2010 I have a domain controller in which I have much code written to create a domain user via a PHP webpage. I have a seperate webserver running IIS7 with PHP 5.2. I need to create a folder in a unc path on our file server. The example code I'm trying to get to work is: <?php mkdir("\\\\x.x.x.x\\users\\testuser"); ?> The problem: "Warning: mkdir(): Permission denied" My goal is: after a user is created in Active Directory (which I have working), I need to create that user's home directory on our file server. I've tried setting permissions on the file server share for Everyone as full. Quote Link to comment Share on other sites More sharing options...
corbin Posted January 7, 2010 Share Posted January 7, 2010 Considering that the syntax is correct and that PHP supports that, I suspect that permission actually is denied. Have you checked the permissions? Quote Link to comment Share on other sites More sharing options...
mafiatfc Posted January 9, 2010 Author Share Posted January 9, 2010 Yes, on the file server I have permissons set for "Everyone" and that permission has full rights to the share. If I access the share through windows I can create/delete files and folders, however the PHP script mkdir gets a permission denied. I wonder if there is some kind of user settings for IIS? Quote Link to comment Share on other sites More sharing options...
trq Posted January 9, 2010 Share Posted January 9, 2010 I wonder if there is some kind of user settings for IIS? There is the IUSR_* account that IIS runs under. Quote Link to comment Share on other sites More sharing options...
mafiatfc Posted January 9, 2010 Author Share Posted January 9, 2010 I wonder if there is some kind of user settings for IIS? There is the IUSR_* account that IIS runs under. Isn't this user local to the server running IIS, in which I would not be able to use this username on a different server's share? Quote Link to comment Share on other sites More sharing options...
trq Posted January 9, 2010 Share Posted January 9, 2010 Isn't this user local to the server running IIS, in which I would not be able to use this username on a different server's share? I'm not a windows person but I do have to put up with it at work and these accounts are within active directory for us as well. Usually something like... IUSR_MACHINENAME/DOMAIN. Can't be any assistance with how they get there but these accounts are available throughout our entire network. Placed there by our network administers I should imagine. Quote Link to comment Share on other sites More sharing options...
mafiatfc Posted January 16, 2010 Author Share Posted January 16, 2010 I figured it out. I created a service account in active directory. On the remote web server IIS, I used anonymous authentication using an application pool with the domain service account as the user. On the remote shares I have the domain service account with rights to the shared folder. Now I am able to use mkdir and shell features like icacls to assign user rights to folders inside the share. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.