我一直试图在没有密码的情况下授予www-data
使用sudo service apache2 restart
权限,但无论我尝试什么,都无济于事。我在不同的论坛上阅读了数百篇关于这个问题的帖子,但没有任何帮助。
我知道权限是按顺序添加的,所以特定的命令应该放在列表的末尾。这是我的文件:
#
# This file MUST be edited with the 'visudo' command as root.
#
# Please consider adding local content in /etc/sudoers.d/ instead of
# directly modifying this file.
#
# See the man page for details on how to write a sudoers file.
#
Defaults env_reset
Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
# Host alias specification
# User alias specification
# Cmnd alias specification
# User privilege specification
root ALL=(ALL) ALL
# Members of …
Run Code Online (Sandbox Code Playgroud)