TooMuchApplePie

Q: How to setup WebDAV file sharing in OS X Server

Hi,

 

really struggling to get this working. Running

 

El Capitan 10.11.5

OS X Server 5.1.1

 

Trying to connect from windows 7 client via this URL

  http://mac-server-hostname/webdav/ipads

I get "server uses an invalid security certificate."

I add an exception and get redirected to https://...

type in username ipads and the password

Then I get "webpage cannot be found" and I can see 404 error in apache logs so it is authenticating.

 

I'm just using local accounts (not got open directory running) on the mac

 

All I've done in OS X server is turn on Caching, File Sharing and Websites

 

I've got a user account ipads

I've also added a shared folder called ipads at

  /Users/Shared/ipads

which is read write Everyone with WebDav access ticked in the server:

 

ls -l /Users/Shared

drwxrwxrwx@ 3 Admin  wheel  102 12 Jul 14:01 ipads

ls -l /Users/Shared/ipads/

-rw-r--r--@ 1 Admin  wheel  10 12 Jul 14:01 test.txt

 

Not sure how to troubleshoot this further?

 

Could I simplify things e.g. just use http not https ? Or change digest authentication to basic / turn off.

 

This is not out on the internet. We are on private LAN, mainly windows 7 PCs joined to a microsoft

active directory domain, one mac mini and lots of ipads.

 

My aim is to allow ipads to upload e.g. via WebDAV Nav app to our mac mini.

 

Thanks

iPad Mini, iOS 9.3.2

Posted on Jul 12, 2016 7:26 AM

Close

Q: How to setup WebDAV file sharing in OS X Server

  • All replies
  • Helpful answers

  • by John Lockwood,

    John Lockwood John Lockwood Jul 12, 2016 8:11 AM in response to TooMuchApplePie
    Level 6 (9,215 points)
    Servers Enterprise
    Jul 12, 2016 8:11 AM in response to TooMuchApplePie

    Have you tried using an iPad?

     

    I have had problems with Macs, Apple seem to have done something strange with their WebDav setup and based on their marketing only intend this to be used by iOS clients which is semi logical even if not always accurate.

  • by TooMuchApplePie,

    TooMuchApplePie TooMuchApplePie Jul 13, 2016 1:33 AM in response to John Lockwood
    Level 1 (8 points)
    Servers Enterprise
    Jul 13, 2016 1:33 AM in response to John Lockwood

    Mmm no joy on ipad either.

     

    Just wondering if the "File Sharing" under OS X server is different from the

    "File Sharing" under the Sharing of system preferences ? I have both switched on.

     

    Also the latter says "Computers on your local network can access your computer at: mac1.local"

     

    Whereas I'm using mac1.domain.local

     

    I seem to remember reading something in a forum saying WebDAV won't work with local mac accounts but can't find any official "how to set up WebDAV" from apple :-(

     

    Maybe I need to join the Mac to our windows domain but not sure of the implications ?

  • by John Lockwood,

    John Lockwood John Lockwood Jul 13, 2016 2:07 AM in response to TooMuchApplePie
    Level 6 (9,215 points)
    Servers Enterprise
    Jul 13, 2016 2:07 AM in response to TooMuchApplePie

    FileSharing does not support WebDav and if you are using on the same computer Server.app you should not mess with the settings in Sharing.

     

    If WebDav requires network accounts - quite possible, then either you need to use Open Directory in Server.app to provide those, or you need to as you suggest join your Mac server to your Active Directory system.

     

    Note: Using .local for the Active Directory tree is a very bad idea. The .local domain is officially reserved for use by Bonjour aka. multicast DNS and you will have no end of problems with Macs and probably iOS devices if you use it for something else i.e. AD.

     

    As a further test before looking at using OD or AD, you could try using the IP address of the server e.g. http://192.168.1.1/webdav/ipad

  • by TooMuchApplePie,

    TooMuchApplePie TooMuchApplePie Jul 14, 2016 8:57 AM in response to John Lockwood
    Level 1 (8 points)
    Servers Enterprise
    Jul 14, 2016 8:57 AM in response to John Lockwood

    Thanks,

     

    I didn't set up the domain originally.

     

    Anyhow I've now joined the mac to the domain (microsoft active directory).

    Then for a clean start I:

    deleted all shares

    created new folder /Users/Shared/Work

    set permissions (chmod 777 Work)

    shared it out via OS X Server with access ticked for: iOS SMB AFP WebDav

    created test file in Work (also set permissions 777)

     

    from an ipad using webDav Nav app I connect to http://mac1.domain.local/webdav/Work

    I can see the test file but when I click on it I get error 403.

     

    Any ideas how to troubleshoot this further ?

    Not too up on apache but it seems to be using some kind of proxy ?

     

    Also found this article on switching to basic auth though it's for version 4 of server

    Set up WebDAV sharing for Active Directory accounts for OS X Server 4.1.5 and earlier - Apple Support

    May be worth a try ?

  • by John Lockwood,

    John Lockwood John Lockwood Jul 14, 2016 9:26 AM in response to TooMuchApplePie
    Level 6 (9,215 points)
    Servers Enterprise
    Jul 14, 2016 9:26 AM in response to TooMuchApplePie

    Apple's current implementation of WebDav still uses Apache but in a complex manner via a proxy. See this https://support.omnigroup.com/omnipresence-os-x-server/

     

    The 403 error is a permissions error. Whether this is meaning that the user you logged in via is not allowed access to that file, or the Apple server itself is having a permission problem I do not know. You could try using the admin login details. Have a look at the Apache logs on the Mac server in /var/log/apache2/

     

    The article you found refers to configuration files and entries which still exist on El Capitan and Server.app 5.1.5 so yes it is worth trying those changes. The advice to use https and certificate if you enable Basic is valid. Are you using a certificate?

     

    Longshot but make sure volumes and folders do not have a space in their names e.g Macintosh HD = bad. Don't use any aliases if needed use a symbolic link these are not the same thing.

  • by TooMuchApplePie,

    TooMuchApplePie TooMuchApplePie Jul 19, 2016 4:02 AM in response to John Lockwood
    Level 1 (8 points)
    Servers Enterprise
    Jul 19, 2016 4:02 AM in response to John Lockwood

    thanks, just got back to looking at this.

    Under mac1 I can see I have "Server HD"

    This is where all the applications,  library, system, user information and users folders are

    Can I safely rename this to remove the space e.g. ""ServerHD" without any side effects

    e.g. to my time machine backups ?

  • by John Lockwood,

    John Lockwood John Lockwood Jul 19, 2016 4:57 AM in response to TooMuchApplePie
    Level 6 (9,215 points)
    Servers Enterprise
    Jul 19, 2016 4:57 AM in response to TooMuchApplePie

    Yes it should not cause any issues although rebooting afterwards is not a bad idea, this will ensure all services restart and see the change.