python项目以www用户启动,实际还是root,导致启动失败;以root用户启动正常
日志如下:
```
** Operational MODE: preforking+threaded ***Traceback (most recent call last):File "/www/wwwroot/images-search/main.py", line 13, in <module>model = models.resnet50(pretrained=True)File "/www/server/pyporject_evn/images-search_venv/lib/python3.6/site-packages/torchvision/models/resnet.py", line 301, in resnet50**kwargs)File "/www/server/pyporject_evn/images-search_venv/lib/python3.6/site-packages/torchvision/models/resnet.py", line 263, in _resnetprogress=progress)File "/www/server/pyporject_evn/images-search_venv/lib/python3.6/site-packages/torch/hub.py", line 566, in load_state_dict_from_urlos.makedirs(model_dir)File "/www/server/pyporject_evn/images-search_venv/lib/python3.6/os.py", line 210, in makedirsmakedirs(head, mode, exist_ok)File "/www/server/pyporject_evn/images-search_venv/lib/python3.6/os.py", line 210, in makedirsmakedirs(head, mode, exist_ok)File "/www/server/pyporject_evn/images-search_venv/lib/python3.6/os.py", line 210, in makedirsmakedirs(head, mode, exist_ok)File "/www/server/pyporject_evn/images-search_venv/lib/python3.6/os.py", line 220, in makedirsmkdir(name, mode)PermissionError: [Errno 13] Permission denied: '/root/.cache'unable to load app 0 (mountpoint='') (callable not found or import error)*** no app loaded. going in full dynamic mode ****** uWSGI is running in multiple interpreter mode ***spawned uWSGI master process (pid: 3302100)spawned uWSGI worker 1 (pid: 3302107, cores: 2)spawned uWSGI worker 2 (pid: 3302109, cores: 2)spawned uWSGI worker 3 (pid: 3302111, cores: 2)spawned uWSGI worker 4 (pid: 3302113, cores: 2)spawned uWSGI http 1 (pid: 3302115)
```
|
|