在建立一个脚本来使用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