Probably ought to name that repo a little better now since it's not just btsync.
It is just "sync" in OMV 3.x. There is no btsync plugin for OMV 3.x either.
Probably ought to name that repo a little better now since it's not just btsync.
It is just "sync" in OMV 3.x. There is no btsync plugin for OMV 3.x either.
That was it.... Thanks! Looks like it's working just fine. I'm gonna test this a couple of days in VM, then install it on my NAS, as I can get some use out of this.
It's really not difficult at all to install... the instructions you wrote are solid (when followed :))
Cheers KM0201, I'm glad you got it sorted ... Now if I could just get this startup script for part 3 working I might be able to update the Guide to another "solid" installation..lol
At least for now I can update the MySQL part of the guide to be simpler
Alles anzeigenZoki, I have the same trouble if I create the user the way you said. The start up script still only works if the user is set to root.
Here’s the basics of what I did:
useradd -m -d /opt/seafile -c "Seafile Service Account" -s /usr/sbin/nologin -r seafile
...
su -s ./setup-seafile-mysql.sh
...
@baldmanHere it is: You are running the seafile install script as root, which creates all the files with owner root.
Execute this scipt as user seafile and you are done.
Can you guys tell me the differences between Seafile and Syncthing???
Zoki, you said earlier "If you give the seafile user an no login shell, you have to use the -s parameter of su to continue with the install as seafile (or call sudo all the time)" I'm not sure what you are saying here?
If I installed seafile with just this ./setup-seafile-mysql.sh it installs with errors and missing files and wont start up manually. If I use sudo it asks for the seafile user password which doesn't exist. If I use su it installs as root with no errors. Forgive me I'm not a Linux wiz but I'm good with coping & pasting and trial & erroring...lol
Cheers KM0201, I'm glad you got it sorted ... Now if I could just get this startup script for part 3 working I might be able to update the Guide to another "solid" installation..lol
At least for now I can update the MySQL part of the guide to be simpler
What's wrong with the script in part 3? It works fine.
Sent from my Nexus 6 using Tapatalk
KM0201, If you installed seafile following the current guide then yes its fine. I'm trying to install seafile as another user like you tried earlier
No, I've got it running as user seafile... it's not running as root. I did that after I got it working following your instructions Hang on I'll post details.
I just got the install to work successfully using the new seafile user. I had to give the seafile user & group write permissions to the Seafile-Data directory in OMV. Is there away we can do this when creating the user?
I've got part 3 working too now so its all good.
I created the new seafile user with help from Zoki using this cmd: useradd -m -d /opt/seafile -c "Seafile Service Account" -s /usr/sbin/nologin -r seafile
Then before I continued the install I did this: su -s /bin/bash seafile
Is there a way add the seafile user/group permissions to the seafile-data directory during the user creation above or will I need a separate command line?
Hmm.. not sure on that... As with most things, there's more than one way to skin a cat.. Here's how I did it
1. Create the user and group "seafile" in the webUI.. make sure the user has shell access in in the options at the bottom (/bin/bash) and you make it a member of the group you created.
2. SSH as root.
3. mkdir /home/seafile
4. chown -R seafile:seafile /home/seafile
5. su seafile (to log in as the seafile user)
6. cd /home/seafile
7. Follow you're instructions starting at "wget" to download the .tar file. (This is where it might get confusing for some users... as if they follow your tutorial.. they'll have to change to root, install the php, etc. stuff.. then go back to being user seafile, to complete the seafile installation... maybe putting the install stuff for php, at the beginning of the tutorial?)
8. After php installs, log back in as user seafile in the shell and run all the commands for installing seafile as the user "seafile"
9. Start the services seafile and seahub as user "seafile"
10. Follow your instructions for creating the script. Since at that point in the instructions you've not setup SSL yet, all you have to do is change the "user" to seafile, and then set the install path for whatever path you chose.
#!/bin/sh
### BEGIN INIT INFO
# Provides: seafile-server
# Required-Start: $local_fs $remote_fs $network mysql
# Required-Stop: $local_fs mysql
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Starts Seafile Server
# Description: starts Seafile Server
### END INIT INFO
# Change the value of "user" to your linux user name
user=seafile
# Change the value of "script_path" to your path of seafile installation
# usually the home directory of $user
seafile_dir=/home/seafile/seafile
script_path=${seafile_dir}/seafile-server-latest
seafile_init_log=${seafile_dir}/logs/seafile.init.log
seahub_init_log=${seafile_dir}/logs/seahub.init.log
# Change the value of fastcgi to true if fastcgi is to be used
fastcgi=true
# Set the port of fastcgi, default is 8000. Change it if you need different.
fastcgi_port=8000
#
# Write a polite log message with date and time
#
echo -e "\n \n About to perform $1 for seafile at `date -Iseconds` \n " >> ${seafile_init_log}
echo -e "\n \n About to perform $1 for seahub at `date -Iseconds` \n " >> ${seahub_init_log}
case "$1" in
start)
sudo -u ${user} ${script_path}/seafile.sh ${1} >> ${seafile_init_log}
if [ $fastcgi = true ];
then
sudo -u ${user} ${script_path}/seahub.sh ${1}-fastcgi ${fastcgi_port} >> ${seahub_init_log}
else
sudo -u ${user} ${script_path}/seahub.sh ${1} >> ${seahub_init_log}
fi
;;
restart)
sudo -u ${user} ${script_path}/seafile.sh ${1} >> ${seafile_init_log}
if [ $fastcgi = true ];
then
sudo -u ${user} ${script_path}/seahub.sh ${1}-fastcgi ${fastcgi_port} >> ${seahub_init_log}
else
sudo -u ${user} ${script_path}/seahub.sh ${1} >> ${seahub_init_log}
fi
;;
stop)
sudo -u ${user} ${script_path}/seahub.sh ${1} >> ${seahub_init_log}
sudo -u ${user} ${script_path}/seafile.sh ${1} >> ${seafile_init_log}
;;
*)
echo "Usage: /etc/init.d/seafile-server {start|stop|restart}"
exit 1
;;
esac
Alles anzeigen
(the startup script above currently has SSL running, which is the only difference)
It alright, I just realized you cant do it during user creation because everybody's Seafile-Data directory location is different... I knew this...lol
I'm good to go now on updating the Guide, I'll do it ASAP
Ah, you meant the database directory... I honestly didn't change anything on that. I assume when you run the service as the user seafile, it automatically has read-write access..
root@omv-test:~# cd /media/30c8f67a-dc7a-4ba9-8dac-4b6f2b7dbec7/
root@omv-test:/media/30c8f67a-dc7a-4ba9-8dac-4b6f2b7dbec7# ls -l
total 28
-rw------- 1 root root 6144 Jun 2 10:40 aquota.group
-rw------- 1 root root 7168 Jun 2 10:40 aquota.user
drwxrwsr-x 7 mysql mysql 4096 Jun 2 10:41 MySQL-Data
drwxrwsr-x 3 root users 4096 Jun 2 06:07 Seafile-Data
root@omv-test:/media/30c8f67a-dc7a-4ba9-8dac-4b6f2b7dbec7#
I'm assuming "user" got access when the database was created as a user? I didn't do that manually, that I know.
I've got part 3 working too now so its all good.
I created the new seafile user with help from Zoki using this cmd: useradd -m -d /opt/seafile -c "Seafile Service Account" -s /usr/sbin/nologin -r seafile
Then before I continued the install I did this: su -s /bin/bash seafile
Is there a way add the seafile user/group permissions to the seafile-data directory during the user creation above or will I need a separate command line?
Maybe it will work, if we do not create a new group "seafile" for the user seafile, but add him to the group users.
Another thing to think about is that if someone is using user homes in OMV the home direcory might end up on a OMV managed share, which does not allow to execute code.
Can you try this command to create the user:
useradd -m -d /opt/seafile -c "Seafile Service Account" -s /usr/sbin/nologin -r -g users seafile
The flag are:
If you do some chown later on, you would have to use chown seafile:users
another option to solve the permission issue would be to do a
@baldmanHow dows the new seafile installation store the location of the seafile-data folder. If you can tell me if it is a symlink in the home or the seafile.ini file in folder ccnet, i can give you the command to do the chown thing without having to enter the seafile-data location manually. It is eigther
or
@KM0201 You do not have to change the permissions of the MySQL-Data directory. seafile will not write to this, but the mysql database user will. Seafile will only talk to the database process wich in turn writes to disk.
Zoki, I've already gone ahead and updated the guide. If you look there you will see what I've done. Its probably fine the way I've done it but if you think there's a way around it i'm happy to give it a go. Perhaps I shouldn't have updated the guide yet
Zoki, I've already gone ahead and updated the guide. If you look there you will see what I've done. Its probably fine the way I've done it but if you think there's a way around it i'm happy to give it a go. Perhaps I shouldn't have updated the guide yet
Hi @baldman,
the guide is really nice and the writing is better than I could do it.
I looked through it and there are some things which I would like to add:
Again, put this into one code block for cut and paste.
I followed the new instructions to the letter on a new VM
Only hiccup I ran into, is Part 1, step 5... creating the root password with the commands. At the very end, you've got "exit;" I kept getting syntax errors when I used that... "exit" worked just fine and exited me properly. Everything else was as written.
WAY BETTER on the database creation and creation of the mysql user. The other way I think, while it worked, was unnecessarily complex.
The Service URL, had https:// twice in the previous instructions as well... it works as the guide is written.. but not sure if having two https:// is necessary or not.
As for the code blocks.. I prefer it the way it's written... If you start putting a bunch of stuff in a single code block, you're going to get new users who not familiar w/ command line, copy/pasting the whole code box at the same time, resulting in errors.
Good job!
Zoki, Thanks for the tips... nice ... I'll reference your numbers in my response.
1. That's what i was trying to do last night. You want me to try this with your code? useradd -m -d /opt/seafile -c "Seafile Service Account" -s /usr/sbin/nologin -r -g users seafile (done)
2. I made the color red there so people take note that the password needs changing before copying & pasting. The forum keeps telling me that im at my character limit but ill try to be more descriptive.
3. Thanks for the reminder, I was going to add the 32bit option (character limit reached, added link)
4. Thanks for the conformation. I've been wondering myself why its like that. I copied that from somewhere else i think! (Done
5. Some people make mistakes and reboot or close the terminal. I assume if they open a new terminal they would need to start seafile as the seafile user?.... I need to be more descriptive.
6. Whats empty?... The spoiler or the actual file? Maybe i need to put in the instructions to su first? (this works without su)
7. If you mean part 4 then reboot is to test seafile is starting up before continuing to the next step. I can add an optional tag there but i think its good to reboot and check
8. Great thanks. I never stop learning (done)
9. Typo Sorry. Im at my character limit so lots of coping and pasting and refreshing. (done)
I think line by line copying is the way to go. Some people will copy the whole box and wonder whats wrong. Maybe i'll make downloadable text or pdf file for advanced users
KM0201, sorry.. that's another typo. Its supposed to just say exit not exit;.... Ill fix
I agree w/ you on the reboot... at least there if it's not working... you can start trouble shooting it, before messing w/ SSL, etc (maybe put a caveat there to reboot and test?, since that is really the only reason to reboot, is to test the startup script). That's how I done it anyway when I was working on getting it working as a user.
I see now why you put the installation directory under /opt instead of /home... I never thought about that interfering w/ OMV Home's (which are on the data drives)...
I got seafile working thanks to your instructions. Now, I have version 5.0.4 running and the latest version seems to be 5.1.3.
When I try to run the upgrade script, I get the following error:
[ERROR] Error:
ccnet is using MySQL
seafile is using SQLite3
seahub is using MySQL
Failed to upgrade your database
Any ideas?
ETA: Ok I fixed it by following the steps here (for the seafile db only): http://manual.seafile.com/depl…from_sqlite_to_mysql.html
For some reason, the seafile.conf file was not pointing to the mysql server after the installation. You guys might want to check your installation. The upgrade went well after that.
ETA2: Well, nope... The upgrade went well, but the new version gives an "Unhandled exception" message. So rolling back to 5.0.4 then...
Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!