LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Closed Thread
 
LinkBack Search this Thread
Old 06-07-2012, 03:09 AM   #1
parthipan
LQ Newbie
 
Registered: May 2012
Posts: 11

Rep: Reputation: Disabled
what do selinux can't apply partial context to unlabeled file /usr/local/nagios/sbin/


Instead of disabling SELinux or setting it to permissive mode, you can use the following command to run the CGIs under SELinux enforcing/targeted mode:

[root@localhost ~]# chcon -R -t httpd_sys_content_t /usr/local/nagios/sbin/

chcon: can't apply partial context to unlabeled file /usr/local/nagios/sbin/

how to solve this problem?

when i provide
Code:
[root@localhost ~]# getenforce
Disabled
[root@localhost ~]# setenforce 0
setenforce: SELinux is disabled
i tried in many ways
Code:
[root@localhost ~]# cd /usr/local/nagios/sbin
[root@localhost sbin]# ls -Z
-rwxrwxr-x  nagios nagios                                  avail.cgi
-rwxrwxr-x  nagios nagios                                  cmd.cgi
-rwxrwxr-x  nagios nagios                                  config.cgi
-rwxrwxr-x  nagios nagios                                  extinfo.cgi
-rwxrwxr-x  nagios nagios                                  histogram.cgi
-rwxrwxr-x  nagios nagios                                  history.cgi
-rwxrwxr-x  nagios nagios                                  notifications.cgi
-rwxrwxr-x  nagios nagios                                  outages.cgi
-rwxrwxr-x  nagios nagios                                  showlog.cgi
-rwxrwxr-x  nagios nagios                                  status.cgi
-rwxrwxr-x  nagios nagios                                  statusmap.cgi
-rwxrwxr-x  nagios nagios                                  statuswml.cgi
-rwxrwxr-x  nagios nagios                                  statuswrl.cgi
-rwxrwxr-x  nagios nagios                                  summary.cgi
-rwxrwxr-x  nagios nagios                                  tac.cgi
-rwxrwxr-x  nagios nagios                                  trends.cgi
[root@localhost sbin]# chcon -t httpd_sys_script_exec_t *.cgi
chcon: can't apply partial context to unlabeled file avail.cgi
chcon: can't apply partial context to unlabeled file cmd.cgi
chcon: can't apply partial context to unlabeled file config.cgi
chcon: can't apply partial context to unlabeled file extinfo.cgi
chcon: can't apply partial context to unlabeled file histogram.cgi
chcon: can't apply partial context to unlabeled file history.cgi
chcon: can't apply partial context to unlabeled file notifications.cgi
chcon: can't apply partial context to unlabeled file outages.cgi
chcon: can't apply partial context to unlabeled file showlog.cgi
chcon: can't apply partial context to unlabeled file status.cgi
chcon: can't apply partial context to unlabeled file statusmap.cgi
chcon: can't apply partial context to unlabeled file statuswml.cgi
chcon: can't apply partial context to unlabeled file statuswrl.cgi
chcon: can't apply partial context to unlabeled file summary.cgi
chcon: can't apply partial context to unlabeled file tac.cgi
chcon: can't apply partial context to unlabeled file trends.cgi
[root@localhost sbin]# ls -Z
-rwxrwxr-x  nagios nagios                                  avail.cgi
-rwxrwxr-x  nagios nagios                                  cmd.cgi
-rwxrwxr-x  nagios nagios                                  config.cgi
-rwxrwxr-x  nagios nagios                                  extinfo.cgi
-rwxrwxr-x  nagios nagios                                  histogram.cgi
-rwxrwxr-x  nagios nagios                                  history.cgi
-rwxrwxr-x  nagios nagios                                  notifications.cgi
-rwxrwxr-x  nagios nagios                                  outages.cgi
-rwxrwxr-x  nagios nagios                                  showlog.cgi
-rwxrwxr-x  nagios nagios                                  status.cgi
-rwxrwxr-x  nagios nagios                                  statusmap.cgi
-rwxrwxr-x  nagios nagios                                  statuswml.cgi
-rwxrwxr-x  nagios nagios                                  statuswrl.cgi
-rwxrwxr-x  nagios nagios                                  summary.cgi
-rwxrwxr-x  nagios nagios                                  tac.cgi
-rwxrwxr-x  nagios nagios                                  trends.cgi
[root@localhost sbin]# 
[root@localhost sbin]# 
[root@localhost sbin]# 
[root@localhost sbin]# chcon -t httpd_sys_script_exec_t *.cgi
chcon: can't apply partial context to unlabeled file avail.cgi
chcon: can't apply partial context to unlabeled file cmd.cgi
chcon: can't apply partial context to unlabeled file config.cgi
chcon: can't apply partial context to unlabeled file extinfo.cgi
chcon: can't apply partial context to unlabeled file histogram.cgi
chcon: can't apply partial context to unlabeled file history.cgi
chcon: can't apply partial context to unlabeled file notifications.cgi
chcon: can't apply partial context to unlabeled file outages.cgi
chcon: can't apply partial context to unlabeled file showlog.cgi
chcon: can't apply partial context to unlabeled file status.cgi
chcon: can't apply partial context to unlabeled file statusmap.cgi
chcon: can't apply partial context to unlabeled file statuswml.cgi
chcon: can't apply partial context to unlabeled file statuswrl.cgi
chcon: can't apply partial context to unlabeled file summary.cgi
chcon: can't apply partial context to unlabeled file tac.cgi
chcon: can't apply partial context to unlabeled file trends.cgi
[root@localhost sbin]#
 
Old 06-07-2012, 01:36 PM   #2
colucix
Moderator
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,368

Rep: Reputation: 1910Reputation: 1910Reputation: 1910Reputation: 1910Reputation: 1910Reputation: 1910Reputation: 1910Reputation: 1910Reputation: 1910Reputation: 1910Reputation: 1910
Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread is being closed because it is a duplicate. Discussion will take place here: http://www.linuxquestions.org/questi...s-sbin-948967/
 
  


Closed Thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ould not create external command file '/usr/local/nagios/var/rw/nagios.cmd gerard.zapata Linux - Newbie 2 09-14-2012 01:57 PM
what do selinux can't apply partial context to unlabeled file /usr/local/nagios/sbin/ parthipan Linux - Server 3 06-07-2012 07:15 AM
making files available in /usr/local/bin and /usr/sbin reakinator Linux - Newbie 1 10-14-2006 05:09 PM
chcon: can't apply partial context to unlabeled file... DevNRG Linux - General 7 10-12-2005 04:01 PM


All times are GMT -5. The time now is 07:52 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration