Re: File Labeling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 06/23/2011 04:21 AM, Moray Henderson wrote:
> Ted Toth wrote:
>> On Wed, Jun 22, 2011 at 5:24 PM, mantaray_1 <mantaray_1@xxxxxxx> wrote:
>>> Hi all,
>>>
>>> I have a directory which is set to label its contents with a
>> particular
>>> label, and I have a file within this directory that is set to receive
>> a
>>> different label.  If this file is deleted, and a new file with the
>> same
>>> 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,
>>> Ken.
>>>
>>
>> Not unless the creating app calls setfscreatecon with the context
>> you'd like them to be prior to creating the file.
>>
>> Ted
> 
> You can relabel the file itself after creation: "restorecon <filename>" or
> have restorecond watch for the file's creation.  See "man restorecond".
> 
> 
> Moray.
> ?To err is human; to purr, feline.?
> 
> 
> 
> 
> --
> selinux mailing list
> selinux@xxxxxxxxxxxxxxxxxxxxxxx
> https://admin.fedoraproject.org/mailman/listinfo/selinux

Read

http://danwalsh.livejournal.com/43170.html
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iEYEARECAAYFAk4DN40ACgkQrlYvE4MpobN39ACeMSkygACrLrgiltYYegdGd/ss
yQ8AoLhxftioEcavlaJBAUWXL60702H/
=nwZJ
-----END PGP SIGNATURE-----
--
selinux mailing list
selinux@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/selinux


[Index of Archives]     [Fedora Users]     [Fedora Desktop]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Campsites]     [KDE Users]     [Gnome Users]

  Powered by Linux