[Samba] 'Permission denied' Journal entries for '/var/log/samba/log.rpcd_classic'

Friedrich Romstedt friedrichromstedt at gmail.com
Mon Jan 8 11:18:10 UTC 2024


Hi,

This is a question about getting a Samba file server to work. I am a
newbie about Samba, however not an unexperienced Linux user. I am
using Arch Linux with Samba 4.19.3.

The reason for this question is output in the systemd Journal of the
server machine, consisting of two lines like the following (separated
here by a blank line):


[2024/01/08 10:34:11.358889,  0] ../../lib/util/debug.c:1264(reopen_one_log)

reopen_one_log: Unable to open new log file
'/var/log/samba/log.rpcd_classic': Permission denied


This pair of messages is repeated 3 times when I run ``$ smbclient -L
<host> -U <wgroup>/<user>`` on a client machine.

I experimented systematically and searched the web but couldn't find a
solution. I tried:

1.  When I 'chown' the mentioned log file to the samba user I am
authenticating as, the error disappears.

2.  I experimented with "log file = /var/log/samba/by-user/%u.log" and
"... /by-user/%U.log" but this did not yield the change of behaviour I
hoped for. "%u.log" is just used verbatim (the "%u" is not replaced).
"%U.log" only wrote ".log", even though the abovementioned error did
not show up. Each of the two experiments created a bunch of
directories in '/var/log/samba/by-user/'. I removed that entire
directory afterwards, and continued to experiment.

3.  I've tried to direct all log messages to the systemd Journal by
writing "logging = systemd", with no change regarding the initial
error message. Writing "logging = file at 0" inhibits *any* output,
including the error lines. So I tried "logging = systemd file at 0" in an
attempt to direct the lines to the Journal, but not to any logging
file, however with this configuration the "Permission denied" error
reappeared.

My 'smb.conf' is currently very minimal to rule out any interference.
This is okay until I am going production; there is currently no
valuable data on the share. The 'smb.conf' content is:

[global]
server role = standalone
<logging options>
[Extern]
path = /srv/smb/extern

After each change, I restarted the entire Samba service by '#
systemctl restart smb'.  The call of '$ smbclient -L <...>' on the
client successfully lists the "Extern" share.

I am stuck here, even though I performed searches and read quite a
bit. So any advice would be greatly appreciated.

TIA
Friedrich



More information about the samba mailing list