LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-07-2012, 09:45 PM   #1
zhaidoudou123
LQ Newbie
 
Registered: Jan 2012
Posts: 2

Rep: Reputation: Disabled
restorecon command not found


Hello
When I use "service iptables save", it always tells me "restorecon command not found"
And I type "/sbin/restorecon", it tells me the same too.
I'm using Centos 6.0 32bit
How can I do?
thx.
 
Old 01-07-2012, 10:42 PM   #2
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
@ Reply

Hi zhaidoudou123,

Is this happening with a fresh install? Or, this started happening after you made any changes? The reason I am asking because I am not able to find the link between restorecon and iptables.

Run the following command and paste the output:

1. service iptables save
2. tail /var/log/messages
3. ls -l /sbin/ | grep restore
 
Old 01-08-2012, 12:04 AM   #3
zhaidoudou123
LQ Newbie
 
Registered: Jan 2012
Posts: 2

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by T3RM1NVT0R View Post
Hi zhaidoudou123,

Is this happening with a fresh install? Or, this started happening after you made any changes? The reason I am asking because I am not able to find the link between restorecon and iptables.

Run the following command and paste the output:

1. service iptables save
2. tail /var/log/messages
3. ls -l /sbin/ | grep restore
Thank you for your reply.
Maybe my install is not complete,so I copied one from another computer,
Now it works, thank you.
 
Old 01-14-2012, 06:27 AM   #4
TheHoxxy
LQ Newbie
 
Registered: Jan 2012
Posts: 3

Rep: Reputation: Disabled
Hello

I have this problem on my VPS (CentOS 6 32bit).


1. service iptables save:
Code:
iptables: Saving firewall rules to /etc/sysconfig/iptables: /etc/init.d/iptables: line 268: restorecon: command not found
                                                           [FAILED]


2. tail /var/log/messages:
Code:
Jan 13 22:56:40 server xinetd[1439]: Exiting...
Jan 13 22:56:41 server kernel: Kernel logging (proc) stopped.
Jan 13 22:56:41 server rsyslogd: [origin software="rsyslogd" swVersion="4.6.2" x-pid="1413" x-info="http://www.rsyslog.com"] exiting on signal 15.
Jan 13 22:56:49 server kernel: imklog 4.6.2, log source = /proc/kmsg started.
Jan 13 22:56:49 server rsyslogd: [origin software="rsyslogd" swVersion="4.6.2" x-pid="1435" x-info="http://www.rsyslog.com"] (re)start
Jan 13 22:56:50 server xinetd[1461]: xinetd Version 2.3.14 started with libwrap loadavg labeled-networking options compiled in.
Jan 13 22:56:50 server xinetd[1461]: Started working: 0 available services
Jan 13 22:57:04 server saslauthd[1710]: detach_tty      : master pid is: 1710
Jan 13 22:57:04 server saslauthd[1710]: ipc_init        : listening on socket: /var/run/saslauthd/mux
Jan 14 03:36:02 server logrotate: ALERT exited abnormally with [1]

3. ls -l /sbin/ | grep restore
Code:
lrwxrwxrwx 1 root root     14 Jan  8 20:54 iptables-restore -> iptables-multi


How to fix it?
 
Old 01-14-2012, 06:46 AM   #5
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
Hi TheHoxxy,

The reason you getting that error message because you are misisng the restorecon file. Here is the out that I get when I run ls -l /sbin | grep restore

Code:
ls -l /sbin/ | grep restore
lrwxrwxrwx. 1 root root     15 Jul 31 05:43 ip6tables-restore -> ip6tables-multi
lrwxrwxrwx. 1 root root     14 Jul 31 05:42 iptables-restore -> iptables-multi
lrwxrwxrwx. 1 root root      8 Jul 31 05:48 restorecon -> setfiles
lrwxrwxrwx. 1 root root      3 Jul 31 05:49 vgcfgrestore -> lvm
restorecon is provided by policycoreutils package. You can try uninstalling and re-installing policycoreutils package and see if you get restorecon file under /sbin
 
1 members found this post helpful.
Old 01-14-2012, 06:50 AM   #6
TheHoxxy
LQ Newbie
 
Registered: Jan 2012
Posts: 3

Rep: Reputation: Disabled
Thank you T3RM1NVT0R, it works great now
 
Old 01-14-2012, 06:51 AM   #7
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
@ Reply

You're welcome. Enjoy linux!!!
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
setup command not found in Ubuntu 10.04 Command Prompt vinaytp Ubuntu 2 05-06-2010 01:10 PM
Shell: command not found / Runs fine with "Run command" badbunny Linux - Newbie 1 01-22-2007 01:21 AM
how do i make restorecon work on fc5 kobbee Linux - Kernel 6 09-14-2006 12:20 PM
bash: rpm: command not found && sudo: alien: command not found Java_Code Ubuntu 7 07-27-2006 11:57 PM
bash: <command name> command not found smash Programming 5 03-13-2006 08:48 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:48 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration