Created a script in /init.d called “seafile-server” using https://manual.seafile.com/deploy/start_seafile_at_system_bootup.html as a template.
sudo -u seafile ./seafile.sh -> seafile is started
sudo -u seafile ./seahub.sh -> seahub is NOT started
after boot, logging in with user seafile & starting seahub.sh works fine!
It is necessary to use sudo (path)/seahub.sh in order for seahub to start with boot.
Can I leave it at this or is it a concern for security if seahub runs with root ?
Maybe some files with a wrong permission that prevent seahub from start with non-root. Can you check the permissions for the log files seahub need to write to?
hey, thank you for your suggestion -
ls -ltr …/seafile-server-6.0.5/runtime/seahub.pid
-rw-r–r–. 1 seafile seafile 6 Nov 21 19:00 …/seafile-server-6.0.5/runtime/seahub.pid
ls -ltr …/logs/seahub_django_request.log
-rw-r–r–. 1 seafile seafile 104 Nov 20 17:50 …/logs/seahub_django_request.log
ls -ltr …/logs/seahub.log
-rw-r–r–. 1 seafile seafile 0 Nov 20 13:04 …/logs/seahub.log
since seahub.sh starts fine from commandline with user seafile - are there any different permissions needed when seahub.sh is started from user seafile in init.d script ?
Deleted /tmp/seahub_cache & chowned all files to seafile/seafile. - unfortunately the problem still persists.
There are another log file seahub.init.log. Is the permission of this file correct?
ls -ltr …/logs/seahub.init.log
-rw-r–r–. 1 seafile seafile 5104 Nov 21 18:57 …/logs/seahub.init.log
LC_ALL is not set in ENV, set to en_US.UTF-8
Starting seahub at port 8000 …
Error:Seahub failed to start.
Please try to run “./seahub.sh start” again
do you see anything wrong ?
I realise this thread is almost 2 years old but I’m having exactly the same problem with Pro v 6.3.5 (and I had it with 6.2.13 - see Seahub only starts as root (Linux))
There are no permission issues that I can see. I’ve deleted all log files and the directories in /tmp so that seafile.sh and seahub.sh can recreate them.
Using sudo -u seafile … fails but su seafile and then running seahub.sh works
I’ve even tried starting it on a different port without success.
This is driving me insane - I don’t know what else to try.
Are there any debugging commands I can issue? Nothing shows up the seahub*.log files other than “Seahub failed to start” which is not helpful!
I’m experiencing this same issue and none of the answers I’m finding are helpful so far.
I also never got it to start with systemd. Its just not made for it.