Monday, September 19, 2011

davfs2 and filenames with spaces

One of the tricks in using Alfresco, Apache, Gallery, or Knowledgetree
is mounting their webdav access as part of the Linux file system. One
of the problems with Alfresco is that, by default, it has a space in
its filename path (i.e., "User Homes"). There are two ways around
this:

1) Write a proxy in Apache. Covered elsewhere and is a lot of extra work.

2) Delimit the space(s) in the path. After experimenting with percent
codes and leading the space(s) with a backslash (which didn't work), I
consulted the man page for fstab (yeah, I know...). The proper way to
indicate spaces in paths in fstab is to convert them to "40" so that

http://192.168.2.177:8080/alfresco/webdav/User Homes/tim

ends up looking like

http://192.168.2.177:8080/alfresco/webdav/User40Homes/tim

There appears to be one drawback to using Alfresco's WebDAV interface: Alfresco needs to be started before attempting to mount WebDAV.  Since it takes a few minutes for Alfresco to start, mounting WebDAV can't be part of the boot sequence.