Seafile 6 can't deal with space in seafile data dir?

Hi, I recently upgraded from 5.1.4 to 6.0.4 and now seafile.sh no longer starts for me. At the console, I see this:

:~/haiwen$ sudo -u USER /home/USER/haiwen/seafile-server-latest/seafile.sh start

stat: cannot stat ‘/media/USER/My’: No such file or directory
stat: cannot stat ‘Book/seafile-data’: No such file or directory
Error: the user running the script ("USER") is not the owner of "/media/USER/My Book/seafile-data" folder, you should use the user "" to run the script.

My seafile.ini says:

/media/USER/Book/seafile-data

Where /media/USER/Book is a link to “/media/USER/My Book”

:~/haiwen$ ls -alF /media/USER
total 32
drwxr-xr-x+ 6 root root  4096 Feb 19  2016 ./
drwxr-xr-x  4 root root  4096 May  6  2014 ../
lrwxrwxrwx  1 root root     8 May  8  2014 Book -> My Book//
drwxrwxrwx  1 USER USER 12288 Apr  4 13:05 My Book/

That user does own the seafile data dir:

:~$ ls -alF /media/USER/Book/
total 168
drwxrwxrwx  1 USER USER 12288 Apr  4 13:05 ./
drwxr-xr-x+ 6 root root  4096 Feb 19  2016 ../
drwxrwxrwx  1 USER USER  4096 Feb 19  2016 seafile-data/

The seafile.init.log shows the same error:

:~/haiwen/logs$ cat seafile.init.log

 About to perform start for seafile at 2016-09-27T10:36:15-0400 

Error: the user running the script ("USER") is not the owner of "/media/USER/My Book/seafile-data" folder, you should use the user "" to run the script.
 
 About to perform stop for seafile at 2016-09-27T10:36:16-0400 
 
seafile server not running yet
Done.

chown -R USER:USER Book will do the trick. If not try chown -R USER:USER /home/USER/haiwen as well

Unfortunately I tried your suggestion and that doesn’t work The actual directory and contents were owned by the correct user in the first place.

I still think it is more suspicious that something is trying to stat the path to make sure it exists, but is doing so in two separate pieces.

I have got a same problem.
If I use space in a name of a folder, I can upload files but can’t download. Just delete space - everything is OK.

I guess some code of seafile.sh script doesn’t pay attention to take care of paths with whitespaces. But IMO having whitespaces in a server software path is never a good idea itself.

I have solved the problem. Upgrade apache tp 2.4.23-4 version.

Hmm… I’m running a couple of different things on my web server so I don’t want to upgrade unnecessarily. I guess I’ll have to test this when I have some free weekend and in the mean time stick with version 5 :frowning: