FS#46240 - [samba] invalid permissions on directory '/var/cache/samba/msg': has 0700 should be 0755
Attached to Project:
Arch Linux
Opened by Ace (0xACE) - Wednesday, 09 September 2015, 22:08 GMT
Last edited by Doug Newgard (Scimmia) - Friday, 10 June 2016, 23:23 GMT
Opened by Ace (0xACE) - Wednesday, 09 September 2015, 22:08 GMT
Last edited by Doug Newgard (Scimmia) - Friday, 10 June 2016, 23:23 GMT
|
Details
Description:
upgraded samba (4.2.3-2 -> 4.3.0-1) and smbd and nmbd refused to run, looking in journalctl I could see that nmbd complained: invalid permissions on directory '/var/cache/samba/msg': has 0700 should be 0755 To fix this i had to run `sudo chmod 755 /var/cache/samba/msg`. Is this as intended? This problem appeared on both of my machines. |
This task depends upon
In my case `/var/cahce/samba/msg` is owned by root
I also wanted to add that it seems like both nmbd and smbd are running as root on my machine.
Andrew Gaydenko (student975) I assume the program recreated it with 755 with root as a owner?
[root@nas cache]# ls -als | grep samba
4 drwxr-xr-x 3 root root 4096 Sep 10 13:04 samba
[root@nas cache]#
Job for smbd.service failed because the control process exited with error code. See "systemctl status smbd.service" and "journalctl -xe" for details.
# systemctl status smbd.service
Sep 10 13:44:21 fujitsu systemd[1]: smbd.service: Control process exited, code=exited status=1
Not very informative, is it? Who would think to try the next step?
# systemctl status nmbd.service
Sep 10 13:45:14 fujitsu nmbd[2169]: invalid permissions on directory '/var/cache/samba/msg': has 0700 should be 0755
# chmod 755 /var/cache/samba/msg
# ls -ld /var/cache/samba/msg
drwxr-xr-x 2 root root 4096 Sep 10 14:07 /var/cache/samba/msg
# ls -l /var/cache/pacman/pkg/samba*
-rw-r--r-- 1 root root 5121368 Aug 29 01:43 /var/cache/pacman/pkg/samba-4.2.3-2-i686.pkg.tar.xz
-rw-r--r-- 1 root root 5119928 Sep 9 01:18 /var/cache/pacman/pkg/samba-4.3.0-1-i686.pkg.tar.xz
Same here. If the kernel updates weren't stalled we'd all have rebooted and this would be already on the home page. I caught it on my laptop.
# #backup /etc/samba/smb.conf
# pacman -Rscc samba
# rm -rf /var/{log,cache}/samba
# pacman -S samba
# #fix /etc/samba/smb.conf
# systemctl start smbd
# # observe /var/cache/samba is empty
# systemctl start nmbd
# # observe /var/cache/samba is populated
I removed, cleaned, and reinstalled samba. The msg folder is made on the first start of nmbd and the permissions are correct according to the new rules.
This fix needs to go into the installer and up the pkgrel before this issue ends up on the home page for killing servers.
"Severity Low" The severity needs to be modified to whatever the highest setting is.
"High - The main functionality of the application does not work, less critical security issues, etc."
I suppose the severity should be High. Yes most likely when people restart their samba servers the problem will become more common.
Samba not working after a reboot is pretty obvious. How did we not catch this in staging? Looks like none of the rc were used in staging.
No mention in the Samba news or the change log. Can we file bug reports against the change log?
Avoiding a reboot will not save you!
-rw-r--r-- 1 root root 4959164 Sep 9 01:19 /var/cache/pacman/pkg/samba-4.3.0-1-x86_64.pkg.tar.xz
# last reboot
reboot system boot 4.1.6-1-ARCH Fri Sep 11 03:39 still running
reboot system boot 4.1.6-1-ARCH Thu Sep 10 04:51 - 03:39 (22:47)
reboot system boot 4.1.6-1-ARCH Mon Sep 7 01:02 - 03:39 (4+02:36)
My home computer was the first one to get all fixed up around the time of my first post 14:12. 12 hours later and Samba is down having had no traffic all day. The problem gets worse and now there are at least two bugs, not including the changelog bug. I'm downgrading home and two servers at work. Fortunately I know where to look first for why Samba doesn't start.
# downgrade samba smbclient libwbclient
add samba to IgnorePkg? [y/n] y
# pacman -Q samba smbclient libwbclient
samba 4.2.3-2
smbclient 4.2.3-2
libwbclient 4.2.3-2
# systemctl status nmbd.service
Sep 11 03:39:37 gq nmbd[659]: invalid permissions on directory '/var/cache/samba/msg': has 0755 should be 0700
# chmod 700 /var/cache/samba/msg
I haven't reported it for 3 reasons.
1) https://en.wikipedia.org/wiki/Diffusion_of_responsibility
2) My primary concern is Arch Linux
3) It's more than a quick chmod so we don't know enough about the problem to fix Arch Linux.
If downgrading works we know it's confined to Samba and not some other package that came along at the same time.
https://bugzilla.samba.org/show_bug.cgi?id=11515