Hi folks, I'm trying to use a custom dfree command to have my Samba share reports accurate disk usage, here my dfree script (I pretty much copied it right off the smb.conf man page) #!/bin/sh /bin/df -k $1 | tail -1 | awk '{print $2" "$4}' In smb.conf, I included this line: dfree command = /usr/local/admin/samba-2.2.4/bin/dfree This dfree command is root owned, root writeable only script. Whenever I double-click on the Samba share on Windows clients, I get these error messages in samba log: [2002/06/14 17:26:50, 0] smbd/dfree.c:disk_free(118) disk_free: sys_popen() failed for command /usr/local/admin/samba-2.2.4/bin/dfree .. Error was : No child processes [2002/06/14 17:26:50, 0] smbd/dfree.c:disk_free(118) disk_free: sys_popen() failed for command /usr/local/admin/samba-2.2.4/bin/dfree .. Error was : No child processes Am I missing something? Could someone help out! System info: Solaris 7, Samba 2.2.4, Windows 2K clients. Thanks, Desmond -- JNI Corporation - ASIC Development 45365 Northport Loop West. Fremont, CA 94538-6417 Tel: (510) 360-4751 Fax: (510) 252-0123
What happens when you try to run the dfree command directly? eg: /usr/local/admin/samba-2.2.4/bin/dfree Maybe you didn't set the executable flag on the dfree script? If you don't know what I mean, post the output of: ls -al /usr/local/admin/samba-2.2.4/bin/dfree Joel On Fri, Jun 14, 2002 at 05:55:56PM -0700, Desmond Quek wrote:> Hi folks, > > I'm trying to use a custom dfree command to have my Samba share reports > accurate disk usage, here my dfree script (I pretty much copied it right > off the smb.conf man page) > > #!/bin/sh > /bin/df -k $1 | tail -1 | awk '{print $2" "$4}' > > > In smb.conf, I included this line: > > dfree command = /usr/local/admin/samba-2.2.4/bin/dfree > > This dfree command is root owned, root writeable only script. > > Whenever I double-click on the Samba share on Windows clients, I get > these error messages in samba log: > > [2002/06/14 17:26:50, 0] smbd/dfree.c:disk_free(118) > disk_free: sys_popen() failed for command > /usr/local/admin/samba-2.2.4/bin/dfree .. Error was : No child processes > [2002/06/14 17:26:50, 0] smbd/dfree.c:disk_free(118) > disk_free: sys_popen() failed for command > /usr/local/admin/samba-2.2.4/bin/dfree .. Error was : No child processes > > Am I missing something? Could someone help out! > > System info: Solaris 7, Samba 2.2.4, Windows 2K clients. > > > Thanks, > Desmond > > -- > > JNI Corporation - ASIC Development > 45365 Northport Loop West. Fremont, CA 94538-6417 > Tel: (510) 360-4751 Fax: (510) 252-0123 > > > -- > To unsubscribe from this list go to the following URL and read the > instructions: http://lists.samba.org/mailman/listinfo/samba
Hi Joel, Thanks for your tip, I found the solution by making the dfree command executable by everyone. # chmod a+x dfree It was executable by root only: # ls -ld /usr/local/admin/samba-2.2.4/bin/dfree -rwxr--r-- 1 root admin 58 Jun 14 18:10 /usr/local/admin/samba-2.2.4/bin/dfree Evidentally, that is not sufficient, it has to be executable by world. Just for the record, by running the script at the command line returns the corrects numbers. Thanks again! Desmond -------- Original Message -------- Subject: Re: [Samba] Help: dfree command Date: Sat, 15 Jun 2002 11:31:44 -0400 From: Joel Hammer <Joel@HammersHome.com> To: Desmond Quek <dquek@jni.com>, samba@lists.samba.org References: <3D0A909C.90803@jni.com> What happens when you try to run the dfree command directly? eg: /usr/local/admin/samba-2.2.4/bin/dfree Maybe you didn't set the executable flag on the dfree script? If you don't know what I mean, post the output of: ls -al /usr/local/admin/samba-2.2.4/bin/dfree Joel On Fri, Jun 14, 2002 at 05:55:56PM -0700, Desmond Quek wrote: > Hi folks, > > I'm trying to use a custom dfree command to have my Samba share reports > accurate disk usage, here my dfree script (I pretty much copied it right > off the smb.conf man page) > > #!/bin/sh > /bin/df -k $1 | tail -1 | awk '{print $2" "$4}' > > > In smb.conf, I included this line: > > dfree command = /usr/local/admin/samba-2.2.4/bin/dfree > > This dfree command is root owned, root writeable only script. > > Whenever I double-click on the Samba share on Windows clients, I get > these error messages in samba log: > > [2002/06/14 17:26:50, 0] smbd/dfree.c:disk_free(118) > disk_free: sys_popen() failed for command > /usr/local/admin/samba-2.2.4/bin/dfree .. Error was : No child processes > [2002/06/14 17:26:50, 0] smbd/dfree.c:disk_free(118) > disk_free: sys_popen() failed for command > /usr/local/admin/samba-2.2.4/bin/dfree .. Error was : No child processes > > Am I missing something? Could someone help out! > > System info: Solaris 7, Samba 2.2.4, Windows 2K clients. > > > Thanks, > Desmond >