Ted Toth wrote:
On Wed, Jun 22, 2011 at 5:24 PM, mantaray_1
> Hi all,
> I have a directory which is set to label its contents with a
> label, and I have a file within this directory that is set to receive
> different label. If this file is deleted, and a new file with the
> name is created, the new file receives the label from the parent
> directory instead of its correct label. If I relabel the filesystem,
> the file gets the correct label, but I would like to have it labeled
> correctly when it is created. Is this possible?
> Thanks in advance,
Not unless the creating app calls setfscreatecon with the context
you'd like them to be prior to creating the file.
You can relabel the file itself after creation: "restorecon <filename>" or
have restorecond watch for the file's creation. See "man restorecond".
To err is human; to purr, feline.