Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

phptail and selinux? #5

Open
GoogleCodeExporter opened this issue Apr 6, 2015 · 3 comments
Open

phptail and selinux? #5

GoogleCodeExporter opened this issue Apr 6, 2015 · 3 comments

Comments

@GoogleCodeExporter
Copy link

SELINUX enabled doesn't work

with default selinux context
-rw-r--r--. root root unconfined_u:object_r:httpd_log_t:s0 access_log
the script doesnt work.

if change the context 
chcon -t httpd_sys_content_t /var/log/httpd/access_log
it doesn't work too.

if I disable selinux it works.

I know perhaps it is not the forum to get this question, but perhaps some 
people have same issues.

Suggestions (other than disable selinux)?

Original issue reported on code.google.com by vazro...@gmail.com on 13 Jul 2012 at 9:02

@GoogleCodeExporter
Copy link
Author

I have been able to do a workaround regarding this mentioned issue.
Perhaps some security guy will have some comments about it.

Stop apache
   #service httpd stop

move the log files to a destination folder with apache access
   #mv /var/log/httpd /var/www/html

create a symbolic link to this folder (it allows not to reconfigure the apache 
conf files)
   #ln -s /var/www/html/httpd /var/log/httpd

change the selinux context to the symbolic link
   #chcon -h unconfined_u:object_r:httpd_log_t:s0 /var/log/httpd

change the owner to the log folder
   #chown -R apache:apache /var/log/httpd

change the context to the logs folder
   #chcon -R unconfined_u:object_r:httpd_sys_content_t:s0 /var/www/html/httpd

restart apache
   #service httpd start

this will allow PHPTail to read the logs.

Original comment by vazro...@gmail.com on 13 Jul 2012 at 10:56

@GoogleCodeExporter
Copy link
Author

Did this fix the issue for you? 

Original comment by Peeter.T...@gmail.com on 17 Jul 2012 at 7:27

@GoogleCodeExporter
Copy link
Author

Yes, it is working.
CentOS 6.

Original comment by vazro...@gmail.com on 17 Jul 2012 at 9:45

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant