[Samba] Samba dfree command not working

Keram Yasin keramyasina at gmail.com
Mon Sep 11 19:06:02 UTC 2023


Dear Rowland, Jeremy

I really appreciate your feedback. I just followed your recommendations and
the problem is gone. I still don't know the root cause of the problem. But
I will find it by myself. In the end, I wish you guys a wonderful day. Your
help is priceless. Thank you.

Best regards,
Keram Yasin

On Mon, Sep 11, 2023 at 6:51 PM Jeremy Allison via samba <
samba at lists.samba.org> wrote:

> On Mon, Sep 11, 2023 at 04:36:17PM +0100, Rowland Penny via samba wrote:
> >On Mon, 11 Sep 2023 16:45:51 +0200
> >Keram Yasin via samba <samba at lists.samba.org> wrote:
> >
> >> Dear Samba Team Member,
> >>
> >> I installed Samba on my server and It worked perfect so far. Now I
> >> wanted to use some advanced feature of samba like dfree option. I
> >> created a shell script named dfree according to the "dfree command
> >> (S)" section in the following url:
> >> https://www.samba.org/samba/docs/current/manhtml/smb.conf.5.html
> >>
> >> The content of the dfree command is as followings:
> >>
> >> STR=$(/usr/sbin/btrfs qgroup show -rF --raw "$1" | /usr/bin/tail -1)
> >> SIZE=$(/usr/bin/expr `/bin/echo $STR | /usr/bin/cut -d \  -f 4` /
> >> 1024) USED=$(/usr/bin/expr `/bin/echo $STR | /usr/bin/cut -d \  -f
> >> 2` / 1024) AVAIL=$(/usr/bin/expr $SIZE - $USED)
> >> /bin/echo $SIZE $AVAIL
> >>
> >> I set the shell script to be owned by nobody user and nobody group.
> >> The script also has chmod 777 enabled. The script is located at the
> >> following directory: /var/lib/samba/bin/dfree;
> >
> >If you read the manpage under 'dfree command (S)' it says:
> >
> >Note: Your script should NOT be setuid or setgid and should be owned by
> >(and writeable only by) root!
>
> Oh, Rowland is right of course :-).
>
> --
> To unsubscribe from this list go to the following URL and read the
> instructions:  https://lists.samba.org/mailman/options/samba
>


More information about the samba mailing list