qadwjoh has asked for the wisdom of the Perl Monks concerning the following question:

Hi

I have a CGI script which creates a file in a directory on my machine, which has permissions set up for various users. The problem is, the Perl script won't create the file with all the permissions of the directory - it misses out on one user. If I manually create the file, it's given the exact permissions that the directory has for all users.

Does anyone recognise what's going wrong?

Thanks,
Andrew
  • Comment on Windows permissions when creating a file

Replies are listed 'Best First'.
Re: Windows permissions when creating a file
by EdwardG (Vicar) on May 24, 2004 at 10:53 UTC

    Your perl script is probably running in the security context of IUSR_YOURMACHINE.

    When you create the file manually, you are probably using your own personal login credentials, which are probably not the same as IUSR_...

    MSDN has useful info here.

     

      The script is run under a certain username, which I've logged in as and been able to create the file manually, with all the permisions created automatically.

      Can an ID be set up in someway so as to not be allowed to create permission for a second ID through IIS?