~]$ ls -Z /usr/sbin/httpd

Support for security such as Firewalls and securing linux
Post Reply
eswar.l16
Posts: 1
Joined: 2014/04/05 10:15:36

~]$ ls -Z /usr/sbin/httpd

Post by eswar.l16 » 2014/04/05 10:30:12

Hi There,


How to give write permission for httpd service run along with samba service. I was activated Samba without user permission, and installed, configured httpd service. i got 404 not found error.
I found that was a SElinux permission problem.Then i gave the below commands
chcon -t unconfined_exec_t /usr/sbin/httpd
ls -Z /usr/sbin/httpd
-rwxr-xr-x root root system_u:object_r:unconfined_exec_t:s0 /usr/sbin/httpd
restorecon -v /usr/sbin/httpd
restorecon reset /usr/sbin/httpd context system_u:object_r:unconfined_exec_t:s0->system_u:object_r:httpd_exec_t:s0

now i can open website on samba folder. But users unable to paste or write in that folder.

Please can anyone help for this issue

User avatar
TrevorH
Site Admin
Posts: 33218
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: ~]$ ls -Z /usr/sbin/httpd

Post by TrevorH » 2014/04/05 10:38:07

Changing the context of the httpd binary is not the correct solution. You should put that back to how it was before. If you want both httpd and samba to be able to read the files then you need to change the context of the files you want them to access to public_content_t and if you want them both to be able to read/write the files, then change their context to public_content_rw_t.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

Post Reply