This is the old XigmaNAS forum in read only mode,
it will taken offline by the end of march 2021!



I like to aks Users and Admins to rewrite/take over important post from here into the new fresh main forum!
Its not possible for us to export from here and import it to the main forum!

[HOWTO] Install Owncloud inside a Jail

Jails with XigmaNAS
Forum rules
Set-Up GuideFAQsForum Rules
User avatar
Nostalgist92
experienced User
experienced User
Posts: 100
Joined: 09 Feb 2013 00:04
Status: Offline

Re: [HOWTO] Install Owncloud inside a Jail

Post by Nostalgist92 »

Try this script, just a slightly modified version of the one fsbruva posted. Just changed the pkd_add and added a line for lighttpd to be automatically added to rc.conf. Also made sure the www folder was being made in /usr/local before owncloud was downloaded and unpacked in to it.

When you run it make sure you respond to the package management tool request with yes.

Code: Select all

The package management tool is not yet installed on your system.
Do you want to fetch and install it now? [y/N]: y
Just reinstalled it in 3 fresh jails of my own to ensure it was working and it worked fine but YMMV.

Attached script is outdated, see this post for latest updates: viewtopic.php?f=79&t=9383
You do not have the required permissions to view the files attached to this post.
Last edited by Nostalgist92 on 07 Jan 2017 16:26, edited 2 times in total.
11.0.0.4 - Sayyadina (revision 3330) x64-full on Intel(R) Core(TM) i7-4820K CPU @ 4.20GHz | Corsair Vengeance Pro 64GB (4x8GB) CMY16GX3M2A1600C9 | 12 x 6TB WD RED RAIDZ2 + 2 x 256GB SSD Drives

User avatar
ExTruckie
experienced User
experienced User
Posts: 100
Joined: 25 Jun 2012 22:52
Location: York, Pennsylvania
Status: Offline

Re: [HOWTO] Install Owncloud inside a Jail

Post by ExTruckie »

Nostalgist92 wrote:Try this script, just a slightly modified version of the one fsbruva posted. Just changed the pkd_add and added a line for lighttpd to be automatically added to rc.conf. Also made sure the www folder was being made in /usr/local before owncloud was downloaded and unpacked in to it.

When you run it make sure you respond to the package management tool request with yes.

Code: Select all

The package management tool is not yet installed on your system.
Do you want to fetch and install it now? [y/N]: y
Just reinstalled it in 3 fresh jails of my own to ensure it was working and it worked fine but YMMV.

Well I have tried this on several occasions using the edited script and I never can get past the package management tool install I get this error


code: The package management tool is not yet installed on your system.
Do you want to fetch and install it now? [y/N]: y
Bootstrapping pkg from pkg+http://pkg.FreeBSD.org/freebsd:9:x86:64/latest, please wait...
pkg: Error fetching http://pkg.FreeBSD.org/freebsd:9:x86:64 ... st/pkg.txz: No address record
A pre-built version of pkg could not be found for your system.
Consider changing PACKAGESITE or installing it from ports: 'ports-mgmt/pkg'.

What do I do to correct this?
Mark Minnich
XigmaNAS 11.4.0.4 (7848) on a 16Gb USB Stick for embedded install.
AMD Athlon(TM)II X4 645 Processor.
Biostar N68SB-M3S_100521 Motherboard.
8Gb DDR3 Ram.
PCI-Express 4 port SATA III Controller Card.
4 Hitachi Ultrastar 7K3000 2Tb SATA Hard Drives in a raid1z, total storage available 5.61Tb.
320Gb SATA HD for OMV OS. 1Tb SATA Hard Drive for Backups.

User avatar
Nostalgist92
experienced User
experienced User
Posts: 100
Joined: 09 Feb 2013 00:04
Status: Offline

Re: [HOWTO] Install Owncloud inside a Jail

Post by Nostalgist92 »

I'm trying to replicate your problem on my spare nas system but can't seem to get it to do so lol.

Have you tried the script in a fresh jail? And do you have other jails that are having the same pkg problem?
Majority of the time when i see this bit "No address record" it's generally because of the Jails internet connectivity (in my case anyway).
Double check the jail is able to access the internet because the address it's trying to fetch from is working fine.

You can always try the alternative it is giving you which is installing it from the port tree.
If you haven't done this already, I like to use the handy "Central Ports" of TheBrig extension. It's under "Updates" on the extensions page in your nas webgui.
Just hit Fetch & Update and let it do it's thing. Once it's done just tick the box next to the name of your owncloud jail and hit save.

Then you can putty into your owncloud jail again and try running these commands:

Code: Select all

cd /usr/ports/ports-mgmt/pkg
make
make install clean
See how your luck goes with that. Just also take note i'm running on fumes currently lmao haven't had a whole lot of sleep the past couple days but i'll keep trying to rack this poor overworked brain of mine for a while longer before i retire to bed lol.
11.0.0.4 - Sayyadina (revision 3330) x64-full on Intel(R) Core(TM) i7-4820K CPU @ 4.20GHz | Corsair Vengeance Pro 64GB (4x8GB) CMY16GX3M2A1600C9 | 12 x 6TB WD RED RAIDZ2 + 2 x 256GB SSD Drives

User avatar
ExTruckie
experienced User
experienced User
Posts: 100
Joined: 25 Jun 2012 22:52
Location: York, Pennsylvania
Status: Offline

Re: [HOWTO] Install Owncloud inside a Jail

Post by ExTruckie »

Nostalgist92

I did as you suggested and I got the port tree installed
However the commands do not work on my end.
I know I have internet connectivity in the Jail but if I go into the owncloud folder as root and do an ifconfig
I don't have connectivity. I am not sure how to correct that issue
It has been suggested, privately, that I abandon the attempt and go with OpenMediaVault or FreeNAS.
I don't have an extra hd for the os and using an usb stick is NOT recommended.
I really don't want to loose the embedded setup and I don't have the ram required for FreeNAS at this time
I just want to get this working

Sorry if this sounded like whining but... More info, I can ping the ip of the owncloud setup, from my windows box, as determined by the owncloud_injail.sh script. I just cant seem to get any further along with the install.
Mark Minnich
XigmaNAS 11.4.0.4 (7848) on a 16Gb USB Stick for embedded install.
AMD Athlon(TM)II X4 645 Processor.
Biostar N68SB-M3S_100521 Motherboard.
8Gb DDR3 Ram.
PCI-Express 4 port SATA III Controller Card.
4 Hitachi Ultrastar 7K3000 2Tb SATA Hard Drives in a raid1z, total storage available 5.61Tb.
320Gb SATA HD for OMV OS. 1Tb SATA Hard Drive for Backups.

User avatar
ExTruckie
experienced User
experienced User
Posts: 100
Joined: 25 Jun 2012 22:52
Location: York, Pennsylvania
Status: Offline

Re: [HOWTO] Install Owncloud inside a Jail

Post by ExTruckie »

SUCCESS!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

I finally got OwnCloud installed and running. I will be posting a short post on how I managed to get it installed in the near future.
I got some of the configuring left to do and need to resize the upload file size .
Mark Minnich
XigmaNAS 11.4.0.4 (7848) on a 16Gb USB Stick for embedded install.
AMD Athlon(TM)II X4 645 Processor.
Biostar N68SB-M3S_100521 Motherboard.
8Gb DDR3 Ram.
PCI-Express 4 port SATA III Controller Card.
4 Hitachi Ultrastar 7K3000 2Tb SATA Hard Drives in a raid1z, total storage available 5.61Tb.
320Gb SATA HD for OMV OS. 1Tb SATA Hard Drive for Backups.

User avatar
Nostalgist92
experienced User
experienced User
Posts: 100
Joined: 09 Feb 2013 00:04
Status: Offline

Re: [HOWTO] Install Owncloud inside a Jail

Post by Nostalgist92 »

Glad to hear it! I've been so flat out over the past 2 weeks i just haven't had much time to post anything helpful :(
11.0.0.4 - Sayyadina (revision 3330) x64-full on Intel(R) Core(TM) i7-4820K CPU @ 4.20GHz | Corsair Vengeance Pro 64GB (4x8GB) CMY16GX3M2A1600C9 | 12 x 6TB WD RED RAIDZ2 + 2 x 256GB SSD Drives

User avatar
ExTruckie
experienced User
experienced User
Posts: 100
Joined: 25 Jun 2012 22:52
Location: York, Pennsylvania
Status: Offline

Re: [HOWTO] Install Owncloud inside a Jail

Post by ExTruckie »

I ended up uninstalling the jail and starting from scratch and using the modified script you supplied. Unfortunately I have the remaining parts of other failed attempts to get rid of.


Sent from my iPhone using Tapatalk
Mark Minnich
XigmaNAS 11.4.0.4 (7848) on a 16Gb USB Stick for embedded install.
AMD Athlon(TM)II X4 645 Processor.
Biostar N68SB-M3S_100521 Motherboard.
8Gb DDR3 Ram.
PCI-Express 4 port SATA III Controller Card.
4 Hitachi Ultrastar 7K3000 2Tb SATA Hard Drives in a raid1z, total storage available 5.61Tb.
320Gb SATA HD for OMV OS. 1Tb SATA Hard Drive for Backups.

Naveen
NewUser
NewUser
Posts: 4
Joined: 28 Apr 2015 07:14
Status: Offline

Re: [HOWTO] Install Owncloud inside a Jail

Post by Naveen »

Myself naveen,

I am facing a problem in installing Owncloud inside jail.

I am installing via putty, after login we will go to edit the script through text editor called nano there i am finding the below error

login as: root
root@192.168.1.6's password:
Last login: Sat Jun 20 08:49:06 2015 from 192.168.1.149
Welcome to NAS4Free!
kipbackup: ~ # jexec 1 csh
root@KarleColud:/ # cd/usr/local
cd/usr/local: Command not found.
root@KarleColud:/ # cd /usr/local
root@KarleColud:/usr/local # fetch http://www.xenopsyche.com/mkempe/oc/owncloud_injail.sh
owncloud_injail.sh 100% of 9289 B 13 MBps 00m00s
root@KarleColud:/usr/local # chmod a+x owncloud_injail.sh
root@KarleColud:/usr/local # pkg_add -r nano
Error: Unable to get ftp://ftp.freebsd.org/pub/FreeBSD/ports ... t/nano.tbz: File unavailable (e.g., file not found, no access)
pkg_add: unable to fetch 'ftp://ftp.freebsd.org/pub/FreeBSD/ports ... t/nano.tbz' by URL


So plz help me on it to resolve the issues.

Thanks,
Naveen

User avatar
raulfg3
Site Admin
Site Admin
Posts: 4865
Joined: 22 Jun 2012 22:13
Location: Madrid (ESPAÑA)
Contact:
Status: Offline

Re: [HOWTO] Install Owncloud inside a Jail

Post by raulfg3 »

pkg_add is discontinued, now you need to use pkg, please google a bit
12.1.0.4 - Ingva (revision 7743) on SUPERMICRO X8SIL-F 8GB of ECC RAM, 11x3TB disk in 1 vdev = Vpool = 32TB Raw size , so 29TB usable size (I Have other NAS as Backup)

Wiki
Last changes

HP T510

User avatar
ExTruckie
experienced User
experienced User
Posts: 100
Joined: 25 Jun 2012 22:52
Location: York, Pennsylvania
Status: Offline

Re: [HOWTO] Install Owncloud inside a Jail

Post by ExTruckie »

There is an updated script in post 121. It has the proper pkg syntax for the current version of FreeBSD. I am in the process of writing a small tutorial to address my experience


Sent from my iPhone using Tapatalk
Mark Minnich
XigmaNAS 11.4.0.4 (7848) on a 16Gb USB Stick for embedded install.
AMD Athlon(TM)II X4 645 Processor.
Biostar N68SB-M3S_100521 Motherboard.
8Gb DDR3 Ram.
PCI-Express 4 port SATA III Controller Card.
4 Hitachi Ultrastar 7K3000 2Tb SATA Hard Drives in a raid1z, total storage available 5.61Tb.
320Gb SATA HD for OMV OS. 1Tb SATA Hard Drive for Backups.

elvincent
NewUser
NewUser
Posts: 4
Joined: 19 Jul 2015 05:24
Status: Offline

Re: [HOWTO] Install Owncloud inside a Jail

Post by elvincent »

First, I'm completely new to this type of thing, but I was able to install my nas4free (10.1.0.2) and the latest thebrig (Alcatraz v0.9) now trying to install ownCloud. Followed the instructions at the top of this post, with the updated script and ran putty installation with "success". But couldn't access ownCloud on my browser to complete setup. Also notice ownCloud jail extensions, though built and 2 running processes, has no "Jail IP". Any help/thoughts? Thanks in advance

User avatar
Nostalgist92
experienced User
experienced User
Posts: 100
Joined: 09 Feb 2013 00:04
Status: Offline

Re: [HOWTO] Install Owncloud inside a Jail

Post by Nostalgist92 »

Have a double check to make sure you have set an ip for the jail in the settings of thebrig. Also ensure it is NOT the same ip as the nas itself. My nas for example uses an ip of 192.168.1.3 but the owncloud jail I have set up uses 192.168.1.201.
11.0.0.4 - Sayyadina (revision 3330) x64-full on Intel(R) Core(TM) i7-4820K CPU @ 4.20GHz | Corsair Vengeance Pro 64GB (4x8GB) CMY16GX3M2A1600C9 | 12 x 6TB WD RED RAIDZ2 + 2 x 256GB SSD Drives

hbsbh81
NewUser
NewUser
Posts: 4
Joined: 01 Jul 2015 11:11
Status: Offline

Re: [HOWTO] Install Owncloud inside a Jail

Post by hbsbh81 »

Everything works great... offline install of thebrig and this script.
Eeeeeexcept for "upload filesize" which seems to be locked at 15mb no matter what i do.

I changed
/usr/local/www/owncloud/.user.ini
and
/usr/local/www/owncloud/.htaaccess
and even made a file called php.ini in /usr/local/etc and added settings in it.

Nothing works...

The webgui tells me i can upload larger files but with anything above 15mb it just stops after a while OR says "Request Entity Too Large".

I have the latest versions of nas4free, thebridge and owncloud.
Help?!

/H

User avatar
Nostalgist92
experienced User
experienced User
Posts: 100
Joined: 09 Feb 2013 00:04
Status: Offline

Re: [HOWTO] Install Owncloud inside a Jail

Post by Nostalgist92 »

You need to change the php.ini to increase your upload size. It's located in ./usr/local/etc
Look for:

"upload_max_filesize"

Edit: My bad i didn't read your post fully lol, there might be another php.ini somewhere, i'll see if i can find one.
11.0.0.4 - Sayyadina (revision 3330) x64-full on Intel(R) Core(TM) i7-4820K CPU @ 4.20GHz | Corsair Vengeance Pro 64GB (4x8GB) CMY16GX3M2A1600C9 | 12 x 6TB WD RED RAIDZ2 + 2 x 256GB SSD Drives

User avatar
Nostalgist92
experienced User
experienced User
Posts: 100
Joined: 09 Feb 2013 00:04
Status: Offline

Re: [HOWTO] Install Owncloud inside a Jail

Post by Nostalgist92 »

So i couldn't find another .ini but do a search in your jail for php.ini using winscp or something and see if there happens to be a rogue one floating around or it's being read from some other directory for some messed up reason.
These are my values that fixed any limit.

upload_max_filesize=32G
post_max_size=32G

Make sure you restart the web service or the entire jail to be sure the new config is picked up. Also as a side note the php.ini should of been automatically created iirc so maybe that might be contributing to the issue.
11.0.0.4 - Sayyadina (revision 3330) x64-full on Intel(R) Core(TM) i7-4820K CPU @ 4.20GHz | Corsair Vengeance Pro 64GB (4x8GB) CMY16GX3M2A1600C9 | 12 x 6TB WD RED RAIDZ2 + 2 x 256GB SSD Drives

hbsbh81
NewUser
NewUser
Posts: 4
Joined: 01 Jul 2015 11:11
Status: Offline

Re: [HOWTO] Install Owncloud inside a Jail

Post by hbsbh81 »

I always restart the whole nas4free... maybe a bit overkill?! =)

I made a copy of php.ini-production to php.ini and now phpinfo says its loaded but, still the same problem... =/

/H

User avatar
Nostalgist92
experienced User
experienced User
Posts: 100
Joined: 09 Feb 2013 00:04
Status: Offline

Re: [HOWTO] Install Owncloud inside a Jail

Post by Nostalgist92 »

Well restarting the nas does in turn restart the jails :P But yes, slight overkill there ;) Just stopping/starting the jail suffices.

About to retire to bed but one thing you can try is to check the jails php confg by doing the following:

Create a file named info.php in the jails root web directory (where the .htaccess file is for owncloud)
Inside this file paste the following code:

Code: Select all

<?php
phpinfo();
?>
Save the file then head to your web browser and go to "your-owncloud-url/info.php"

You should then see a page with a heap of what may or may not be complete nonsense to you. Have a browse through it, it should show the php.ini file location it reads the configuration from if not the one you created, upload file limits etc. Just check for anything that may help locating the issue.

I'll check back in tomorrow, maybe someone else might be able to pitch in before then as well to help a bit more.
Till then, much many sleeps needed!
11.0.0.4 - Sayyadina (revision 3330) x64-full on Intel(R) Core(TM) i7-4820K CPU @ 4.20GHz | Corsair Vengeance Pro 64GB (4x8GB) CMY16GX3M2A1600C9 | 12 x 6TB WD RED RAIDZ2 + 2 x 256GB SSD Drives

hbsbh81
NewUser
NewUser
Posts: 4
Joined: 01 Jul 2015 11:11
Status: Offline

Re: [HOWTO] Install Owncloud inside a Jail

Post by hbsbh81 »

Yes, before phpinfo said no php.ini, but now when i made php.ini in /usr/local/etc phpinfo tells me that it is loaded.

But it doesnt matter, still just 15MB.

Ill attach the phpinfo.html, maybe someone can take look and see if there is something else wrong?
(i hope it doesnt contain any info that i should'nt share...)

/H
You do not have the required permissions to view the files attached to this post.

hbsbh81
NewUser
NewUser
Posts: 4
Joined: 01 Jul 2015 11:11
Status: Offline

Re: [HOWTO] Install Owncloud inside a Jail

Post by hbsbh81 »

I found this in "/var/log/lighttpd/error.log"

"denying upload as opening temp-file for upload failed: Too many open files"

User avatar
Nostalgist92
experienced User
experienced User
Posts: 100
Joined: 09 Feb 2013 00:04
Status: Offline

Re: [HOWTO] Install Owncloud inside a Jail

Post by Nostalgist92 »

You're php info looks pretty much normal to me.

Try modifying "server.max-fds" in /usr/local/etc/lighttpd/lighttpd.conf
Doubling whatever value is there currently may help and do the same for the "server.max-connections"
Restart lighttpd afterwards or stop/start the jail, whichever you find easier.

Not positive that's the option to change to fix the "too many open files" error but it's worth a shot.

Not sure how much more i can help with it as i personally have mine running with apache.
11.0.0.4 - Sayyadina (revision 3330) x64-full on Intel(R) Core(TM) i7-4820K CPU @ 4.20GHz | Corsair Vengeance Pro 64GB (4x8GB) CMY16GX3M2A1600C9 | 12 x 6TB WD RED RAIDZ2 + 2 x 256GB SSD Drives

HeinzHeinze
NewUser
NewUser
Posts: 14
Joined: 19 Jul 2015 18:09
Status: Offline

Re: [HOWTO] Install Owncloud inside a Jail

Post by HeinzHeinze »

Hi every one.

First of all thank you for all the work done with the scripts. Installtions went fine this way.
(But just a little comment for keeping noobs like me more calm. Maybe some threads should be rewritten for 10.1 since on top of the actual threads one always finds the old scripts for 9.3 and runs into trouble this way. But this is just a little remark. Since I think to get something great in the end I am very happy with all the wor done here so far.)

But now my problem:

I set up TheBrig on 10.1 (thank you to alexey123) and followed this thread for installation of ownCloud and mySQL.
That worked fine too.

Now the problem is, when i start/stop ownclouds jail, owncloud responds server error. I had a look at the log and it says:

Code: Select all

 
 /etc/rc: WARNING: failed to start mysql
 
I read some user here had a similar problem some time ago, but did not solve it and sticked to SQLite instead. For I got mySQL installed and this is just a start up problem, I am willing to solve this, rather than directly fall back to SQLite.

So,can someone give a hint on how to solve this?
I allready checked the rc.config of the jail and it says: "mysql_enable="YES"

Any ideas?
Can mySQL be started manualy? Or can a proper comand be added to the GUI of the jail?

Thanks so far

User avatar
ExTruckie
experienced User
experienced User
Posts: 100
Joined: 25 Jun 2012 22:52
Location: York, Pennsylvania
Status: Offline

Re: [HOWTO] Install Owncloud inside a Jail

Post by ExTruckie »

HeinzHeinze wrote:Hi every one.

First of all thank you for all the work done with the scripts. Installtions went fine this way.
(But just a little comment for keeping noobs like me more calm. Maybe some threads should be rewritten for 10.1 since on top of the actual threads one always finds the old scripts for 9.3 and runs into trouble this way. But this is just a little remark. Since I think to get something great in the end I am very happy with all the wor done here so far.)
I agree there needs to be a new "HowTo" done for 10.1. My owncloud install is gone since I upgraded to 10.1. I even went back to 9.3 without any success.
Thanks for all who help out here!
Mark Minnich
XigmaNAS 11.4.0.4 (7848) on a 16Gb USB Stick for embedded install.
AMD Athlon(TM)II X4 645 Processor.
Biostar N68SB-M3S_100521 Motherboard.
8Gb DDR3 Ram.
PCI-Express 4 port SATA III Controller Card.
4 Hitachi Ultrastar 7K3000 2Tb SATA Hard Drives in a raid1z, total storage available 5.61Tb.
320Gb SATA HD for OMV OS. 1Tb SATA Hard Drive for Backups.

User avatar
Nostalgist92
experienced User
experienced User
Posts: 100
Joined: 09 Feb 2013 00:04
Status: Offline

Re: [HOWTO] Install Owncloud inside a Jail

Post by Nostalgist92 »

I'll see if i have time to create a new thread, maybe over the weekend at some point. All the steps are essentially the same but it won't hurt to have an updated thread with the working script easily found.

Yes, the mysql service can be started manually but starting it manually may not fix your problem. An error from your logs would be helpful if a manual startup of mysql doesn't do the job. The log file is located here by default:
/var/db/mysql/*.local.error
* being your jails hostname generally.

To start MySQL manually:
/usr/local/etc/rc.d/mysql-server start

To stop it:
/usr/local/etc/rc.d/mysql-server stop
11.0.0.4 - Sayyadina (revision 3330) x64-full on Intel(R) Core(TM) i7-4820K CPU @ 4.20GHz | Corsair Vengeance Pro 64GB (4x8GB) CMY16GX3M2A1600C9 | 12 x 6TB WD RED RAIDZ2 + 2 x 256GB SSD Drives

HeinzHeinze
NewUser
NewUser
Posts: 14
Joined: 19 Jul 2015 18:09
Status: Offline

Re: [HOWTO] Install Owncloud inside a Jail

Post by HeinzHeinze »

Thank you Nostalgist92 for the quick respons.

Unfortunately posting the error log faild due to ACL restrictions of that file.

Trying to start mySQL manually faild too. Getting Output:

Code: Select all

root@ownCloud:/ # /usr/local/etc/rc.d/mysql-server start
Starting mysql.
su: unknown login: mysql
/usr/local/etc/rc.d/mysql-server: WARNING: failed to start mysql
Did I simply mess up with user login during mySQL installation?

Unfortunately I will only be able to go on in this next week, because I am starting on a little trip right now. But hopefully we can solve this in a few days then.

regards

User avatar
Nostalgist92
experienced User
experienced User
Posts: 100
Joined: 09 Feb 2013 00:04
Status: Offline

Re: [HOWTO] Install Owncloud inside a Jail

Post by Nostalgist92 »

Sure thing just hit up the thread when you're good to go again, fun trip i hope.

The script is pretty much idiot proof so i don't think you could of done anything wrong throughout the install process but just take a look in this file in your jail:
/etc/passwd

In this file you should see something along the lines of:
mysql:*:88:88:MySQL Daemon:/var/db/mysql:/usr/sbin/nologin

Also check /etc/group for
mysql:*:88:

If you don't have these in both files then something had a tantrum and didn't do it's job lol. You can create the user and group pretty easily. Just ssh in to the jail and run these 2 following commands (one at a time):

Code: Select all

echo 'mysql:*:88:' >> /etc/group

adduser
Follow the 'adduser' prompts and fill out to match the following (Just press enter/return for the parts with empty values):

Code: Select all

root@OwnCloud:/ # adduser
Username: mysql
Full name: mysql
Uid (Leave empty for default): 88
Login group [mysql]: mysql
Login group is mysql. Invite mysql into other groups? []:
Login class [default]:
Shell (sh csh tcsh nologin) [sh]: nologin
Home directory [/home/mysql]: /var/db/mysql
Home directory permissions (Leave empty for default):
Use password-based authentication? [yes]: no
Lock out the account after creation? [no]:
Username   : mysql
Password   : <disabled>
Full Name  : mysql
Uid        : 88
Class      :
Groups     : mysql
Home       : /var/db/mysql
Home Mode  :
Shell      : /usr/sbin/nologin
Locked     : no
OK? (yes/no): yes
adduser: INFO: Successfully added (mysql) to the user database.
Add another user? (yes/no): no
Goodbye!
root@OwnCloud:/ #
Once you are done stop/start the jail to be on the safe side and check if mysql is running.
You can do an easy check with:

Code: Select all

/usr/local/etc/rc.d/mysql-server status
It should be running, if not try the start command. If it fails again post the most recent part of the log from that particular startup and we can go from there. Just copy/paste in to a [ code] box if you need to.
11.0.0.4 - Sayyadina (revision 3330) x64-full on Intel(R) Core(TM) i7-4820K CPU @ 4.20GHz | Corsair Vengeance Pro 64GB (4x8GB) CMY16GX3M2A1600C9 | 12 x 6TB WD RED RAIDZ2 + 2 x 256GB SSD Drives

HeinzHeinze
NewUser
NewUser
Posts: 14
Joined: 19 Jul 2015 18:09
Status: Offline

Re: [HOWTO] Install Owncloud inside a Jail

Post by HeinzHeinze »

Hi Nostalgist92

Yes, was a fun trip, kind of... visitting 2 weddings on one weekend. :shock:

Nostalgist92 wrote:
/etc/passwd

In this file you should see something along the lines of:
mysql:*:88:88:MySQL Daemon:/var/db/mysql:/usr/sbin/nologin

Also check /etc/group for
mysql:*:88:
You were right, mySQL was not added as a user.
With your detailed instructions on how to add this, it worked like a charm. Thanks alot. I got ownCloud now running in a jail.

Only trouble left is the extended storage app of ownCloud doesn't mount the local zfs-datasets properly (seeing folders, but can't access). But I guess I should turn to the ownCloud forum in that case? (Or does some one have the same problem?)

Again,thanks for your help

User avatar
Nostalgist92
experienced User
experienced User
Posts: 100
Joined: 09 Feb 2013 00:04
Status: Offline

Re: [HOWTO] Install Owncloud inside a Jail

Post by Nostalgist92 »

Great to hear you got it working.

You could head over that way and make a post about it but i'll see if i can help at all in the meantime.
Can you elaborate on the "can't access" bit, are you getting any error messages or anything? (Checking the owncloud log may be helpful here)
The first thing i would look at is the permissions set on the dataset folder itself and make sure the appropriate read/write permissions are set.
Check this using WinSCP to make life easy.

Some other things i'd probably check:

Is the dataset set up correctly in the jail configuration?
I tend to just use the fstab for mounting instead of the "ZFS dataset, mounted to jail" option with thebrig.
Here's an example of the fstab entry out of my jail, it mounts my music/videos etc. as read only in to the owncloud jail

/mnt/Storage/Media /mnt/Storage/System/Jails/OwnCloud/mnt/Media nullfs ro 0 0

I then created the folder named "Media" in the owncloud jail (mounting wont if you don't create a folder with the name of where you are mounting)
Start up the jail -> Log in to OwnCloud -> Click my username at the top right -> Click "Admin" -> Find external Storage -> Set "Folder Name" as "Media" -> External Storage set to "Local" -> "/mnt/Media" as the Config -> Set groups i want to be able to access the share.

If any of this was confusing at all i'll take some screenshots and post them so you can have a peek at them.
11.0.0.4 - Sayyadina (revision 3330) x64-full on Intel(R) Core(TM) i7-4820K CPU @ 4.20GHz | Corsair Vengeance Pro 64GB (4x8GB) CMY16GX3M2A1600C9 | 12 x 6TB WD RED RAIDZ2 + 2 x 256GB SSD Drives

HeinzHeinze
NewUser
NewUser
Posts: 14
Joined: 19 Jul 2015 18:09
Status: Offline

Re: [HOWTO] Install Owncloud inside a Jail

Post by HeinzHeinze »

Hi again,
and thank you for your patience.

I played alround a bit and did a test installation of owncloud on the native webserver of N4F and the included SQLite installation of ownCloud.
No problem to mount the folder there. Al rights set properly.
So this is definitely an issue of handing over the folder to the jail.
Nostalgist92 wrote: Some other things i'd probably check:

Is the dataset set up correctly in the jail configuration?
I tend to just use the fstab for mounting instead of the "ZFS dataset, mounted to jail" option with thebrig.
Here's an example of the fstab entry out of my jail, it mounts my music/videos etc. as read only in to the owncloud jail

/mnt/Storage/Media /mnt/Storage/System/Jails/OwnCloud/mnt/Media nullfs ro 0 0
"Tried the ZFS dataset" mounting option before and now also tried your suggestion with the fstab.
In both cases my jail doen't start correctly anymore. Got no jail IP/ID afterwards and can't access to ownCloud.

Don't know what's going wrong?

When I do neiher of both mount ways and got ownCloud running in the jail, I tried mounting from inside ownCloud. I simply entered the path to the folder there like: /mnt/pool/Datafolder. I got the green dot, saying owncloud found the folder. But when I want to access, I just get thrown back to the home directory of ownCloud without any message or warning.
Found this output in ownCloud error log related to the folder to mount:

Code: Select all

Error	PHP	filesize(): stat failed for /mnt/pool1/Datenschleuder/ at /usr/local/www/owncloud/lib/private/largefilehelper.php#196	2015-08-19T16:19:20+00:00

Error	PHP	stat(): stat failed for /mnt/pool1/Datenschleuder/ at /usr/local/www/owncloud/lib/private/files/storage/local.php#123	2015-08-19T16:19:20+00:00

Error	PHP	Array to string conversion at /usr/local/www/owncloud/lib/private/template/functions.php#36	2015-08-19T16:19:09+00:00
Any ideas?
By the way: Every time I do some changes in the jail and then save the changes, I have to readd mySQL as a user like you showed before.

User avatar
Nostalgist92
experienced User
experienced User
Posts: 100
Joined: 09 Feb 2013 00:04
Status: Offline

Re: [HOWTO] Install Owncloud inside a Jail

Post by Nostalgist92 »

If you have stopped your jail and tried starting it again and got the "no ip or id" problem afterwards, winscp in to your nas and head to /var/run (note: not in your jail directory) and check to see if you have a file called "jail_yourowncloudjailname.id" here. If you do, delete that file and head back to your webgui and try starting the jail again. It should start up correctly this time.

As for the errors you're getting i can't say i know what it is off the top of my head but i'll have a look around. But check for that file in /var/run first and see how you go with that + fstab entry.
11.0.0.4 - Sayyadina (revision 3330) x64-full on Intel(R) Core(TM) i7-4820K CPU @ 4.20GHz | Corsair Vengeance Pro 64GB (4x8GB) CMY16GX3M2A1600C9 | 12 x 6TB WD RED RAIDZ2 + 2 x 256GB SSD Drives

HeinzHeinze
NewUser
NewUser
Posts: 14
Joined: 19 Jul 2015 18:09
Status: Offline

Re: [HOWTO] Install Owncloud inside a Jail

Post by HeinzHeinze »

Ok, found some time on the weekend and did a hole new setup.
Doing this with some patience, I got every thing now runnig.

Must have missed something in former settups I can't recall.

Thanks again for the Help Nostalgist

Post Reply

Return to “Jails”