Quantcast
Channel: Security
Viewing all articles
Browse latest Browse all 1881

Executing Python script from ASP.NET MVC app causes Python Error 5 (permission denied)

$
0
0

When executing a Python script that imports both standard and custom written packages from within an ASP.NET MVC 4 application under IIS 7, the script is throwing an exception and returning error code 5 ("WindowsError: [Error 5] Access is denied [Error 5] Access is denied) upon trying to import the first package. This does not happen, however, when the script is simple enough that it does not import any packages (e.g, a "Hello World" script). I suspect it is a permissions problem on the files or directories containing the imported packages. Where should I move the imported files, or what should the permissions on the files/folders/web app be? I've tried putting the custom script in App_Data\Scripts and the custom package under there as well, moving the installed packages (numpy, pandas, etc) from C:\Python27 to App_Data\Scripts, setting the owner on the folders containing the scripts and packages to IUSR, NETWORK SERVICE, Administrator, and a few others, all to no avail. What am I doing wrong, and how do I fix it without defeating the security mechanism of IIS? Thanks.


Viewing all articles
Browse latest Browse all 1881

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>