samba custom log failure

Hello all,
I have a question regarding samba custom log, specifically writing a log for a remote machine.
I’m using samba client/server 4.1.6-3.18.1 x86_64

In my [Global] config, I have the following line:
“logfile = /var/log/samba/%m.log”

However, when I connect to the share, I get the following in the log.smbd file:

"[2014/06/13 11:55:25.902027, 0] …/lib/util/debug.c:595(reopen_logs_internal)
Unable to open new log file ‘/var/log/samba/acer.log’: Permission denied

[2014/06/13 12:05:12.347411, 0] …/lib/util/debug.c:595(reopen_logs_internal)
Unable to open new log file ‘/var/log/samba/192.168.10.2.log’: Permission denied"

I’ve even created the files, with the same result. I’ve tried changing directory and file permissions to 777, ‘group’ to users, ‘owner’ to sambausr (my only samba user) but, no joy. Am I missing something? Other than that, Samba works fine, well, sort of, but thats for another thread.

Thanks

On 6/13/2014 11:36 AM, sparkz alot wrote:
>
> Hello all,
> I have a question regarding samba custom log, specifically writing a log
> for a remote machine.
> I’m using samba client/server 4.1.6-3.18.1 x86_64
>
> In my [Global] config, I have the following line:
> “logfile = /var/log/samba/%m.log”
>
> However, when I connect to the share, I get the following in the
> log.smbd file:
>
> “[2014/06/13 11:55:25.902027, 0]
> …/lib/util/debug.c:595(reopen_logs_internal)
> Unable to open new log file ‘/var/log/samba/acer.log’: Permission
> denied
>
> [2014/06/13 12:05:12.347411, 0]
> …/lib/util/debug.c:595(reopen_logs_internal)
> Unable to open new log file ‘/var/log/samba/192.168.10.2.log’:
> Permission denied”
>
> I’ve even created the files, with the same result. I’ve tried changing
> directory and file permissions to 777, ‘group’ to users, ‘owner’ to
> sambausr (my only samba user) but, no joy. Am I missing something? Other
> than that, Samba works fine, well, sort of, but thats for another
> thread.
>
> Thanks
>
>
Did you check AppArmor? I have custom logs owned by root with permission 644 (rw-r–r–) that work just fine. However,
I do have AppArmor disabled.


euler3:~ # ls -l /var/log/samba/logsmbd.gauss
-rw-r--r-- 1 root root 0 Jan 14 22:12 /var/log/samba/logsmbd.gauss


P.V.
“We’re all in this together, I’m pulling for you” Red Green

venzkep,
Spot on. Disabled appArmor and I now have the custom logs. Appreciate the answer. Off now to try out your other solutions to my other post :slight_smile: