You are not logged in.

#1 2019-03-18 09:28:00

lycos
Member
Registered: 2013-02-01
Posts: 13

[SOLVED] samba fails to create the folder /var/run/samba

I don't know when happened, but smb and nmb fails to start. From what I saw samba fails to create the directory /var/run/samba/ncalrpc.

If I create manually the folder /var/run/samba than  I can start the smb and nmb services (manually again).  But I have to do it again with every system restart.
Comparing with a virtual machine I didn't notice some problem with the folders permissions (but I could be wrong).

Any idea how to fix it?


trek@arch ~ $ systemctl status smb
● smb.service - Samba SMB Daemon
   Loaded: loaded (/usr/lib/systemd/system/smb.service; enabled; vendor preset: disable>
   Active: failed (Result: exit-code) since Mon 2019-03-18 10:05:14 EET; 40min ago
     Docs: man:smbd(8)
           man:samba(7)
           man:smb.conf(5)
  Process: 695 ExecStart=/usr/bin/smbd --foreground --no-process-group $SMBDOPTIONS (co>
 Main PID: 695 (code=exited, status=255/EXCEPTION)

Mar 18 10:05:13 arch systemd[1]: Starting Samba SMB Daemon...
Mar 18 10:05:13 arch smbd[695]: [2019/03/18 10:05:13.956980,  0] ../lib/util/util.c:217>
Mar 18 10:05:13 arch smbd[695]:   mkdir failed on directory /var/run/samba/ncalrpc: No >
Mar 18 10:05:13 arch smbd[695]: [2019/03/18 10:05:13.970556,  0] ../source3/smbd/server>
Mar 18 10:05:13 arch smbd[695]:   Failed to create pipe directory /var/run/samba/ncalrp>
Mar 18 10:05:14 arch systemd[1]: smb.service: Main process exited, code=exited, status=>
Mar 18 10:05:14 arch systemd[1]: smb.service: Failed with result 'exit-code'.
Mar 18 10:05:14 arch systemd[1]: Failed to start Samba SMB Daemon.
trek@arch ~ $ ls -lha /var
total 52K
drwxr-xr-x 12 root root  4.0K Mar 17 11:07 .
drwxrwxr-x 17 trek users 4.0K Dec 27 02:53 ..
drwxr-xr-x 10 root root  4.0K Jul  6  2018 cache
drwxr-xr-x  4 root root  4.0K Oct 18 18:50 db
drwxr-xr-x  2 root root  4.0K Jan  5  2018 empty
drwxrwxr-x  2 root games 4.0K Jan  5  2018 games
drwxr-xr-x 31 root root  4.0K Mar 18 10:43 lib
drwxr-xr-x  2 root root  4.0K Jan  5  2018 local
lrwxrwxrwx  1 root root    11 Dec  6 16:19 lock -> ../run/lock
drwxr-xr-x 12 root root  4.0K Mar 18 10:05 log
lrwxrwxrwx  1 root root    10 Dec  6 16:19 mail -> spool/mail
drwxr-xr-x  2 root root  4.0K Jan  5  2018 opt
lrwxrwxrwx  1 root root     6 Dec  6 16:19 run -> ../run
drwxr-xr-x  5 root root  4.0K Jan 28 20:08 spool
drwxrwxrwt  5 root root  4.0K Mar 18 10:06 tmp
-rw-r--r--  1 root root   208 Mar 17 11:05 .updated
trek@arch ~ $ 
trek@arch ~ $ ls -lhaH /var/run
total 12K
drwxr-xr-x 18 root root   460 Mar 18 10:06 .
drwxrwxr-x 17 trek users 4.0K Dec 27 02:53 ..
drwxr-xr-x  3 root cups    80 Mar 18 10:05 cups
drwxr-xr-x  2 root root    60 Mar 18 10:05 dbus
prw-------  1 root root     0 Mar 18 10:04 dmeventd-client
prw-------  1 root root     0 Mar 18 10:04 dmeventd-server
drwxr-xr-x  2 root root    60 Mar 18 10:04 fsck
prw-------  1 root root     0 Mar 18 10:04 initctl
drwxr-xr-x  2 root root    40 Mar 18 10:04 initramfs
drwx--x--x  2 root root    40 Mar 18 10:20 lightdm
-rw-r--r--  1 root root     4 Mar 18 10:05 lightdm.pid
drwx------  3 root root    80 Mar 18 10:04 lock
drwxr-xr-x  2 root root    40 Mar 18 10:05 log
drwxr-xr-x  2 root root    80 Mar 18 10:04 lvm
-rw-r--r--  1 root root     4 Mar 18 10:04 lvmetad.pid
drwxr-xr-x  2 root root    40 Mar 18 10:04 mount
drwxr-xr-x  3 root root    80 Mar 18 10:05 NetworkManager
drwxr-xr-x  3 root root    60 Mar 18 10:18 sudo
drwxr-xr-x 15 root root   380 Mar 18 10:05 systemd
drwxr-xr-x  2 root root    60 Mar 18 10:04 tmpfiles.d
drwxr-xr-x  6 root root   140 Mar 18 10:05 udev
drwx------  2 root root    40 Mar 18 10:06 udisks2
drwxr-xr-x  3 root root    60 Mar 18 10:06 user
trek@arch ~ $ 

Last edited by lycos (2019-03-18 10:40:33)

Offline

#2 2019-03-18 09:44:13

Slithery
Forum Moderator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 3,493

Re: [SOLVED] samba fails to create the folder /var/run/samba

That folder should be created on boot by /usr/lib/tmpfiles.d/samba.conf which is shipped as part of the samba package. What does this look like on your machine?

Do you have any other errors regarding tmpfiles in your logs?


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#3 2019-03-18 10:17:27

lycos
Member
Registered: 2013-02-01
Posts: 13

Re: [SOLVED] samba fails to create the folder /var/run/samba

You are right. There are plenty errors  from tmpfiles for "Detected unsafe path transition" for many folders:

trek@arch ~ $ journalctl -b | grep tmpfiles
Mar 18 10:05:01 arch kernel: audit: type=1130 audit(1552896293.724:8): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-tmpfiles-setup-dev comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Mar 18 10:05:02 arch kernel: audit: type=1130 audit(1552896301.617:14): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-tmpfiles-setup comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Mar 18 10:04:53 arch audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-tmpfiles-setup-dev comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Mar 18 10:05:01 arch audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-tmpfiles-setup comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Mar 18 10:04:53 arch systemd-tmpfiles[331]: Detected unsafe path transition / → /dev during canonicalization of /dev.
Mar 18 10:04:53 arch systemd-tmpfiles[331]: Detected unsafe path transition / → /dev during canonicalization of /dev.
Mar 18 10:04:53 arch systemd-tmpfiles[331]: Detected unsafe path transition / → /dev during canonicalization of /dev.
Mar 18 10:04:53 arch systemd-tmpfiles[331]: Detected unsafe path transition / → /dev during canonicalization of /dev.
Mar 18 10:04:53 arch systemd-tmpfiles[331]: Detected unsafe path transition / → /dev during canonicalization of /dev.
Mar 18 10:04:53 arch systemd-tmpfiles[331]: Detected unsafe path transition / → /dev during canonicalization of /dev/net.
Mar 18 10:04:53 arch systemd-tmpfiles[331]: Detected unsafe path transition / → /dev during canonicalization of /dev.
Mar 18 10:04:53 arch systemd-tmpfiles[331]: Detected unsafe path transition / → /dev during canonicalization of /dev.
Mar 18 10:04:53 arch systemd-tmpfiles[331]: Detected unsafe path transition / → /dev during canonicalization of /dev.
Mar 18 10:04:53 arch systemd-tmpfiles[331]: Detected unsafe path transition / → /dev during canonicalization of /dev/mapper.
Mar 18 10:04:53 arch systemd-tmpfiles[331]: Detected unsafe path transition / → /dev during canonicalization of /dev.
Mar 18 10:04:53 arch systemd-tmpfiles[331]: Detected unsafe path transition / → /dev during canonicalization of /dev/vfio.
Mar 18 10:04:53 arch systemd-tmpfiles[331]: Detected unsafe path transition / → /dev during canonicalization of /dev.
Mar 18 10:04:53 arch systemd-tmpfiles[331]: Detected unsafe path transition / → /dev during canonicalization of /dev.
Mar 18 10:04:53 arch systemd-tmpfiles[331]: Detected unsafe path transition / → /dev during canonicalization of /dev.
Mar 18 10:04:53 arch systemd-tmpfiles[331]: Detected unsafe path transition / → /dev during canonicalization of /dev.
Mar 18 10:04:53 arch systemd-tmpfiles[331]: Detected unsafe path transition / → /dev during canonicalization of /dev.
Mar 18 10:04:53 arch systemd-tmpfiles[331]: Detected unsafe path transition / → /dev during canonicalization of /dev.
Mar 18 10:04:53 arch systemd-tmpfiles[331]: Detected unsafe path transition / → /dev during canonicalization of /dev.
Mar 18 10:04:53 arch systemd-tmpfiles[331]: Detected unsafe path transition / → /dev during canonicalization of /dev/snd.
Mar 18 10:04:53 arch systemd-tmpfiles[331]: Detected unsafe path transition / → /dev during canonicalization of /dev/snd.
Mar 18 10:05:01 arch systemd-tmpfiles[584]: Detected unsafe path transition / → /etc during canonicalization of /etc.
Mar 18 10:05:01 arch systemd-tmpfiles[584]: Detected unsafe path transition / → /etc during canonicalization of /etc.
Mar 18 10:05:01 arch systemd-tmpfiles[584]: Detected unsafe path transition / → /etc during canonicalization of /etc.
Mar 18 10:05:01 arch systemd-tmpfiles[584]: Detected unsafe path transition / → /etc during canonicalization of /etc.
Mar 18 10:05:01 arch systemd-tmpfiles[584]: Detected unsafe path transition / → /etc during canonicalization of /etc.
Mar 18 10:05:01 arch systemd-tmpfiles[584]: Detected unsafe path transition / → /etc during canonicalization of /etc.
Mar 18 10:05:01 arch systemd-tmpfiles[584]: Detected unsafe path transition / → /etc during canonicalization of /etc.
Mar 18 10:05:01 arch systemd-tmpfiles[584]: Detected unsafe path transition / → /etc during canonicalization of /etc.
Mar 18 10:05:01 arch systemd-tmpfiles[584]: Detected unsafe path transition / → /etc during canonicalization of /etc.
Mar 18 10:05:01 arch systemd-tmpfiles[584]: Detected unsafe path transition / → /etc during canonicalization of /etc.
Mar 18 10:05:01 arch systemd-tmpfiles[584]: Detected unsafe path transition / → /etc during canonicalization of /etc.
Mar 18 10:05:01 arch systemd-tmpfiles[584]: Detected unsafe path transition / → /etc during canonicalization of /etc.
Mar 18 10:05:01 arch systemd-tmpfiles[584]: Detected unsafe path transition / → /etc during canonicalization of /etc.
Mar 18 10:05:01 arch systemd-tmpfiles[584]: Detected unsafe path transition / → /etc during canonicalization of /etc.
Mar 18 10:05:01 arch systemd-tmpfiles[584]: Detected unsafe path transition / → /etc during canonicalization of /etc.
Mar 18 10:05:01 arch systemd-tmpfiles[584]: Detected unsafe path transition / → /var during canonicalization of /var.
Mar 18 10:05:01 arch systemd-tmpfiles[584]: Detected unsafe path transition / → /var during canonicalization of /var/lib.
Mar 18 10:05:01 arch systemd-tmpfiles[584]: Detected unsafe path transition / → /var during canonicalization of /var/lib/colord.
Mar 18 10:05:01 arch systemd-tmpfiles[584]: Detected unsafe path transition / → /run during canonicalization of /run.
Mar 18 10:05:01 arch systemd-tmpfiles[584]: Detected unsafe path transition / → /var during canonicalization of /var/lib.
Mar 18 10:05:01 arch systemd-tmpfiles[584]: Detected unsafe path transition / → /run during canonicalization of /run.
Mar 18 10:05:01 arch systemd-tmpfiles[584]: Detected unsafe path transition / → /run during canonicalization of /run/lock.
Mar 18 10:05:01 arch systemd-tmpfiles[584]: Detected unsafe path transition / → /etc during canonicalization of /etc.
Mar 18 10:05:01 arch systemd-tmpfiles[584]: Detected unsafe path transition / → /var during canonicalization of /var/lib.
Mar 18 10:05:01 arch systemd-tmpfiles[584]: Detected unsafe path transition / → /run during canonicalization of /run/lock.
Mar 18 10:05:01 arch systemd-tmpfiles[584]: Detected unsafe path transition / → /run during canonicalization of /run.
Mar 18 10:05:01 arch systemd-tmpfiles[584]: Detected unsafe path transition / → /var during canonicalization of /var.
Mar 18 10:05:01 arch systemd-tmpfiles[584]: Detected unsafe path transition / → /var during canonicalization of /var/cache.
Mar 18 10:05:01 arch systemd-tmpfiles[584]: Detected unsafe path transition / → /var during canonicalization of /var/lib.
Mar 18 10:05:01 arch systemd-tmpfiles[584]: Detected unsafe path transition / → /var during canonicalization of /var/lib.
Mar 18 10:05:01 arch systemd-tmpfiles[584]: Detected unsafe path transition / → /var during canonicalization of /var.
Mar 18 10:05:01 arch systemd-tmpfiles[584]: Detected unsafe path transition / → /var during canonicalization of /var/log.
Mar 18 10:05:01 arch systemd-tmpfiles[584]: Detected unsafe path transition / → /var during canonicalization of /var/lib.
Mar 18 10:05:01 arch systemd-tmpfiles[584]: Detected unsafe path transition / → /var during canonicalization of /var/cache.
Mar 18 10:05:01 arch systemd-tmpfiles[584]: Detected unsafe path transition / → /run during canonicalization of /run.
Mar 18 10:05:01 arch systemd-tmpfiles[584]: Detected unsafe path transition / → /run during canonicalization of /run.
Mar 18 10:05:01 arch systemd-tmpfiles[584]: Detected unsafe path transition / → /var during canonicalization of /var/lib.
Mar 18 10:05:01 arch systemd-tmpfiles[584]: Detected unsafe path transition / → /var during canonicalization of /var/lib.
Mar 18 10:05:01 arch systemd-tmpfiles[584]: Detected unsafe path transition / → /run during canonicalization of /run.
Mar 18 10:05:01 arch systemd-tmpfiles[584]: Detected unsafe path transition / → /var during canonicalization of /var/log.
Mar 18 10:05:01 arch systemd-tmpfiles[584]: Detected unsafe path transition / → /var during canonicalization of /var.
Mar 18 10:05:01 arch systemd-tmpfiles[584]: Detected unsafe path transition / → /run during canonicalization of /run.
Mar 18 10:05:01 arch systemd-tmpfiles[584]: Detected unsafe path transition / → /run during canonicalization of /run/sudo.
Mar 18 10:05:01 arch systemd-tmpfiles[584]: Detected unsafe path transition / → /run during canonicalization of /run.
Mar 18 10:05:01 arch systemd-tmpfiles[584]: Detected unsafe path transition / → /var during canonicalization of /var/lib.
Mar 18 10:05:01 arch systemd-tmpfiles[584]: Detected unsafe path transition / → /run during canonicalization of /run.
Mar 18 10:05:01 arch systemd-tmpfiles[584]: Detected unsafe path transition / → /run during canonicalization of /run.
Mar 18 10:05:01 arch systemd-tmpfiles[584]: Detected unsafe path transition / → /run during canonicalization of /run/systemd.
Mar 18 10:05:01 arch systemd-tmpfiles[584]: Detected unsafe path transition / → /run during canonicalization of /run/systemd.
Mar 18 10:05:01 arch systemd-tmpfiles[584]: Detected unsafe path transition / → /run during canonicalization of /run/systemd.
Mar 18 10:05:01 arch systemd-tmpfiles[584]: Detected unsafe path transition / → /run during canonicalization of /run/systemd.
Mar 18 10:05:01 arch systemd-tmpfiles[584]: Detected unsafe path transition / → /run during canonicalization of /run/systemd.
Mar 18 10:05:01 arch systemd-tmpfiles[584]: Detected unsafe path transition / → /run during canonicalization of /run/systemd.
Mar 18 10:05:01 arch systemd-tmpfiles[584]: Detected unsafe path transition / → /run during canonicalization of /run/systemd.
Mar 18 10:05:01 arch systemd-tmpfiles[584]: Detected unsafe path transition / → /run during canonicalization of /run/systemd/netif.
Mar 18 10:05:01 arch systemd-tmpfiles[584]: Detected unsafe path transition / → /run during canonicalization of /run/systemd/netif.
Mar 18 10:05:01 arch systemd-tmpfiles[584]: Detected unsafe path transition / → /run during canonicalization of /run.
Mar 18 10:05:01 arch systemd-tmpfiles[584]: Detected unsafe path transition / → /var during canonicalization of /var/lib.
Mar 18 10:05:01 arch systemd-tmpfiles[584]: Detected unsafe path transition / → /var during canonicalization of /var/lib/systemd.
Mar 18 10:05:01 arch systemd-tmpfiles[584]: Detected unsafe path transition / → /var during canonicalization of /var/lib.
Mar 18 10:05:01 arch systemd-tmpfiles[584]: Detected unsafe path transition / → /var during canonicalization of /var/log.
Mar 18 10:05:01 arch systemd-tmpfiles[584]: Detected unsafe path transition / → /var during canonicalization of /var/cache.
Mar 18 10:05:01 arch systemd-tmpfiles[584]: Detected unsafe path transition / → /var during canonicalization of /var.
Mar 18 10:05:01 arch systemd-tmpfiles[584]: Detected unsafe path transition / → /var during canonicalization of /var/log.
Mar 18 10:05:01 arch systemd-tmpfiles[584]: Detected unsafe path transition / → /var during canonicalization of /var/log.
Mar 18 10:05:01 arch systemd-tmpfiles[584]: Detected unsafe path transition / → /var during canonicalization of /var/log.
Mar 18 10:05:01 arch systemd-tmpfiles[584]: Detected unsafe path transition / → /var during canonicalization of /var.
Mar 18 10:05:01 arch systemd-tmpfiles[584]: Detected unsafe path transition / → /tmp during canonicalization of /tmp.
Mar 18 10:05:01 arch systemd-tmpfiles[584]: Detected unsafe path transition / → /tmp during canonicalization of /tmp.
Mar 18 10:05:01 arch systemd-tmpfiles[584]: Detected unsafe path transition / → /tmp during canonicalization of /tmp.
Mar 18 10:05:01 arch systemd-tmpfiles[584]: Detected unsafe path transition / → /tmp during canonicalization of /tmp.
Mar 18 10:05:01 arch systemd-tmpfiles[584]: Detected unsafe path transition / → /tmp during canonicalization of /tmp.
Mar 18 10:05:01 arch systemd-tmpfiles[584]: Detected unsafe path transition / → /var during canonicalization of /var/log/journal.
Mar 18 10:05:01 arch systemd-tmpfiles[584]: Detected unsafe path transition / → /var during canonicalization of /var/log/journal.
Mar 18 10:05:01 arch systemd-tmpfiles[584]: Detected unsafe path transition / → /var during canonicalization of /var/log/journal.
Mar 18 10:05:01 arch systemd-tmpfiles[584]: Detected unsafe path transition / → /var during canonicalization of /var/log/journal.
Mar 18 10:05:01 arch systemd-tmpfiles[584]: Detected unsafe path transition / → /var during canonicalization of /var/log/journal/d30d00bae97a4dd0be41879359ece6ba.
Mar 18 10:05:01 arch systemd-tmpfiles[584]: Detected unsafe path transition / → /var during canonicalization of /var/log/journal/d30d00bae97a4dd0be41879359ece6ba.
Mar 18 10:05:01 arch systemd-tmpfiles[584]: Detected unsafe path transition / → /var during canonicalization of /var/log/journal/d30d00bae97a4dd0be41879359ece6ba.
Mar 18 10:05:01 arch systemd-tmpfiles[584]: Detected unsafe path transition / → /var during canonicalization of /var/log/journal/d30d00bae97a4dd0be41879359ece6ba.
Mar 18 10:05:01 arch systemd-tmpfiles[584]: Detected unsafe path transition / → /var during canonicalization of /var/log/journal/remote.
Mar 18 10:05:01 arch systemd-tmpfiles[584]: Detected unsafe path transition / → /sys during canonicalization of /sys/devices/system/cpu/microcode.
Mar 18 10:05:01 arch systemd-tmpfiles[584]: Detected unsafe path transition / → /var during canonicalization of /var/log/journal/d30d00bae97a4dd0be41879359ece6ba/system.journal.
Mar 18 10:05:01 arch systemd-tmpfiles[584]: Detected unsafe path transition / → /var during canonicalization of /var/log/journal/d30d00bae97a4dd0be41879359ece6ba/system.journal.
Mar 18 10:20:06 arch systemd[1]: systemd-tmpfiles-clean.service: Succeeded.
Mar 18 10:20:06 arch audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-tmpfiles-clean comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Mar 18 10:20:06 arch audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-tmpfiles-clean comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Mar 18 10:20:06 arch kernel: audit: type=1130 audit(1552897206.798:47): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-tmpfiles-clean comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Mar 18 10:20:06 arch kernel: audit: type=1131 audit(1552897206.798:48): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-tmpfiles-clean comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
trek@arch ~ $ 

Offline

#4 2019-03-18 10:18:37

loqs
Member
Registered: 2014-03-06
Posts: 9,234

Re: [SOLVED] samba fails to create the folder /var/run/samba

What is the output of

stat /

Offline

#5 2019-03-18 10:25:28

lycos
Member
Registered: 2013-02-01
Posts: 13

Re: [SOLVED] samba fails to create the folder /var/run/samba

trek@arch ~ $ stat /
  File: /
  Size: 4096      	Blocks: 8          IO Block: 4096   directory
Device: 816h/2070d	Inode: 2           Links: 17
Access: (0775/drwxrwxr-x)  Uid: ( 1000/    trek)   Gid: (  985/   users)
Access: 2019-03-18 11:52:01.186995397 +0200
Modify: 2018-12-27 02:53:22.216780198 +0200
Change: 2018-12-27 02:53:22.216780198 +0200
 Birth: -
trek@arch ~ $ 

Offline

#6 2019-03-18 10:30:01

loqs
Member
Registered: 2014-03-06
Posts: 9,234

Re: [SOLVED] samba fails to create the folder /var/run/samba

Why is / not owned root:root with permissions 755?

Offline

#7 2019-03-18 10:40:01

lycos
Member
Registered: 2013-02-01
Posts: 13

Re: [SOLVED] samba fails to create the folder /var/run/samba

Thanks ! This was the problem. I changed the owner for / to root:root with 0755 permissions and now samba starts.
Most likely a python script I was creating for altering the folder permissions for a web server did it and I never noticed it.

Thank you both

Last edited by lycos (2019-03-18 10:41:37)

Offline

#8 2019-08-16 18:39:40

rizwanhasan
Member
From: Bangladesh
Registered: 2017-10-30
Posts: 14
Website

Re: [SOLVED] samba fails to create the folder /var/run/samba

It saved my day thanks a lot loqs

Offline

#9 2019-11-14 09:08:14

Lestrad
Member
Registered: 2019-11-13
Posts: 3

Re: [SOLVED] samba fails to create the folder /var/run/samba

rizwanhasan wrote:

It saved my day thanks a lot loqs

Hello. I tried this solution - creating the /run/samba/ directory and changing the owner and permissions to root:root and 755, but I still get the same failure of the Samba daemon to start on reboot because the folder seems to have been deleted.

smb.service - Samba SMB Daemon
   Loaded: loaded (/usr/lib/systemd/system/smb.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Thu 2019-11-14 08:56:27 CET; 51min ago
     Docs: man:smbd(8)
           man:samba(7)
           man:smb.conf(5)
  Process: 392 ExecStart=/usr/bin/smbd --foreground --no-process-group $SMBDOPTIONS (code=exited, status=255/EXCEPTION)
 Main PID: 392 (code=exited, status=255/EXCEPTION)
   Status: "Starting process..."

Nov 14 08:56:26 alarm systemd[1]: Starting Samba SMB Daemon...
Nov 14 08:56:27 alarm smbd[392]: [2019/11/14 08:56:27.519895,  0] ../../source3/smbd/server.c:2074(main)
Nov 14 08:56:27 alarm smbd[392]:   Failed to create pipe directory /run/samba/ncalrpc - No such file or directory
Nov 14 08:56:27 alarm systemd[1]: smb.service: Main process exited, code=exited, status=255/EXCEPTION
Nov 14 08:56:27 alarm systemd[1]: smb.service: Failed with result 'exit-code'.
Nov 14 08:56:27 alarm systemd[1]: Failed to start Samba SMB Daemon.

I have the file  /usr/lib/tmpfiles.d/samba.conf and it reads:

D /run/samba 0755 - - -
d /var/log/samba 0755 - - -

What else might I try?

Last edited by Lestrad (2019-11-14 09:09:03)

Offline

#10 2019-11-14 19:20:00

loqs
Member
Registered: 2014-03-06
Posts: 9,234

Re: [SOLVED] samba fails to create the folder /var/run/samba

@Lestrad I would suggest starting a new thread as this one has been marked as solved.
Include the diagnostics requested in this thread,  particularly the journal output for systemd-tmpfiles.

Offline

#11 2019-11-15 08:55:12

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 7,949

Re: [SOLVED] samba fails to create the folder /var/run/samba

Lestrad is using ALARM and tries to weasel an answer by responding into different topics. Do not bump something again and do not repost this, go to the correct boards.

Closing.

Offline

Board footer

Powered by FluxBB