Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Using Fedora
FedoraForum Search

Forgot Password? Join Us!

Using Fedora General support for current versions. Ask questions about Fedora and it's software that do not belong in any other forum.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 18th January 2011, 03:47 PM
ViperStrike Offline
Registered User
 
Join Date: Aug 2008
Posts: 16
linuxfedorafirefox
SeLinux AVC Denial on svn's format file

Hello,

I'm running into some problems, and if there's anything I don't understand, it's selinux. I've installed Trac on my system, and hooked it to my SVN repository, but I keep getting AVC Denial messages whenever the Trac site is visited, saying httpd attempted getattr and read on /svn/main/format.

I'm assuming that the problem has something to do with this:

drwxrwxr-x. root svn unconfined_u:object_r:default_t:s0 svn

I'm guessing that I need to change the selinux properties there to something like system_u:object_r:??? - not sure what the last one would be.

Nor do I understand how to go about changing those. From what I've read it seems I have to use semanage to set the properties, and then restorecon to apply them?

Any assistance is appreciated.
Reply With Quote
  #2  
Old 18th January 2011, 04:30 PM
jpollard Online
Registered User
 
Join Date: Aug 2009
Location: Waldorf, Maryland
Posts: 6,102
linuxfedorafirefox
Re: SeLinux AVC Denial on svn's format file

Try "chcon -t httpd_sys_content_t <file>"

This is likely not the complete fix as I'm not familiar with Trac. If you use
a svn server then things may get simpler. But for simple file reading the
files (and directory) need to be type httpd_sys_content_t, and world read
access.

If apache is going to be updating files then it needs the files labelled
with type httpd_sys_rw_content_t, and the directories world rwx unless
they are owned by the apache login (in which case only owner rwx
needed). Any files created will be owned by apache.

As a warning, you may also need to tell SELinux how to restore labels
as necessary if a relabel is done. For testing, this isn't necessary.

The SELinux alerts will include the commands needed for everything
(including the restorecon support).
Reply With Quote
  #3  
Old 18th January 2011, 06:13 PM
lcamp Offline
Registered User
 
Join Date: Dec 2010
Posts: 21
linuxchrome
Re: SeLinux AVC Denial on svn's format file

If you can drop the audit log into a file, try:
Code:
audit2allow -M local < /tmp/avcs
where /tmp/avcs are the AVC Denial Audits of interest
Code:
checkmodule -M -m -o local.mod local.te
semodule_package -o local.pp -m local.mod
semodule -i local.pp
For more information
http://docs.fedoraproject.org/en-US/...l/SELinux_FAQ/
Reply With Quote
  #4  
Old 18th January 2011, 06:37 PM
szilagyic Offline
Registered User
 
Join Date: Aug 2008
Posts: 192
windows_7firefox
Re: SeLinux AVC Denial on svn's format file

Here's some additional info and overview of SELinux:

http://www.zdnet.co.uk/blogs/the-ope...fied-10020823/
Reply With Quote
  #5  
Old 18th January 2011, 08:41 PM
Smoking Tux's Avatar
Smoking Tux Online
Registered User
 
Join Date: Jan 2011
Location: /home
Posts: 267
linuxsafari
Re: SeLinux AVC Denial on svn's format file

In addition to lcamp's post, in general it's mostly very useful to see the output of:
Code:
# audit2allow -a
So you will recieve much more info about what was accoured.

Further you can install package 'setroubleshoot', which is annoy you, every time an error accours, with a popup. Its output is similar to the cmd above.

Last edited by Smoking Tux; 18th January 2011 at 08:45 PM. Reason: typo
Reply With Quote
  #6  
Old 18th January 2011, 10:57 PM
jpollard Online
Registered User
 
Join Date: Aug 2009
Location: Waldorf, Maryland
Posts: 6,102
linuxfedorafirefox
Re: SeLinux AVC Denial on svn's format file

In addition to having it popup with the error, is that you can more easily
see what was done at the moment the error was detected. Since this
can be a rather sizeable distance (event wise) between action and error,
it gives a better feel for what happens.
Reply With Quote
  #7  
Old 20th January 2011, 05:49 PM
ViperStrike Offline
Registered User
 
Join Date: Aug 2008
Posts: 16
windows_7chrome
Re: SeLinux AVC Denial on svn's format file

Thanks guys - jpollard's post is actually what ended up solving the issue. I had to go and change the type on several other files as well before it actually stopped complaining. Much obliged.
Reply With Quote
Reply

Tags
avc, denial, file, format, selinux, svn

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
SELinux AVC denial?! BrillianceLin Using Fedora 16 14th March 2009 07:54 PM
SELinux AVC Denial popey Using Fedora 2 27th January 2009 09:40 AM
SELinux AVC Denial willwoood Security and Privacy 5 10th December 2008 02:04 AM
SELinux AVC Denial metatron Alpha, Beta & Snapshots Discussions (Fedora 10 Only) 14 25th November 2008 03:54 PM
wine selinux denial cboy168 Gamers' Lounge 3 29th December 2007 08:07 PM


Current GMT-time: 07:48 (Tuesday, 21-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat