Re: Apache directory access & Suse AppArmor

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

 



Eric,

I got most of what you described but there are still something unclear to me.
If I want the WHOLE directory /images to allow view by the OS (AppArmor) and deny view via the network by
every other network except net work 172.10.10.0/255.255.255.0 to read.   
Only allow network 172.10.10.0/255.255.255.0 to view or access.
What are the syntax look like?



Would this examples and steps work?


1. From Yast2 AppArmor
enable /srv/www/my-domain/images/ for read



2. From Appache configuration file, add the following lines:

  <Directory "/srv/www/my-domain/images/">
     Options None
     Order deny,allow
     Deny from all
     Allow from 172.10.10.0/255.255.255.0
  </Directory>





Thank you for helping clearing up my lack of understanding Apache2

Y










----- Original Message -----
From: "Eric Covener" <covener@xxxxxxxxx>
To: users@xxxxxxxxxxxxxxxx
Sent: Thursday, October 16, 2008 7:34:52 AM (GMT-0500) America/New_York
Subject: Re:  Apache directory access & Suse AppArmor

On Wed, Oct 15, 2008 at 8:52 AM, Yoom Nguyen <yoom@xxxxxxxxxxxxxx> wrote:
> Eric,
>
> It seems if I enable /srv/www/domainroot/images/* via AppArmor then
> I don't even need to declare <Directory "/images/"> in Apache configuration file.  Is this true?

It's true that making the files unreadable via the OS prevents Apache
from reading them.

>
>
> I assume apache2 will not allow something like this?
> <Directory "/images/">
>      Options None
>      Order deny,allow
>      Deny from all
>      Allow from 172.24.16.0/255.255.248.0
>      Allow from 172.21.160.0/255.255.254.0
>      Allow from 65.123.86.50
>      Allow from 172.25.15.20
>      Allow from 172.25.15.21
> </Directory>

You still have "/images/" instead of  "/srv/www/domainroot/images/" so
I suspect this stanza doesn't do anything.  You can use multiple Allow
directives.

They're largely irrelevant if you've configured the OS to not permit
Apache to read the files.

> How can I protect an directory without using AppArmor?
> Can you provide some example please.

http://httpd.apache.org/docs/2.2/sections.html
http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html

Your default config likely has examples.

-- 
Eric Covener
covener@xxxxxxxxx

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux