SELinux, contexts, restorecon, chcon

This is a discussion on SELinux, contexts, restorecon, chcon within the Linux Security forums, part of the System Security and Security Related category; I wonder if someone can give me some pointers regarding the following problem: I am running RHEL4 x86_64 on a ...


Go Back   Usenet Forums > System Security and Security Related > Linux Security

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 12-28-2005
FEEB
 
Posts: n/a
Default SELinux, contexts, restorecon, chcon

I wonder if someone can give me some pointers regarding the following problem:

I am running RHEL4 x86_64 on a Quad Opteron HW.

I have the following in
/etc/selinux/targeted/contexts/files/file_contexts:

/etc/httpd -d system_u:object_r:httpd_config_t
/etc/httpd/conf.* system_u:object_r:httpd_config_t

Yet, after I created '/etc/httpd/conf/ssl' and some subdirectories thereof and they were
assigned user 'root:', running 'restorecon -R -v /etc/httpd/conf' does not restore the correct
user 'system_u:'. I actually have to do 'chcon' to force the user attributes.

WHY?

Thanks



<feeb@chem.utoronto.ca>




Reply With Quote
  #2 (permalink)  
Old 12-30-2005
FEEB
 
Posts: n/a
Default Re: SELinux, contexts, restorecon, chcon

On Wed, 28 Dec 2005 09:45:11 -0500 (EST), FEEB wrote:

>I wonder if someone can give me some pointers regarding the following problem:
>
>I am running RHEL4 x86_64 on a Quad Opteron HW.
>
>I have the following in
>/etc/selinux/targeted/contexts/files/file_contexts:
>
>/etc/httpd -d system_u:object_r:httpd_config_t
>/etc/httpd/conf.* system_u:object_r:httpd_config_t
>
>Yet, after I created '/etc/httpd/conf/ssl' and some subdirectories thereof and they were
>assigned user 'root:', running 'restorecon -R -v /etc/httpd/conf' does not restore the correct
>user 'system_u:'. I actually have to do 'chcon' to force the user attributes.
>
>WHY?



Just for the record:

one has to use 'restorecon -R -F -v' to change the user attributes. Option '-F' is not
documented in man pages.



<feeb@chem.utoronto.ca>




Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 09:00 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0