Macros + Require constructs

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

 



I am trying to setup up a webdav serve. Each user is allocated a directory (%location) and an id (%user). In order to try and make this some what easier to administer I wrote the following macro

<Macro WebDavUser %location %user>
# %location

    Alias /%location /srv/webdav/data/%location

    <Directory /srv/webdav/data/%location>
        DAV On
        Options +Indexes +MultiViews +FollowSymLinks
IndexOptions -IconsAreLinks +NameWidth=* +FancyIndexing +FoldersFirst +HTMLTable
        IndexOrderDefault Ascending Name
        DirectoryIndex disabled
        AllowOverride None
        DavDepthInfinity on
        DavMinTimeout 600

        AuthType Digest
        AuthName "webdav"
        AuthDigestProvider socache file
        AuthUserFile /srv/webdav/auth.d/digest_pw
        AuthnCacheProvideFor file
        AuthnCacheTimeout 600
        AuthnCacheContext webdav

        Require user %user

    </Directory>

</Macro>

Users are added to a simple file which is included in the webdav config file.

        Use WebDavUser ProjectA  john
        Use WebDavUser ProjectB  kathleen
        Use WebDavUser ProjectC jack

This works quite nicely. However I am trying to work out how I can make this work when there is no specific user. For example if I were to provide a common area ("Common")

        Use WebDavUser Common ?

Would the following be secure enough, is there another "better" way of doing this?

        <RequireAny>
                 Require valid-user
                 Require user %user
         </RequireAny>




---------------------------------------------------------------------
To unsubscribe, e-mail: users-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