「毎日Unity」の技術ブログ

開発で役立つ情報を発信する

【Python】「Error code: 403」が発生した時の解決方法

「Error code: 403」が発生した時の解決方法をメモ。

[ エラー ]

以下が発生したエラーです。

Error response
Error code: 403

Message: CGI script is not executable ('/cgi-bin/sample.py').

Error code explanation: HTTPStatus.FORBIDDEN - Request forbidden -- authorization will not help.

[ 原因 ]

「sample.py」へのアクセス権限がないことが原因。

[ 解決方法 ]

コマンドプロンプトで「chmod 755 sample.py」を実行したら解決できました。

(c) Microsoft Corporation. All rights reserved.

C:\Users\EDunity>cd C:\Users\EDunity\Desktop\Test\cgi-bin

C:\Users\EDunity\Desktop\Test\cgi-bin>chmod 755 sample.py