LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-30-2011, 02:47 PM   #1
alannerd
LQ Newbie
 
Registered: Jul 2005
Posts: 8

Rep: Reputation: 0
Accidently reset SELINUX context for /var folder permissions....HELP!?!?!?


Hello all,

I accidently reset the SELINUX context on the /var folder from "var_t" to user data. Now I cant go back and set it to "var_t" and i cant access my website anymore.

Any help for this newbie?

Thanks,

Alan
 
Old 01-30-2011, 03:13 PM   #2
zer0signal
Member
 
Registered: Oct 2010
Location: Cleveland
Distribution: Slackware, Fedora, RHEL (4,5), LFS 6.7, CentOS
Posts: 258

Rep: Reputation: 29
I am not very fluent with dealing with SEcurity Contexts, but you should be able to change it back to whatever it was with

chcon

info regarding using chcon

info chcon
 
Old 01-30-2011, 03:16 PM   #3
trist007
Senior Member
 
Registered: May 2008
Distribution: Slackware
Posts: 1,052

Rep: Reputation: 70
Try the restorecond command

http://linux.die.net/man/8/restorecond
 
1 members found this post helpful.
Old 01-30-2011, 04:18 PM   #4
ianll
LQ Newbie
 
Registered: Jan 2011
Posts: 18

Rep: Reputation: 2
Since you can't see your website, you probably won't mind rebooting your server.

I would recommend the following course of action - it's fully automatic:
Code:
setenforcing 0
touch /.autorelabel
reboot
Temporarily pasify SELinux - will allow your server to work, but without SELinux protection.

From the SELinux man page: "The best way to relabel the file system is to create the flag file /.autorelabel and reboot."

I hope this gets you out of difficulty.

Ian
 
  


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
[SOLVED] SElinux context for FTP smilemukul Linux - Newbie 3 09-23-2010 05:35 PM
/var/log/Xorg Permissions Reset During Re-Boot zcrxsir88 Linux - Security 1 01-28-2010 02:18 PM
SElinux context problem Bit-Devil Linux - Security 0 12-04-2009 06:58 PM
logrotate creates /var/log/messages with the wrong selinux context on RHEL5 smoyse Red Hat 3 03-30-2009 08:20 PM
invalid context in SELinux lothario Linux - Security 1 06-17-2005 04:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:22 AM.

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