XP is just a number | |
PerlMonks |
permission denied on file write only when running browser on application serverby raccardi (Initiate) |
on Jul 07, 2020 at 17:56 UTC ( [id://11119010]=perlquestion: print w/replies, xml ) | Need Help?? |
raccardi has asked for the wisdom of the Perl Monks concerning the following question: I have a simple test script that attempts to create a file and to append an existing file. This is a web-based script hosted by IIS. When I call this script by putting its URL into a browser running on my PC, the tests pass: one file is created, the other file is appended to. However, if I run a browser on the application server and access the script using a "localhost" URL, I get a permission denied error on both file operations. If I run the script from the command line on the server, either as an elevated (Run as Administrator) command line or not, the script is able to write to both files The script is running under IIS's CGI module, not FastCGI, with the Impersonate User option enabled. The site uses Windows Authentication. In both cases, regardless of which browser I use to run the script, I see that the perl.exe process is running as my domain user. I can't figure out why I get different behavior when access the script from a browser running on the server versus a browser running on my own PC. Has anyone ever seen anything like this? I used the Errno library to get some more info about the permission denied error when opening the files for write/append: 13 Permission denied By the way, my specific Windows user account has explicit access to the folder I'm trying to write to. As an experiment, I turned off Impersonate User on IIS's CGI module. The perl interpreter runs as DefaultAppPool and does have permission to write to the files. THANK YOU
Back to
Seekers of Perl Wisdom
|
|