LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 02-23-2016, 01:24 AM   #1
ZAMO
Member
 
Registered: Mar 2007
Distribution: Redhat &CentOS
Posts: 598

Rep: Reputation: 30
SELINUX content on top level directory


Hi ,

I have a RHEL 7 with selinux at enforcing mode.

when i create a new top level directory and run the semanage to set any content it is not working it . The content remains as default_t.

Code:
semanage fcontext -a -t samba_share_t "/mysamba(/.*)?"
restorecon -Rv mysamba

or
semanage fcontext -a -t public_content_t "/mysamba(/.*)?"
but the chcon -t works and on any new file created below it.. why ? any specific reasons or what I am missing when using semanage fcontext?
 
Old 02-23-2016, 01:35 AM   #2
ZAMO
Member
 
Registered: Mar 2007
Distribution: Redhat &CentOS
Posts: 598

Original Poster
Rep: Reputation: 30
Missing

restorecon -RvvF /mysamba worked .

I was missing teh option -F .
 
  


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
Configuring content filtering at network level.... lonewalker789 Linux - Networking 4 06-17-2015 02:32 PM
[SOLVED] SELinux: Security Level (s0) shows on some servers and not others dcarrington Linux - Security 6 08-22-2013 01:58 PM
[SOLVED] Is there another way to go to top level? computergirl121 Linux - Newbie 12 05-08-2013 11:19 PM
What are the top 5 OS's that offers SELinux? php111 Linux - Security 5 08-15-2011 04:47 PM
SELinux Security Level Configuration modernsaint Linux - Security 2 12-10-2007 01:21 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 07:01 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