1 <samba:parameter name="dfree command"
4 advanced="1" developer="1"
5 xmlns:samba="http://samba.org/common">
8 <para>The <parameter moreinfo="none">dfree command</parameter> setting
9 should only be used on systems where a problem occurs with the
10 internal disk space calculations. This has been known to happen
11 with Ultrix, but may occur with other operating systems. The
12 symptom that was seen was an error of "Abort Retry
13 Ignore" at the end of each directory listing.</para>
15 <para>This setting allows the replacement of the internal routines to
16 calculate the total disk space and amount available with an external
17 routine. The example below gives a possible script that might fulfill
20 <para>The external program will be passed a single parameter indicating
21 a directory in the filesystem being queried. This will typically consist
22 of the string <filename moreinfo="none">./</filename>. The script should return two
23 integers in ASCII. The first should be the total disk space in blocks,
24 and the second should be the number of available blocks. An optional
25 third return value can give the block size in bytes. The default
26 blocksize is 1024 bytes.</para>
28 <para>Note: Your script should <emphasis>NOT</emphasis> be setuid or
29 setgid and should be owned by (and writeable only by) root!</para>
31 <para>Where the script dfree (which must be made executable) could be:</para>
33 <para><programlisting format="linespecific">
35 df $1 | tail -1 | awk '{print $2" "$4}'
36 </programlisting></para>
38 <para>or perhaps (on Sys V based systems):</para>
40 <para><programlisting format="linespecific">
42 /usr/bin/df -k $1 | tail -1 | awk '{print $3" "$5}'
43 </programlisting></para>
45 <para>Note that you may have to replace the command names with full path names on some systems.</para>
48 <value type="default"><comment>By default internal routines for
49 determining the disk capacity and remaining space will be used.</comment></value>
50 <value type="example">/usr/local/samba/bin/dfree</value>