Seahub not working after upgrade

Hi, I need some advices.
I upgraded from 4.3 pro to 6.1 pro then seahub don’t work anymore.

I’m using ubuntu with apache / Fastcgi and an https cert

When I try to access the site, errors are showing 403 access denied for files located in /media. i can’t find how to fix that.

Here is my default-ssl.conf from apache, I made some small changes after upgrade like changing the media alias :

<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerName myserver.com
DocumentRoot /var/www
#  Alias /media  /var/www/media
Alias /media /root/seafile/seafile-server-latest/seahub/media

  SSLEngine On
  SSLCertificateFile /etc/letsencrypt/live/myserver.com/cert.pem
SSLCertificateKeyFile /etc/letsencrypt/live/myserver.com/privkey.pem

 RewriteEngine On
<Location /media>
Require all granted
</Location>
 #
# seafile fileserver
#
ProxyPass /seafhttp http://127.0.0.1:8082
ProxyPassReverse /seafhttp http://127.0.0.1:8082
RewriteRule ^/seafhttp - [QSA,L]

#
# seahub
#
SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
RewriteRule ^/(media.*)$ /$1 [QSA,L,PT]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ /seahub.fcgi/$1 [QSA,L,E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
SSLCertificateChainFile /etc/letsencrypt/live/myserver.com/chain.pem
</VirtualHost>
</IfModule>

Any help appreciated.
Thanks

What about permissions on media folder(from your apache config /root/seafile/seafile-server-latest/seahub/media). Is folder and files inside accessable for apache?

Hi, Thanks for your help,
I made www-data owner of folders and chmod 755
Also seahub is complaining about the CACHE folder rights for memcached but what are the good rights to give ?

Here are permissions :

 drwxr-xr-x  3 www-data www-data 4096 Sep 25 08:29 CACHE
drwxr-xr-x  5 www-data www-data 4096 Aug 18 11:55 assets
lrwxrwxrwx  1 www-data www-data   28 Sep 25 07:51 avatars -> ../../../seahub-data/avatars
drwxr-xr-x  2 www-data www-data 4096 Aug 18 11:55 codemirror
drwxr-xr-x  2 www-data www-data 4096 Aug 18 11:55 cors
drwxr-xr-x  5 www-data www-data 4096 Aug 18 11:55 css
lrwxrwxrwx  1 www-data www-data   27 Sep 25 07:51 custom -> ../../../seahub-data/custom
drwxr-xr-x  5 www-data www-data 4096 Aug 18 11:55 img
drwxr-xr-x  5 www-data www-data 4096 Aug 18 11:55 js
drwxr-xr-x  2 www-data www-data 4096 Aug 18 11:55 office-template
drwxr-xr-x  5 www-data www-data 4096 Aug 18 11:55 rest_framework

It look OK. Just try for test 777 for whole directory.
Under which user seafile running?

Same with 777 on seahub/ directory
Both seafile and seahub are running as root
Btw it may not be the perfect setup …

Could the fact that the files are in root home directory affect this ?
Maybe I can move the media folder to /var/www ?

So i tried moving files to www and it works but I still have the memcached error.

Warning: Cache is not working, please check memcached is running if you are using
memcached backend, otherwise, please check permission of cache directory on your
file system.

Most probably you will have to change the memcached setup. Just follow the server manual there. I remember this problem or something similar when I did the upgrade from 5.x.x to 6.x.x.

Thx a lot, i can’t do it right now, but i’ll try and stay in touch
Thanks for your help

1 Like