Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/index.php/Reporting_Bug_Guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

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
Task Type Bug Report
Category Upstream Bugs
Status Closed
Assigned To Tobias Powalowski (tpowa)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 7
Private No

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

Closed by  Doug Newgard (Scimmia)
Friday, 10 June 2016, 23:23 GMT
Reason for closing:  Fixed
Comment by Doug Newgard (Scimmia) - Wednesday, 09 September 2015, 23:23 GMT
Updates will not change permissions on a directory, especially when the package doesn't even contain that directory. I'm guessing this is something that was previously created at runtime? 700 means only the owner can read or write to it, so who owns that dir?
Comment by Andrew Gaydenko (student975) - Thursday, 10 September 2015, 10:12 GMT
Also have got the problem. Thanks to Ace (0xACE) for the workaround. I have just deleted the /var/cache/samba/ directory at all, the issue has gone.
Comment by Ace (0xACE) - Thursday, 10 September 2015, 10:14 GMT
>I'm guessing this is something that was previously created at runtime? 700 means only the owner can read or write to it, so who owns that dir?

In my case `/var/cahce/samba/msg` is owned by root
Comment by Ace (0xACE) - Thursday, 10 September 2015, 10:20 GMT
Not sure if edited posts are sent to the mail subscriptions so I'll just post a new one.

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?
Comment by Andrew Gaydenko (student975) - Thursday, 10 September 2015, 10:23 GMT
@Ace, yes:

[root@nas cache]# ls -als | grep samba
4 drwxr-xr-x 3 root root 4096 Sep 10 13:04 samba
[root@nas cache]#
Comment by Chris Severance (severach) - Thursday, 10 September 2015, 18:12 GMT
# systemctl start smbd
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.
Comment by Ace (0xACE) - Thursday, 10 September 2015, 19:04 GMT
I submitted the bug report in a rush, however reading the wiki:

"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.
Comment by Chris Severance (severach) - Thursday, 10 September 2015, 19:33 GMT
So far as I can tell it's not a fault of our PKGBUILD. This will hit every rolling distro. While we need to fix this to prevent a black eye to Arch, this is a bug and it needs to be filed upstream. How did they not catch it in 4 release candidates (rc1-rc4)?

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?
Comment by Chris Severance (severach) - Friday, 11 September 2015, 03:02 GMT
This problem is worse than it appears. Though I've already fixed the folder permissions, Samba died in the middle of operation on my servers running it.

Avoiding a reboot will not save you!
Comment by Doug Newgard (Scimmia) - Friday, 11 September 2015, 04:01 GMT
A lot of complaining here, has anyone bothered reporting this upstream?
Comment by Chris Severance (severach) - Friday, 11 September 2015, 08:58 GMT
# ls -l /var/cache/pacman/pkg/samba*
-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.
Comment by Simon Monette (akum) - Saturday, 12 September 2015, 03:31 GMT
I also had the "invalid permissions on directory '/var/cache/samba/msg'" today after a system reboot, Thanks for the quick fix. I hope too this will be fixed upstream.
Comment by Chris Severance (severach) - Sunday, 13 September 2015, 02:51 GMT Comment by David C. Rankin (drankinatty) - Tuesday, 06 October 2015, 20:53 GMT
Never mind, upstream will solve it.
Comment by Samantha McVey (samcv) - Friday, 10 June 2016, 22:49 GMT
This bug was fixed upstream (https://bugzilla.samba.org/show_bug.cgi?id=11515), current Arch version is 4.4. Recommending this bug be closed.

Loading...