Results 1 to 3 of 3

Thread: samba custom log failure

  1. #1
    Join Date
    Mar 2014
    Location
    US
    Posts
    115

    Default 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
    If it ain't broke, I just haven't gotten to it yet.
    openSUSE 42.1 (Leap) (x86_64); Intel Dual Core Proc @ 2.66 GHz; KDE Desktop

  2. #2
    Join Date
    Nov 2009
    Location
    ND, USA
    Posts
    1,131

    Default Re: samba custom log failure

    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.
    Code:
    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

  3. #3
    Join Date
    Mar 2014
    Location
    US
    Posts
    115

    Default Re: samba custom log failure

    Quote Originally Posted by venzkep View Post
    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.
    Code:
    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
    If it ain't broke, I just haven't gotten to it yet.
    openSUSE 42.1 (Leap) (x86_64); Intel Dual Core Proc @ 2.66 GHz; KDE Desktop

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •