Upgrade from 6.0.x to 7.0.x - cannot run seafile.sh

I am using CE.

Following instructions at https://manual.seafile.com/deploy/upgrade.html, in the “Major version upgrade” section of the manual, I have reached step 4 of the process. When trying to run ./seafile.sh start as root - i get this result:

Error: the user running the script ("root") is not the owner of "/path/to/seafile/seafile-data" folder, you should use the user "nginx" to run the script.

image

I see that on my snapshotted copy of seafile BEFORE any changes were made, nginx is indeed the owner of this directory.

image

What do I need to do to reconcile this issue?

EDIT: Note, I did not initially set this server up and the person who did is long gone so I don’t know which method they used to install it. Is that data directory supposed to be owned by nginx?

Two errors:

  1. dont run anything as root
  2. dont run your seafile as nginx user (or let the directory be owned by it)

go and create an unique user for seafile and use systemd for example to start the service.

2 Likes

To be clear - I’m able to step through the major version upgrade process without using an account with administrative privileges?

EDIT: which user should own/run seafile? The “unique user for seafile”?

Yes should work. The only thing the updater does is perform some SQL updates and recreate a symlink (and some other stuff), but none require root permissions. Its generally speaking a good idea to run nothing as root, expect its really necessary.

  1. create new user (commands differ from distro to distro)
  2. chown -r the parent directory to the new user
  3. start update process as new user (su - newuser -c “command”) - i guess this has allready been done as root user so no need to execute it twice.
  4. start seafile using the new user (optionally: create a systemd task for this - should be done)
1 Like