Folders and files with spaces and/or umlauts

I am running a Seafile server 6.02 pro on Ubuntu 14.04 with Apache 2.4.7 since the update from v5.1.11 pro I got problems (no preview, no download, file not found) with spaces and umlauts in my file and folder names. It seems to be a known problem #1258, but I am wondering why i had no problems with Seafile v5.1.11. For me it makes no difference if I use mod_fastcgi or mod_fcgid - both does not solve the problem. Ubuntu 14.04 (officially) does not provide a newer Apache version than 2.4.7 so I can not test if this issue is fixed with >=2.4.11.
To work around the problem I have renamed most of my folders and files, but that is not a satisfactory solution (e.g. it does not work for the iOS photo upload)

My questions are:

1.) Which source code changes (5.1.11 --> 6.0.2) can have triggered this problem ?
2.) What can I do to fix the problem so that I can use spaces and umlauts ?
3.) It is a Seafile bug or a Apache bug ?

To my knowledge it is an apache bug fixed in 2.4.12. Another workaround is to replace apache with nginx, which works very well with seafile. If you have other applications that need apache, it is more difficult, but you can configure nginx as proxy for these.

That’s my problem, my server is hosting other services beside seafile and I always use apache as web server. I got no experience with nginx and I do not want to run them parallel. If I would know that Ubuntu will release apache 2.4.12 next week it wouldn’t be a big deal, but I am afraid it will take a couple of weeks, maybe months :unamused:

@Vertex
The Apache version in Ubuntu 14.04 won’t change!! It will stay at 2.4.7. Only security things will be patched in Ubuntu’s Apache. In 14.04 I once updated my Apache via a good ppa, but I’m not sure if it is still maintained for 14.04’s Apache, because of the 16.04’s update of Apache to 2.4.18 and PHP7.
I’m now on Ubuntu 16.04 and everything works fine now.

Regards

I had the same Problem.

I updated Apache throug this ppa: https://launchpad.net/~ondrej/+archive/ubuntu/apache2

It is working fine an without problems on my production server.

Jop, that was the ppa! Thanks @bhueske

First of all I would like to thank you for your tips. The PPA is a little problematic for me, because my server is managed by Plesk 12.5, which does not support Apache v2.4.23. And I am a afraid that I get some dependency issues too. So it is not really an option for me.

I did some further investigation. I have found out that other software e.g. Moodle got similar problems - they think, that it is a fastcgi issue.
I did some testing and found out, that folder names with spaces or umlauts are no problem as long they are created at the first directory level. If I create them in the secondary directory level and upload any kind of file, I can not display or download the file - seafile tells me “file not found” (e.g. MyDataPool --> Test Test and upload a file into Test Test)
File names with spaces or umlauts are always a problem, these files cannot displayed or downloaded.
That’s a pretty weird behaviour and I have no idea which component (seafile, apache or a apache module) is responsible for this error

My example configuration for testing works with MySQL, Apache (no SSL) and Seafile Server Pro 6.02.:

    apachectl -V
    Server version: Apache/2.4.7 (Ubuntu)
    Server built:   Jul 15 2016 15:34:04
    Server's Module Magic Number: 20120211:27
    Server loaded:  APR 1.5.1-dev, APR-UTIL 1.5.3
    Compiled using: APR 1.5.1-dev, APR-UTIL 1.5.3
    Architecture:   64-bit
    Server MPM:     prefork
      threaded:     no
        forked:     yes (variable process count)
    Server compiled with....
     -D APR_HAS_SENDFILE
     -D APR_HAS_MMAP
     -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
     -D APR_USE_SYSVSEM_SERIALIZE
     -D APR_USE_PTHREAD_SERIALIZE
     -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
     -D APR_HAS_OTHER_CHILD
     -D AP_HAVE_RELIABLE_PIPED_LOGS
     -D DYNAMIC_MODULE_LIMIT=256
     -D HTTPD_ROOT="/etc/apache2"
     -D SUEXEC_BIN="/usr/lib/apache2/suexec"
     -D DEFAULT_PIDLOG="/var/run/apache2.pid"
     -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
     -D DEFAULT_ERRORLOG="logs/error_log"
     -D AP_TYPES_CONFIG_FILE="mime.types"
     -D SERVER_CONFIG_FILE="apache2.conf"

apachectl -M
Loaded Modules:
 core_module (static)
 so_module (static)
 watchdog_module (static)
 http_module (static)
 log_config_module (static)
 logio_module (static)
 version_module (static)
 unixd_module (static)
 access_compat_module (shared)
 actions_module (shared)
 alias_module (shared)
 auth_basic_module (shared)
 authn_core_module (shared)
 authn_file_module (shared)
 authz_core_module (shared)
 authz_host_module (shared)
 authz_user_module (shared)
 autoindex_module (shared)
 deflate_module (shared)
 dir_module (shared)
 env_module (shared)
 fastcgi_module (shared)
 filter_module (shared)
 mime_module (shared)
 mpm_prefork_module (shared)
 negotiation_module (shared)
 php5_module (shared)
 proxy_module (shared)
 proxy_fcgi_module (shared)
 proxy_http_module (shared)
 rewrite_module (shared)
 setenvif_module (shared)
 status_module (shared)

We should track down this error, because it is really a very nasty bug, I think there should be a solution without upgrading Apache.
Btw. what about Django, could the Django implementation of seafile trigger this error ?

I would appreciate if the developers would take a closer look at this issue.

EDIT: I have just upgraded Apache in my test installation to v2.4.23, but it did not fix the problem.

I think I have solved the problem. It seems, that the “wrong” apache MPM is the reason why it does not work as expected. On all my servers I am running the apache Prefork module and no matter which apache version 2.4.7 or 2.4.23, I got the problem with spaces and umlauts.
On my test server I have switched to the apache Worker module and everything works like a charm. @bhueske could you please check which MPM you use.
It would be nice if someone else could check it too, just to make sure that I am right.

I think it would be a good idea to add a hint/warning in the manual regarding this problem.

EDIT: Apache v2.4.7 does not work no matter which MPM, Apache v2.4.23 works with MPM Worker and Event.

@Vertex here is my Apache configuration (Ubuntu 14.04)

apachectl -V Server version: Apache/2.4.23 (Ubuntu) Server built: 2016-10-06T00:00:00 Server's Module Magic Number: 20120211:61 Server loaded: APR 1.5.2, APR-UTIL 1.5.4 Compiled using: APR 1.5.2, APR-UTIL 1.5.4 Architecture: 64-bit Server MPM: prefork threaded: no forked: yes (variable process count) Server compiled with.... -D APR_HAS_SENDFILE -D APR_HAS_MMAP -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled) -D APR_USE_SYSVSEM_SERIALIZE -D APR_USE_PTHREAD_SERIALIZE -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT -D APR_HAS_OTHER_CHILD -D AP_HAVE_RELIABLE_PIPED_LOGS -D DYNAMIC_MODULE_LIMIT=256 -D HTTPD_ROOT="/etc/apache2" -D SUEXEC_BIN="/usr/lib/apache2/suexec" -D DEFAULT_PIDLOG="/var/run/apache2.pid" -D DEFAULT_SCOREBOARD="logs/apache_runtime_status" -D DEFAULT_ERRORLOG="logs/error_log" -D AP_TYPES_CONFIG_FILE="mime.types" -D SERVER_CONFIG_FILE="apache2.conf"

[code]apachectl -M
Loaded Modules:
core_module (static)
so_module (static)
watchdog_module (static)
http_module (static)
log_config_module (static)
logio_module (static)
version_module (static)
unixd_module (static)
access_compat_module (shared)
actions_module (shared)
alias_module (shared)
auth_basic_module (shared)
authn_core_module (shared)
authn_file_module (shared)
authz_core_module (shared)
authz_groupfile_module (shared)
authz_host_module (shared)
authz_user_module (shared)
autoindex_module (shared)
cgi_module (shared)
deflate_module (shared)
dir_module (shared)
env_module (shared)
expires_module (shared)
fastcgi_module (shared)
fcgid_module (shared)
filter_module (shared)
headers_module (shared)
mime_module (shared)
mime_magic_module (shared)
mpm_prefork_module (shared)
negotiation_module (shared)
php5_module (shared)
proxy_module (shared)
proxy_fcgi_module (shared)
proxy_http_module (shared)
reqtimeout_module (shared)
rewrite_module (shared)
setenvif_module (shared)
socache_shmcb_module (shared)
ssl_module (shared)
status_module (shared)
suexec_module (shared)
unique_id_module (shared)

[/code]

Thank you @bhueske - it seems my guess was wrong, it has nothing to do with the MPM. This apache bug is so annoying, because the only option to solve the problem is to upgrade Apache.
When I install apache v2.4.23 on my production server I cannot enable mod_proxy_http :rage:

apache2: Syntax error on line 140 of /etc/apache2/apache2.conf: Syntax error on line 2 of /etc/apache2/mods-enabled/z-proxy_http.load: Cannot load /usr/lib/apache2/modules/mod_proxy_http.so into server: /usr/lib/apache2/modules/mod_proxy_http.so: undefined symbol: ap_proxy_buckets_lifetime_transform

And the weird thing is, that it works on my test server - meanwhile this problem drives me crazy.

EDIT: mod_proxy_http works now, but the problem persists even with v2.4.23. I have no idea to debug this issue. The crazy thing is, that folder names with a space working in the first level of the hierarchy but fail in the second level. Files in those second level folders cannot be found - if I remove the space in the folder name I can access them again. I am clueless and pretty frustrated.

I just have discovered something interesting regarding folder names with spaces like “My folder” - because of the apache bug I cannot access files in those folders with the web browser and the preview of e.g. images is broken. But if I share these folders, the share link works without any issues, I can access the files and get a proper preview.

Hi Vertex,

got the same issue like you but I am stuck in Debian with 2.4.10…
Did you have time to look in anyway deeper in the problem?

@BratHuhn Unfortunately no, I do not know how to debug this problem in more detail. For comparison I did a ownClould/nextClould installation and had none of these problems. So I think it is not really an apache problem but maybe it has something to do with mod_proxy/mod_rewrite or django - I will test the new v6.03 pro today with updated django.

Edit: v6.0.3 works pretty well so far, but the problem stays the same :disappointed:

Hi Vertex,

too bad :frowning: When I got the time I will also get a deeper look into the problem - but atm it is impossible. Hope we´re gonna solve!

I spent a lot of time to solve this problem and there is an easy solution; If this problem happens when you have Ubuntu 14.0x install, do a upgrade to the latest version with the command; do-release-upgrade
The problem is the Apache version. This solves the problem, because with the new Ubuntu version, also a new version of Apache will be installed.

@evdbovenkamp
This can be an easy solution, if your server hoster provide/allow you to upgrade the operating system - unfortunately on many virtual servers you do not have this option, which makes the problem so annoying. The only option would be to switch to a newer v-server with an current Ubuntu version.