LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 12-11-2008, 05:15 PM   #1
vinten
LQ Newbie
 
Registered: Dec 2008
Posts: 1

Rep: Reputation: 0
SELinux issue. (httpd & samba accessing same files and directories)


Hi all,

Intro:
Currently I have a server running with Fedora 9, that are severing as a Apache and file server.

The files are accessed by Samba in /mnt/storage - works great.

The Apache server is running fine in the standard directory. (/var/log/www)

Problem:
I have a web application that will need some files from /mnt/storage - but every time I try to access the files, then SELinux says it is denied.
Then I changed /mnt/storage to use httpd_sys_content_t and all it's sub-directories. Then I was able to access the files, but now my Samba shares do not work since /mnt/storage is not samba_share_t.

I have now searched the entire web and when there where only a few left I found a website telling that I could add a second context to /mnt/storage with
/usr/sbin/semanage fcontext -a -t httpd_sys_content_t /mnt/storage

But even though I have tried to add it then I am still not able to access the files.

Can anyone help me?

Thank you in advance,
Jan Vinten
 
Old 12-12-2008, 01:17 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3598Reputation: 3598Reputation: 3598Reputation: 3598Reputation: 3598Reputation: 3598Reputation: 3598Reputation: 3598Reputation: 3598Reputation: 3598Reputation: 3598
Hello and welcome to LQ, hope you like it here.

What I'd do is restore the settings on /mnt/storage to original state, then let it generate an error (see /var/log/audit/audit.log) and a report for that error with "audit2allow" and post it here (in BB code tags). Then add a second context and repeat reporting and posting. Those reports might give us some clues.
 
Old 01-08-2009, 11:40 AM   #3
lylemwood
Member
 
Registered: Jan 2008
Location: Toronto, Canada
Distribution: Slackware, CentOS
Posts: 47

Rep: Reputation: 18
Hi Jan,

I 2nd unSpawn's suggestion. SELinux's effects are sometimes hard to guess at. Sometimes it gets rubbed the wrong way and goes a little berzerk.

Please give us any lines of SELinux config that have to do with the actual issue at hand AND any error log info available.

Thanks,

Lyle
 
  


Reply


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Samba and SELinux issue on a Fedora 9 box. algogeek Linux - Server 9 09-07-2008 02:01 PM
users accessing directories,files using php scripts ckob Linux - Security 3 03-14-2008 09:06 AM
Accessing files/directories using konqueror keirvt Linux - Desktop 1 05-05-2007 06:56 PM
accessing files and directories windows XP-Mandrake 10.1 Micik Linux - Networking 1 06-12-2006 12:00 PM
accessing files & directories - a really simple question hildog Linux - Newbie 6 10-12-2003 07:17 PM

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

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