Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Importing OSNAP in Web-enabled python gives PermissionError: [Errno 13] Permission denied: '/var/www/.local' #40

Closed
suhanmappingideas opened this issue Dec 22, 2018 · 0 comments
Assignees
Labels

Comments

@suhanmappingideas
Copy link
Contributor

suhanmappingideas commented Dec 22, 2018

I am trying to run the example python code to test if it is possible to use osnap in the Web-enabled python.

Here is the code (osnap_example.py) that I am testing:
///////////////////////////////////////////////////////////////////////////////////////////////
#!/home/suhan/public_html/cgi-bin/anaconda3/envs/osnap/bin/python
import cgitb
cgitb.enable()

import platform
import numpy

pltform = platform.platform()

print("Content-type: text/html\n\n")
print("\n")
print("<div style="width: 100%; font-size: 40px; font-weight: bold; text-align: center;">")
print("Python Script Test Page")
print("CGI Works!")
print("

\n\nPlatform: %s

"%pltform)
print("\n\n")

import osnap
//////////////////////////////////////////////////////////////////////////////////////////////////////

I tried to run this code both in Terminal (image on the left) and on the Web (image on the right).
image

The code that run in the Terminal did not give me any error in terms of importing OSNAP (the left mage). But when I run the same code on the Web (http://173.255.192.133/~suhan/cgi-bin/osnap/osnap_example.py), it gives me an PermissionError: [Errno 13] , so OSANP modules cannot be used.

I think they are related to the file permission issues, it seems like I need to change permission level of some files. But I am not sure what to change exactly. It seems to be related to something like " rwxrwxrwx " Is anyone familiar with the permission issues in Linux?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants