Samba - 无法打开新日志文件“/var/log/samba/smbd.log”:权限被拒绝

Samba - 无法打开新日志文件“/var/log/samba/smbd.log”:权限被拒绝

当我检查 samba 状态时,它显示以下错误:

service smb status

Mar 03 11:17:37 fujitsu.localdomain smbd[203323]:   Unable to open new log file '/var/log/samba/log.smbd': Permission denied
Mar 03 11:17:37 fujitsu.localdomain smbd[203323]: [2021/03/03 11:17:37.691484,  0] ../lib/util/debug.c:1055(reopen_logs_internal)
Mar 03 11:17:37 fujitsu.localdomain smbd[203323]:   Unable to open new log file '/var/log/samba/log.smbd': Permission denied
Mar 03 11:17:37 fujitsu.localdomain smbd[203323]: [2021/03/03 11:17:37.691532,  0] ../lib/util/debug.c:1055(reopen_logs_internal)
Mar 03 11:17:37 fujitsu.localdomain smbd[203323]:   Unable to open new log file '/var/log/samba/log.smbd': Permission denied
Mar 03 11:17:37 fujitsu.localdomain smbd[203323]: [2021/03/03 11:17:37.728845,  0] ../lib/util/become_daemon.c:138(daemon_ready)
Mar 03 11:17:37 fujitsu.localdomain smbd[203323]:   daemon_ready: STATUS=daemon 'smbd' finished starting up and ready to serve connections
Mar 03 11:17:37 fujitsu.localdomain systemd[1]: Started Samba SMB Daemon.
Mar 03 11:17:37 fujitsu.localdomain smbd[203323]: [2021/03/03 11:17:37.732849,  0] ../lib/util/debug.c:1055(reopen_logs_internal)
Mar 03 11:17:37 fujitsu.localdomain smbd[203323]:   Unable to open new log file '/var/log/samba/log.smbd': Permission denied

否则 samba 的状态是活动的,但这个错误确实让我困惑。我尝试更改此文件夹的权限,但没有帮助。

答案1

不确定您如何尝试更新权限,但这对我有用:

sudo chmod 770 /var/log/samba

相关内容