haiwen / seafile

High performance file syncing and sharing, with also Markdown WYSIWYG editing, Wiki, file label and other knowledge management features.
http://seafile.com/
Other
12.25k stars 1.54k forks source link

WebDAV not working when Seafile is compiled from source #491

Closed clayauld closed 8 years ago

clayauld commented 10 years ago

I compiled Seafile from source on an UDOO Quad developer board. The UDOO specs are found on the site udoo.com. I am running Ubuntu 12.04.3 LTS. I am not running apache or nginx.

controller.log is showing everything is coming up correctly, except it is saying this:

seafile-controller.c<563>: seafdav not enabled.

The config file for seafdav is as follows:

[WEBDAV]

# Default is false. Change it to true to enable SeafDAV server.
enabled = true

port = 8648

# Change the value of fastcgi to true if fastcgi is to be used
fastcgi = false

# If you deploy seafdav behind nginx/apache, you need to modify "share_name".
share_name = /
matthid commented 10 years ago

I had the same problem and fixed it with the patch below. However after this change you will probably run into issue #519

--- controller/seafile-controller.c 2014-01-16 19:56:24.183523103 +0100
+++ controller/seafile-controller.c 2014-01-16 19:55:57.123523652 +0100
@@ -281,7 +281,7 @@
     tmp = g_path_get_dirname (bin_dir);
     installpath = g_path_get_dirname (tmp);

-    topdir = g_path_get_dirname (installpath);
+    //   topdir = g_path_get_dirname (installpath);

     g_free (exectuble);
     g_free (tmp);
@@ -643,6 +643,7 @@
         return -1;
     }

+    topdir = g_path_get_dirname(config_dir);
     ctl->client = ccnet_client_new ();
     ctl->sync_client = ccnet_client_new ();

@@ -657,14 +658,14 @@
     }

     if (logdir == NULL) {
-        char *topdir = g_path_get_dirname(config_dir);
+        //char *topdir = g_path_get_dirname(config_dir);
         logdir = g_build_filename (topdir, "logs", NULL);
         if (checkdir_with_mkdir(logdir) < 0) {
             fprintf (stderr, "failed to create log folder \"%s\": %s\n",
                      logdir, strerror(errno));
             return -1;
         }
-        g_free (topdir);
+        //g_free (topdir);
     }

     ctl->config_dir = config_dir;