in reply to Unlink on NT

I am using it in a cgi program. Does that have any implecations?

Replies are listed 'Best First'.
Re: Re: Unlink on NT
by grantm (Parson) on Oct 17, 2002 at 22:06 UTC

    CGI scripts under IIS run as the internet guest user (typically IUSR_MACHINE_NAME). If that is the user that created the file then there should be no problem.

    Bear in mind also, that the user will need write/modify access to the directory inorder to create or delete files in it.

      Can I set a global permission so that anyone with access to the script can delete the file?

        Yes, if you give the IUSR_MACHINE_NAME user read/write access to the directory containing the file then that would work for anyone running the script - as long as you haven't password protected the site.

        Assuming you're using IIS, if you enable password protection, the username/password someone enters must match a local domain user and the script will then run with that user's permissions. In that case you'd want to set permissions using a group or for 'Everyone'. But if passwords are not enabled, ignore this paragraph altogether.