Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 27 Aug 2009 12:34:23 -0700
From:      John W <jwdevel@gmail.com>
To:        Reko Turja <reko.turja@liukuma.net>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Can anyone reproduce this Samba problem?
Message-ID:  <fa8771800908271234m1fc22349he05623b275667426@mail.gmail.com>
In-Reply-To: <6DFAF6A1805D48FABE793388572490D5@rivendell>
References:  <fa8771800908262154m41a48d83o2cb563c279e3449e@mail.gmail.com> <6DFAF6A1805D48FABE793388572490D5@rivendell>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Aug 27, 2009 at 2:30 AM, Reko Turja<reko.turja@liukuma.net> wrote:
>> Interestingly, if I turn off 'inherit permissions', then 'inherit
>> owner' DOES take effect correctly. However, that means the sticky bit
>> does not get inherited, which will not work for me. I need both to be
>> inherited, and for some reason they are behaving mutually-exclusive
>> (with 'inherit permissions' taking precedence).
>
> If I understood your problem correctly, you don't actually want to set
> sticky bit on the root directory, but suid - so the chmod would be like
>
> chmod 4xxx mydir
>
> In FreeBSD suid-bitted directory will make all the subdirs to inherit the
> owner.
>
> Sticky bit causes bit different behaviour - see sticky (8) and chmod(1)

I want both the owner AND the sticky bit to be inherited. That is my dilemma.

The sticky bit is necessary in my case because I do not want anyone
but the owner to modify a file once created.
And further, I am setting the owner to 'nobody' so this means *no*
user can modify a file once created, not even files they themselves
created. That is exactly the point of this share I'm trying to create.
This directory will be open to many users, via a public share, with no
passwords.
I want everyone to be able to create new files/dirs in this share, but
I do not want anyone to be able to rename/delete/modify/overwrite/etc.
*any* files once created.

I am trying to avoid using SUIDDIR (see my email), though I realize
that is an option. If I cannot make Samba's 'inherit owner' option
work on FreeBSD, that may be my only choice. Regardless of that, I
would like to determine if this is a Samba bug or not, and which
versions are affected, if so.

However, even if I were to use SUIDDIR, I would still need the sticky
bit to prevent modifications to files.
Unless I am missing something, of course (:

-John



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?fa8771800908271234m1fc22349he05623b275667426>