在apache環境中使用 python stock 請求遇到error: [Errno 13] Permission denied
一個python 專案執行在linux 環境下,使用apache做為web容器。
呼叫urllib2.urlopen(your url) 或者 xmlrpclib.ServerProxy()請求某個服務的時候報error: [Errno 13] Permission denied 異常。
這是一個頭痛的問題,其實提示也比較清楚,就是許可權不夠。可是什麼許可權不夠呢, 專案目錄我都賦給apache 755許可權了。在google查了半天發現,原來是SELinux在搞鬼。
關閉SeLinux就可以了
使用 setenforce 0 馬上關閉
修改/etc/selinux/config 檔案中的SELINUX=“disabled” 即使重啟也會關閉
相關推薦
在apache環境中使用 python stock 請求遇到error: [Errno 13] Permission denied
一個python 專案執行在linux 環境下,使用apache做為web容器。 呼叫urllib2.urlopen(your url) 或者 xmlrpclib.ServerProxy()請求某個服務的時候報error: [Errno 13] Permission den
Could not install packages due to an Environment Error: [Errno 13] Permission denied 解決方案
執行pip install 報錯如下: Could not install packages due to an Environment Error: [Errno 13] Permission denied: '/usr/local/lib/python3.5/dist-packages/kiwisolv
Ubuntu下刪除(或安裝)某個python庫時報錯:OSError:[Errno 13]Permission denied解決方法
Ubuntu下刪除某個python庫時,比如說:pip uninstall sphinxcontrib-doxylink出現一下情況,報錯:OSError:[Errno 13]Permission denied解決辦法:許可權不夠,升級一下許可權,在指令前面加上sudo。su
Jupyter執行時出現下面的錯誤:Unexpected error while saving file: arma/Untitled.ipynb [Errno 13] Permission denied:
執行環境:Ubuntu16.04+Python2.7執行如下程式碼修改Jupyter的一部分檔案的許可權(執行完之後重新啟動即可): sudo chmod 777 ~/.local/share/jupyter/ cd ~/.local/share/jupyter/ ls s
成功解決PermissionError: [Errno 13] Permission denied: 'f:\\program files\\python\\python36\\Lib\\site-
解決問題 PermissionError: [Errno 13] Permission denied: 'f:\\program files\\python\\python36\\Lib\\site-packages\\numpy\\.libs\\libopenblas.
mac下更新pip時提示OSError: [Errno 13] Permission denied: '/Library/Python/2.7/site-packages/pip-8.0.2-py2.
使用pip安裝一個python庫時提示pip版本過低,需要升級,執行 pip install--upgrade pip 後提示: Collecting pip Using cached pip-8.1.0-py2.py3-none-any.whl In
裝完 mysql-python 報錯 [Errno 13] Permission denied: '/root/.python-eggs'
裝完 mysql-python 報如下錯誤 Can't extract file(s) to egg cache The following error occurred while trying to extract file(s) to the Python egg
tensorflow中OSError: [Errno 13] Permission denied: 'data'怎麼解決
在訓練tensorflow的時候,當我Train your first TensorFlow neural net model$ cd tensorflow/models/image/mnist$ python convolutional.py的時候出現了OSError: [
Python 3.6 解決"PermissionError: [Errno 13] Permission denied"
環境: win7 + Python3.6輸入:file = open('E:/我的堅果雲/Pycharmprojects/Laboratory','w') file.write('Hello wo
許可權過低:OSError: [Errno 13] Permission denied: '/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/E
初學CNN,需要安裝sklearn庫進行資料訓練,但是提示我pip版本過低,於是嘗試更新pip,結果出現如下報錯Exception:Traceback (most recent call last): File "/Library/Python/2.7/site-packa
關於virtualenv虛擬環境中python版本的坑
通過virtualenv建立了基於python3的虛擬環境,啟用虛擬環境後發現執行程式時依然在用python2在解析,後折騰一番後發現原因是,虛擬環境中未pip install flask,導致執行程式時系統自動去載入系統預設的python2。折騰的經過如下: 通過如下兩行
flask 中訪問時後臺錯誤 error: [Errno 32] Broken pipe
默認 ken 解決辦法 分享圖片 error RR nbsp alt pipe 解決辦法:app.run(threaded=True) 個人理解:flask默認單線程,訪問一個頁面時會訪問到很多頁面,比如一些圖片,加入參數使其為多線程flask 中訪問時後臺錯誤 er
selenium中的報錯socket.error: [Errno 10053]
當我們建立driver並使用完成後,需要把driver釋放掉,這個時候通常的操作是關閉瀏覽器並退出 但如果close()和quit()順序反掉的話,就會報10053的錯誤 10053即socket error,socket連線斷開後,跟socket相關的操作都會報這個錯誤 注:僅適
鬱悶的 linux error: 13: Permission denied 引發Linux中的檔案許可權詳解
在《Linux系統中如何檢視檔案屬性》中介紹了通過ls指令來檢視檔案的屬性,具體如下: [email protected]:/$ cd /tmp le[email protected]:/tmp$ touch test [email pr
mac下使用pycharm執行python程式報錯:OSError:[Error 13] Permission denied:
發現自己工程目錄下的external Libraries下面這些庫都是鎖的狀態,所以懷疑是許可權的問題,嘗試解決如下:通過chown -R ‘username’ 'pathname'命令修改資料夾所屬使用者:修改完再檢視pycharm下的External Libraries目
nginx之 [error] 6702#0:XXX is forbidden (13: Permission denied)
client process 兩個 dex load onf forbidden .html cst 問題描述: 配置完 nginx 兩個虛擬機後,客戶端能夠訪問原始的server ,新增加的 server 虛擬機 不能夠訪問,報錯如下頁面 解決過程: 1. 查看報錯日誌
CentOS7.4中Docker以rw方式掛載volume報Permission denied問題
一、問題背景 今天在CentOS7.4.1708上實踐Docker掛載volume,一切按照正常流程進行操作,無論是建立目錄、建立檔案、還是檢視、編輯主機上建立好的檔案,都報"Permission denied",具體如下: [[email protected]
Nginx (nginx 500 Internal Server Error錯誤 )error_log is forbidden (13: Permission denied)
ps -ef|grpe nignx 發現啟動nginx 對應的使用者為nginx 修改nginx.conf vim /etc/nginx/nginx.conf 將user nginx; 改為user root;重新啟動nginx即可 (有時候/nginx -s reload 或者 ser
ubuntu 16.04 LTS 呼叫pyclamd的scan_file報錯 error lstat() failed permission denied
其實這個錯誤的根本是許可權問題。你需要檢視你想要掃描的這個檔案,你是否有許可權讀寫它。而且scan_file方法的引數是string型別,是你要掃描的檔案或者目錄的絕對路徑。你要保證有許可權操作這個絕對路徑中的所有目錄(如果你要掃描檔案,那麼你也要有許可權操作這個檔案),為了
Mac idea error=13, Permission denied
問題 12:26 Error running 'rs8080': Cannot run program "/Users/xxx/software/apache-tomcat-8.5.37/bin/catalina.sh" (in directory "/Users/xxx/software/apache-t