Re: selinux issues -- for test system/httpd user access

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2020-04-14 at 14:01 -0400, bruce wrote:
> My use case:
>  To create a test local VM
>  To fire up httpd/mysql on the VM
>  To create a couple of test users on the VM
>  Create a test static website under /var/www/html/cat
>    using index.html
>          aa.php

Unless your virtual machine adds its own security problems, then you
shouldn't really have to do anything with SELinux to get it working. 
By default, appropriate SELinux contexts will be applied to files
written to or copied to /var/www/html (including all sub-directories). 
However, do NOT write files elsewhere, then move them into location.

Set up your installation with the default choices, don't mess around
with them.

Start off with a clean slate, then create your cat sub-directory, and
chown the "cat" directory to bob, make sure the owner file permissions
are readable, writeable, and executable (for directories).  Make sure
that the world-readable permissions are readable and executable, but
not writeable.  Generally speaking, the group permissions don't matter
for webserving.  And, in most cases, the default permissions applied to
file and directories will be the ones you need, anyway.  And, as bob
writes files inside the cat directory, they'll get the required
ownership and permissions by default, too.

e.g. drwx---r-x  (directories)
     -rw----r-x  (files)

Allow port 80 through your firewall.  And port 443, if you're doing
HTTPS.

-- 
 
uname -rsvp
Linux 3.10.0-1062.18.1.el7.x86_64 #1 SMP Tue Mar 17 23:49:17 UTC 2020 x86_64
 
Boilerplate:  All unexpected mail to my mailbox is automatically deleted.
I will only get to see the messages that are posted to the mailing list.
 
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx



[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux