Adafruit MotorHat가 쌓인 RaspberryPi에서 제공되는 간단한 Flask 앱에서 작업 중이므로 Stepper Motors를 운전할 수 있습니다. 명령 줄에서 응용 프로그램을 실행할 때 모든 것이 잘 작동하고 모터는 Flask 웹 인터페이스를 통해 제어 할 수 있습니다. 그러나 mod_wsgi에를 통해 응용 프로그램을 배포하려고 할 때 나는 MotorHat 라이브러리에 관한 다음 아파치 오류를 얻을 :mod_wsgi의 Adafruit_MotorHAT에 대한 사용 권한이 거부되었습니다. Flask 앱
[Mon Dec 11 09:30:32.700209 2017] [wsgi:error] [pid 1583] [client 192.168.0.10:38416] mod_wsgi (pid=1583): Target WSGI script '/var/www/FlaskApp /flaskapp.wsgi' cannot be loaded as Python module.
[Mon Dec 11 09:30:32.700330 2017] [wsgi:error] [pid 1583] [client 192.168.0.10:38416] mod_wsgi (pid=1583): Exception occurred processing WSGI script '/var/www/FlaskApp/flaskapp.wsgi'.
[Mon Dec 11 09:30:32.700405 2017] [wsgi:error] [pid 1583] [client 192.168.0.10:38416] Traceback (most recent call last):
[Mon Dec 11 09:30:32.700473 2017] [wsgi:error] [pid 1583] [client 192.168.0.10:38416] File "/var/www/FlaskApp/flaskapp.wsgi", line 7, in <module>
[Mon Dec 11 09:30:32.700665 2017] [wsgi:error] [pid 1583] [client 192.168.0.10:38416] from FlaskApp import app as application
[Mon Dec 11 09:30:32.700706 2017] [wsgi:error] [pid 1583] [client 192.168.0.10:38416] File "/var/www/FlaskApp/FlaskApp/__init__.py", line 3, in <module>
[Mon Dec 11 09:30:32.700895 2017] [wsgi:error] [pid 1583] [client 192.168.0.10:38416] from newsFocus import *
[Mon Dec 11 09:30:32.700933 2017] [wsgi:error] [pid 1583] [client 192.168.0.10:38416] File "/var/www/FlaskApp/FlaskApp/newsFocus.py", line 14, in <module>
[Mon Dec 11 09:30:32.701313 2017] [wsgi:error] [pid 1583] [client 192.168.0.10:38416] from Adafruit_MotorHAT import Adafruit_MotorHAT, Adafruit_DCMotor, Adafruit_StepperMotor
[Mon Dec 11 09:30:32.701362 2017] [wsgi:error] [pid 1583] [client 192.168.0.10:38416] File "build/bdist.linux-armv7l/egg/Adafruit_MotorHAT/__init__.py", line 1, in <module>
[Mon Dec 11 09:30:32.701971 2017] [wsgi:error] [pid 1583] [client 192.168.0.10:38416] File "build/bdist.linux-armv7l/egg/Adafruit_MotorHAT/Adafruit_MotorHAT.py", line 3, in <module>
[Mon Dec 11 09:30:32.702522 2017] [wsgi:error] [pid 1583] [client 192.168.0.10:38416] File "build/bdist.linux-armv7l/egg/Adafruit_MotorHAT/Adafruit_PWM_Servo_Driver.py", line 11, in <module>
[Mon Dec 11 09:30:32.703070 2017] [wsgi:error] [pid 1583] [client 192.168.0.10:38416] File "build/bdist.linux-armv7l/egg/Adafruit_MotorHAT/Adafruit_PWM_Servo_Driver.py", line 35, in PWM
[Mon Dec 11 09:30:32.703619 2017] [wsgi:error] [pid 1583] [client 192.168.0.10:38416] File "build/bdist.linux-armv7l/egg/Adafruit_MotorHAT/Adafruit_I2C.py", line 43, in __init__
[Mon Dec 11 09:30:32.704127 2017] [wsgi:error] [pid 1583] [client 192.168.0.10:38416] self.bus = smbus.SMBus(busnum if busnum >= 0 else Adafruit_I2C.getPiI2CBusNumber())
[Mon Dec 11 09:30:32.704204 2017] [wsgi:error] [pid 1583] [client 192.168.0.10:38416] IOError: [Errno 13] Permission denied
가 어떻게이 문제를 해결 할 수 있으며 mod_wsgi에를 통해 배포 갔지 어떤 사용자 것은 실제로 응용 프로그램을 실행을?