Fedora 13 Webdav

Discussion in 'Server Operation' started by Nymus, Jul 23, 2010.

  1. Nymus

    Nymus New Member

    I am new to Linux but am determined to give myself a crash course :)
    I'd like to setup a Fedora box as a home server.
    - collect POP mail and serve it via IMAP to multiple clients
    - setup a WebDAV folder in order to share a sunbird calendar

    - host an itunes server
    - host a small website (php/mysql/apache)

    I've already setup fetchmail and dovecot so the mail issue is already dealt with.
    SSL is still something I need to tackle but as long as I keep the mailserver access only restricted to my LAN...

    I have apache up and running, and am currently tackeling webDAV.
    I've tried about everything there is to try but I am unable to get it to work.


    Above the howto I used...
    At current I have a webdav folder setup at /var/www/webdav (755, apache:apache)
    I have a users file at /etc/httpd/webdav.users.pwd (640, root:apache) using htpasswd

    My httpd.conf file is the one that came with apache (no changes made besides the ones needed for webdav)
    The modules mentioned in the above howto were already enabled.
    At the bottom of the file i added the following:

    NameVirtualHost *:80
    <VirtualHost *:80>
    ServerAdmin [email protected]
    DocumentRoot /var/www/webdav/
    ErrorLog /var/log/httpd/error_log
    ServerName localhost
    <Directory /var/www/webdav/>
    Options Indexes MultiViews
    AllowOverride None
    Order allow,deny
    Allow from all

    Alias /webdav /var/www/webdav

    <Location /webdav>
    DAV On
    AuthType Basic
    AuthName "webdav"
    AuthUserFile /etc/httpd/webdav.users.pwd
    Require valid-user

    Below a copy from the shell:

    [[email protected] confi]$ cadaver http://localhost/webdav/
    Authentication required for webdav on server 'localhost':
    Username: Tom
    dav:/webdav/> PUT /home/Tom/Documents/test.txt
    Uploading /home/Tom/Documents/test.txt to '/webdav/test.txt':
    Progress: [=============================>] 100.0% of 73 bytes failed:
    403 Forbidden

    As you can see I can't get it to work from the shell, nor does it work from my XP, Vista clients...
    Looks like a permission issue, but I can't get it to work.
    Even tried setting /var/www/webdav to 777 without any improvement.

    Locking directory is set at /var/lib/dav (default httpd.conf) (700, apache:apache)

    If other info is needed, please tell me and I will supply it...
  2. Nymus

    Nymus New Member


    Looks like I solved my own puzzle.
    Logging into my Fedora server again, I noticed some Notifications icon on the taskbar. I clicked it and it gave me a whole lot of SELinux notes...

    After some digging around, it looked like SELinux was blocking httpd from writing to the webDAV directory I had setup.

    I ran
    chcon -R -t httpd_sys_content_rw_t /var/www/webdav

    And...all looks fine now.

    While publishing a calendar with Sunbird/Lightning the progress bar doesn't show the publishing progress at all. So I just let it do its thing for a while and then close it. Checking the directory, it actually contains the ICS file and I am able to add it as a network calendar!

    The progress issue should be a Sunbird one so case closed for the webDAV issue...
    Hope the above helps some *NIX newbies like me :)

Share This Page