在建立一個腳本來使用AWS上的LibreOffice文檔轉換爲PDF,我不能沒有sudo
獲得的LibreOffice來--convert-to pdf
作爲也許是用戶wsgi
不對/opt/python/current/app
目錄具有寫入權限。增加對用戶的排斥(AWS)的安全隱患:在sudoers中WSGI
所以打算通過附加以下行/etc/sudoers
文件來解決這個問題:
wsgi ALL = NOPASSWD: /opt/libreoffice5.3/program/soffice.bin
因爲我想自動執行此,同時部署,在我.ebextensions/01_packages.config
我有
container_commands:
01_edit_sudoers_only_once:
command: "echo 'wsgi ALL = NOPASSWD: /opt/libreoffice5.3/program/soffice.bin' >> /etc/sudoers"
test: "test ! -f .sudoers_edited"
02_mark_sudoers_as_edited:
command: "touch .sudoers_edited"
有這是一個潛在的安全問題?
這是屬於serverfault嗎? – Pranab