Jump to content

[Solved] 403 Error when opening cgi-bin


alpriven

Recommended Posts

Hello there! I have set up an account today to host 2 python bots, and I tried starting them. But when I go to cgi-bin, I get a 403 error. I can view https://alpriven.heliohost.org , and the cPanel. I have checked the permissions and they are 755 (both for cgi-bin and the files). 

Am I doing something wrong? How can it be that cgi-bin's permissions are 755 and yet I can't access it.

Thanks for any help!

Link to comment
Share on other sites

Actually, the permissions for the file are important, thus even if you're executing the file or whatever, please set it to 644.

 

To set the permissions, go to cP File Manager > public_html > youdomain.com  > cgi-bin  > Click on the file and on the top-right corner, click on 'Permissions' > Set it to 644 ... and it will work. :)

Link to comment
Share on other sites

The cgi-bin folder showing a forbidden message is normal unless you have an index file or specify a file name.

 

The scripts themselves seem to be broken. I switched startdiscord.py back to 3.7 and added a "script start" debug message to http://alpriven.heliohost.org/cgi-bin/startdiscord.py and it shows, so the server is running the script when triggered.

 

Also, be aware the stuff in the bots folder still has dos line endings...

Link to comment
Share on other sites

Notepad++ can do it I believe. There should be an option for line endings or file format. On an iPad at the moment so can't check...

 

If you are using Linux, you can do it in vim, command :set ff=unix will change the file format to Unix line endings.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...