dfree command is not working anymore in samba
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
samba |
Incomplete
|
Unknown
|
|||
samba (Ubuntu) |
Confirmed
|
Medium
|
Unassigned |
Bug Description
I have a ZFS On Linux setup as my main backup/fileserver that uses RaidZ1 (similar to raid 5: 3 disks, 1 parity). Because Linux doesn't show the free space correctly for the complete disk/mount point, the disk space indicator on my Windows machine for this share gives the wrong info. The solution in Samba 3 / Ubuntu 13.10 was to add a "dfree command = scriptname" configuration option to smb.cnf that knew how to figure out the correct disk space/usage. This was all working and the total disk space was displayed correctly in Windows Explorer on the client.
However, now after upgrading to 14.04, the diskspace suddenly gets displayed all wrong again. I checked the script (it worked ok) and even let it output "0 0" to see if it actually gets called by samba, but nothing changed on the indicator of my windows machine. I did reboots of the server, and the client, and nothing changed. I also changed the "dfree command" to a invalid scriptname, and moved it from global to a share section. Nothing worked.
Testparm gives no errors, so it looks like samba somehow just ignores this parameter. Manpage for smb.conf shows that the "dfree command" option is available.
Looks like a regression to me, and is frustrating, because I can't see how much space I am using on my fileserver.
ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: samba 2:4.1.6+
ProcVersionSign
Uname: Linux 3.13.0-24-generic x86_64
NonfreeKernelMo
ApportVersion: 2.14.1-0ubuntu3
Architecture: amd64
CurrentDesktop: Unity
Date: Mon Apr 21 22:43:53 2014
InstallationDate: Installed on 2013-09-29 (204 days ago)
InstallationMedia: Ubuntu-Server 13.04 "Raring Ringtail" - Release amd64 (20130423.1)
NmbdLog:
OtherFailedConnect: Yes
SambaServerRegr
SmbConfIncluded: Yes
SourcePackage: samba
UpgradeStatus: Upgraded to trusty on 2014-04-21 (0 days ago)
Changed in samba: | |
status: | Unknown → Confirmed |
Changed in samba: | |
status: | Confirmed → Incomplete |
Changed in samba (Ubuntu): | |
importance: | Undecided → Medium |
I did some more digging through the logs, and it turns out that the command is called, but fails due to not being called as root user.
For access to the zfs stats you need to be root. This worked ok in 13.10, but it looks like the dfree command is not executed as root user anymore. I would call this a regression, but maybe this is intentional? Still, it makes my dfree command useless...
[2014/04/22 12:48:52.745632, 0] ../source3/ smbd/dfree. c:128(sys_ disk_free) peter/scripts/ zfs_free. sh .'. Error was : No child processes
disk_free: file_lines_load() failed for command '/home/
Unable to open /dev/zfs: Permission denied.
Unable to open /dev/zfs: Permission denied.