Warning: include() [function.include]: URL file-access is disabled in the server configuration in /home/.showoff/linuxfaqs/linux-faqs.com/HOWTO/Apache-WebDAV-LDAP-HOWTO/x383.php on line 35

Warning: include(http://www.linux-faqs.com/HOWTO/header.inc) [function.include]: failed to open stream: no suitable wrapper could be found in /home/.showoff/linuxfaqs/linux-faqs.com/HOWTO/Apache-WebDAV-LDAP-HOWTO/x383.php on line 35

Warning: include() [function.include]: Failed opening 'http://www.linux-faqs.com/HOWTO/header.inc' for inclusion (include_path='.:/usr/local/php5/lib/php:/usr/local/lib/php') in /home/.showoff/linuxfaqs/linux-faqs.com/HOWTO/Apache-WebDAV-LDAP-HOWTO/x383.php on line 35

Warning: include() [function.include]: URL file-access is disabled in the server configuration in /home/.showoff/linuxfaqs/linux-faqs.com/HOWTO/Apache-WebDAV-LDAP-HOWTO/x383.php on line 36

Warning: include(http://www.linux-faqs.com/HOWTO/header.bottom.inc) [function.include]: failed to open stream: no suitable wrapper could be found in /home/.showoff/linuxfaqs/linux-faqs.com/HOWTO/Apache-WebDAV-LDAP-HOWTO/x383.php on line 36

Warning: include() [function.include]: Failed opening 'http://www.linux-faqs.com/HOWTO/header.bottom.inc' for inclusion (include_path='.:/usr/local/php5/lib/php:/usr/local/lib/php') in /home/.showoff/linuxfaqs/linux-faqs.com/HOWTO/Apache-WebDAV-LDAP-HOWTO/x383.php on line 36
 
FAQS
» Advanced Routing & Traffic Control
» General FAQ
» Squid Proxy Server
» Sendmail
» Fetchmail
» Postfix
» Connecting Mobile Phone
» Paging from Linux
» Standard Commands
» Some common terms
HOW-TOs
» ADSL Bandwidth Management
» Compile Apache
» Make a Bootdis
» Linux-Windows9x-Grub
» Linux-Windows
» Linux Crash Recovery
» Optimise Squid
» Block websites in Squid
» broadcast webcam in linux
» Compile RedHat Linux kernel
» Implement Firewall Security
» Increase Harddrive Performance
» Mount NTFS filesystem
» Patch / rebuild SRPM
» Secure Linux
» Set up a DHCP Server
» Set up an FTP server
» Set up Linux as a Router
» Use Cron
Miscellaneous
» All Ports
» Hardware Guides
» Hardware Review Guides
» Fav Troubleshooting forums
» Spammers fetch email addresses
» Mounting NTFS in linux


 

5. WebDAV server management

In this section we will discuss about the various management task - e.g. using LDAP for access control, and working with DAV method on Apache

Most of the configuration changes for the DAV will have to done using the httpd.conf file. This file is located at /usr/local/apache/conf/httpd.conf

httpd.conf is a text based configuration file that Apache uses. It can b editted using any text editor - I preffer using vi. Please make backup copy of this file, before changing it.

After making changes to the httpd.conf the Apache server has to be restarted using the /usr/local/apache/bin/apachectl restart command. However before restarting you test for the validity of the httpd.conf by using the /usr/local/apache/bin/apachectl configtest comand.

5.1. Restricting access to DAV shares

In the previous section when we created the DAVtest share, we used the LDAP for authentication purposes. However anyone who can authenticates using their LDAP useri/passwd will be able to access that folder.

Using the require directive in the httpd.conf file, we can limit access to certain individuals or groups of individuals.

If we look at the DAVtest configuration from the previosu section:

  <Directory /usr/local/apache/htdocs/DAVtest>
  Dav On
  #Options Indexes FollowSymLinks

  AllowOverride None
  order allow,deny
  allow from all
  AuthName "LDAP_userid_password_required"
  AuthType Basic
  <Limit GET PUT POST DELETE PROPFIND PROPPATCH MKCOL COPY MOVE LOCK UNLOCK>
  Require valid-user
  </Limit>
  LDAP_Server ldap.server.com
  LDAP_Port 389
  Base_DN "o=ROOT"

  UID_Attr uid
  </Directory>
We see that the require is set to valid-user . Which means any valid authenticated user has access to this folder.

5.1.1. Restricting access based on Individual UID(s)

LDAP UID can be used to restrict access to DAV folder.

require valid-user directive can be changed to require user 334455 445566

This will restrict access to individuals with UID 334455 and 445566. Anyone else will not be able to access this folder.

5.1.2. Restricting access based on groups of individuals.

require can also be used to restrict access to groups of individuals. This can be either done using LDAP groups or LDAP filters. The filter must be valid LDAP filter syntax.

5.2. Restricting write access to DAV shares

It maybe be required that the editting for the resources on the DAV shares be restricted to certain individual, however anyone can view the resources. This can be easily done using the <Limit> tags in the httpd.conf file


  <Directory /usr/local/apache/htdocs/DAVtest>
  Dav On
  #Options Indexes FollowSymLinks

  AllowOverride None
  order allow,deny
  allow from all
  AuthName "LDAP_userid_password_required"
  AuthType Basic
  <Limit GET PUT POST DELETE PROPFIND PROPPATCH MKCOL COPY MOVE LOCK UNLOCK>
  Require valid-user
  </Limit>
  LDAP_Server ldap.server.com
  LDAP_Port 389
  Base_DN "o=ROOT"

  UID_Attr uid
  </Directory>

You restrict write access to certain individuals by changing the <limit> to

  <Limit PUT POST DELETE PROPPATCH MKCOL COPY MOVE LOCK UNLOCK>
  Require 334455
  </Limit>

Basically we are limiting the PUT POST DELETE PROPPATH MKCOL COPY MOVE LOCK and UNLOCK to an individual who has the UID of 334455. Everone else will be able to use the methods GET and PROPFIND on the resources, but not any other method.


 
Warning: include() [function.include]: URL file-access is disabled in the server configuration in /home/.showoff/linuxfaqs/linux-faqs.com/HOWTO/Apache-WebDAV-LDAP-HOWTO/x383.php on line 353

Warning: include(http://www.linux-faqs.com/HOWTO/body.right.inc) [function.include]: failed to open stream: no suitable wrapper could be found in /home/.showoff/linuxfaqs/linux-faqs.com/HOWTO/Apache-WebDAV-LDAP-HOWTO/x383.php on line 353

Warning: include() [function.include]: Failed opening 'http://www.linux-faqs.com/HOWTO/body.right.inc' for inclusion (include_path='.:/usr/local/php5/lib/php:/usr/local/lib/php') in /home/.showoff/linuxfaqs/linux-faqs.com/HOWTO/Apache-WebDAV-LDAP-HOWTO/x383.php on line 353


 

Warning: include() [function.include]: URL file-access is disabled in the server configuration in /home/.showoff/linuxfaqs/linux-faqs.com/HOWTO/Apache-WebDAV-LDAP-HOWTO/x383.php on line 358

Warning: include(http://www.linux-faqs.com/HOWTO/footer.inc) [function.include]: failed to open stream: no suitable wrapper could be found in /home/.showoff/linuxfaqs/linux-faqs.com/HOWTO/Apache-WebDAV-LDAP-HOWTO/x383.php on line 358

Warning: include() [function.include]: Failed opening 'http://www.linux-faqs.com/HOWTO/footer.inc' for inclusion (include_path='.:/usr/local/php5/lib/php:/usr/local/lib/php') in /home/.showoff/linuxfaqs/linux-faqs.com/HOWTO/Apache-WebDAV-LDAP-HOWTO/x383.php on line 358