Thank you for your clarification. How to modify current policy to add default context to some paths without using semanage fcontext -a? Where can I find sources of the policy I use? (I am using selinux-policy-targeted-3.7.19-195.el6_4.18.noarch) Regards, Hervé -----Message d'origine----- De : Bruno Wolff III [mailto:bruno@xxxxxxxx] Envoyé : lundi 18 novembre 2013 18:45 À : Vidalie Hervé Cc : selinux@xxxxxxxxxxxxxxxxxxxxxxx Objet : Re: priority between file context rules On Mon, Nov 18, 2013 at 15:22:08 +0100, Vidalie Hervé <herve.vidalie@xxxxxxxxxxxxx> wrote: > >I would like to set a default type on /WEBS and his subfolders: >semanage fcontext -a -t httpd_sys_content_t '/WEBS(/.*)?' >restorecon -Rv /WEBS* >However, this command sets the type httpd_sys_content_t recursively on >everything in /WEBS What is the priority between file context rules? I thought more precise rules will prevail on others. Note that the context files really just work when doing relabelling with restorecon or fixfiles. What gets applied when a new file is created is going to be governed by policy. (Though inheriting from the directory the file is being created in is the common default.) You can have rules based on the creating process' label, the label of the directory the file is being created in and in recent kernels (I am not sure if this is in RHEL6, but is in current Fedora) the name (no wildcards) of the file. Ce message et les pièces jointes sont confidentiels et réservés à l'usage exclusif de ses destinataires. Il peut également être protégé par le secret professionnel. Si vous recevez ce message par erreur, merci d'en avertir immédiatement l'expéditeur et de le détruire. L'intégrité du message ne pouvant être assurée sur Internet, la responsabilité de Worldline ne pourra être recherchée quant au contenu de ce message. Bien que les meilleurs efforts soient faits pour maintenir cette transmission exempte de tout virus, l'expéditeur ne donne aucune garantie à cet égard et sa responsabilité ne saurait être recherchée pour tout dommage résultant d'un virus transmis. This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Worldline liability cannot be triggered for the message content. Although the sender endeavours to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted. -- selinux mailing list selinux@xxxxxxxxxxxxxxxxxxxxxxx https://admin.fedoraproject.org/mailman/listinfo/selinux