owncloud plugin now available in Plugins menu!

Status
Not open for further replies.

PatchDog

Dabbler
Joined
Jun 2, 2014
Messages
22
Login to your FreeNAS (not the jail) and go to /mnt/pool/your_jail_dir/owncloud_1(or whatever is the name of your jail)/usr/pbi/owncloud-amd64/www/owncloud/config (if you are using a plugin if not - /mnt/pool/your_jail_dir/your_jail/ is basically the / of the jail. Go there and then go wherever your owncloud installation is.

OK I got into it. Access denied for some reason. Will have to look at the permissions or turn off the Jail before I make the edit.

Thanks for your help.
 

ClassicGOD

Contributor
Joined
Jul 28, 2011
Messages
145
OK I got into it. Access denied for some reason. Will have to look at the permissions or turn off the Jail before I make the edit.

Thanks for your help.
Try doing this as a root, changing permissions inside of the jail can cause you a lot of problems.
 

PatchDog

Dabbler
Joined
Jun 2, 2014
Messages
22
Try doing this as a root, changing permissions inside of the jail can cause you a lot of problems.

Still getting access denied. Using windows machine to access. Mapped new drive letter with root username password. What other way can you access it as root besides WinSCP?
 

ClassicGOD

Contributor
Joined
Jul 28, 2011
Messages
145
You can try editing the file in CLI. Login to your FreeNas WebGUI go to jails, select your owncloud jail and click CLI icon at the bottom - it should log you in to jail CLI with root. after that do:

ee /usr/pbi/owncloud-amd64/www/owncloud/config/config.php

then go ESC -> leave -> save changes
 

Freesnofla

Patron
Joined
Oct 27, 2013
Messages
216
Well as I already mentioned before do I have trouble with owncloud after the update. I lost 2 users so far and my question is how do I get them back again? Is it enough just to create 2 new users? Or do I need some other action? I asked already the owncloud forum and they asked me that I have to place that question inside the FreeNas forum. Hope really anybody can help me otherwise I'm affraid that I will lose all the data.
 

PatchDog

Dabbler
Joined
Jun 2, 2014
Messages
22
You can try editing the file in CLI. Login to your FreeNas WebGUI go to jails, select your owncloud jail and click CLI icon at the bottom - it should log you in to jail CLI with root. after that do:

ee /usr/pbi/owncloud-amd64/www/owncloud/config/config.php

then go ESC -> leave -> save changes

That worked. I was able to edit the file and put in my trusted domain.
 
Joined
Jun 9, 2014
Messages
2
Thanks to William, we now have an owncloud plugin for FreeNAS - it works very well!

Once you've installed it from the Plugins menu, you can either mount the media you'd like to export using the Jails storage manager onto /media or you can simply let owncloud sequester all the "cloud storage" in its own jail under that directory, in which case all of your cloud files will simply live in the appropriate owncloud plugin subdirectory of the jail root.

Note that if you elect to mount something under /media, those files/directories must be writable as the "www" user running in the jail. For this reason, you might wish to simply let owncloud manage the storage directly and import things into it explicitly. It will manage the permissions appropriately in that case.

To create your owncloud login and set it up, just click on the owncloud plugin icon once it's installed and turned on and follow the link!

Enjoy!


Hi,

I have the plugin installed and can browse the webui fine. I am now trying to add storage from freenas into the Jail.

I have added one storage item source.. "/mnt/storage/music" destination "/media/music1" restarted the jail, restarted the plugin ... nothing new shows up in owncloud ui. there are two directories in the mnt point (artist and compilation).

if i browse to the jail and go to the cli I can ls into the storage (/mnt/storage/music1) and see the directories there.

please help, what am i doing wrong.

as a test I chmod 0777 the /media directory of the jail and still cannot see anything!

D
 

SpiritFly

Dabbler
Joined
Jul 11, 2014
Messages
25
I'd like to install owncloud on my new freenas. I've found a few guides using different servers for it like: nginx and lighttpd which seem to be much lighter. I prefer apache however, but only if I'm able to install other software on it(I may use wordpress, some project management software etc..)

I don't want to run two separate apache services, so my question is whether I will be able to install other software on this same apache that is being installed through this PBI or should I install apache/mysql/php manually on freenas and then owncloud manually too for my goal?
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
You really shouldn't try to repurpose PBIs. It just won't end well because future upgrades will make assumptions that may not be true.
 

ecozturk

Cadet
Joined
Oct 9, 2014
Messages
3
Hello All
I am trying to setup External Storage App in ouwncloud and ran into a couple of issues. I want to use smb and ftp to other NAS boxes. I have figured out how to install smbclient in the jail for the app to connect using smb but when it comes to ftp is shows this error:


External Storage Warning:The FTP support in PHP is not enabled or installed. Mounting of FTP shares is not possible. Please ask your system administrator to install it.

I am newbie when it comes to FreeNAS and PHP but what I have seen that for PHP to use ftp is has to be turned on or compiled in when PHP is installed.

Anyone know how to get this installed correctly or installed in the pbi.

Thanks.
Hi hersh,

Would you happen to have any kind of documentation on how to install smbclient in the jail please ?
Is tere anything specific to know when it comes to Freenas etc. or any doc would be OK ?

cheers
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Hi hersh,

Would you happen to have any kind of documentation on how to install smbclient in the jail please ?
Is tere anything specific to know when it comes to Freenas etc. or any doc would be OK ?

cheers

Not to bash your question, but your question is more of a FreeBSD question. If you search for FreeBSD documentation pertaining to smbclient you will likely be able to find the answer you want.

To be honest, I shudder at the question you are asking because you should be installing things in the jail the same way you update them. So unless you aren't updating the jail (which can be pretty dangerous due to security problems) you may want to stop and spend some time learning about jails and FreeBSD CLI so you can do the basic things like updating the jail. This will do two fold for you; teach you how to maintain the jail and how to install software. ;)
 

ecozturk

Cadet
Joined
Oct 9, 2014
Messages
3
Not to bash your question, but your question is more of a FreeBSD question. If you search for FreeBSD documentation pertaining to smbclient you will likely be able to find the answer you want.

To be honest, I shudder at the question you are asking because you should be installing things in the jail the same way you update them. So unless you aren't updating the jail (which can be pretty dangerous due to security problems) you may want to stop and spend some time learning about jails and FreeBSD CLI so you can do the basic things like updating the jail. This will do two fold for you; teach you how to maintain the jail and how to install software. ;)
Hi,

Thanks for your reply. That's exactly what I was asking : is this a general FreeBSD matter or is it specific to Freenas. And seems it is general :)
I'm quite a noob on FreeBSD and FreeNAS, so i can't yet always figure out the difference between FreeNAS specific subjets and more general matters.

I'll keep reading and learn.

Thanks again :)
 

Zou

Dabbler
Joined
Jul 26, 2014
Messages
12
Hi,

does anyone know the path to OC with this plugin?

Actually I try to do this : http://forum.owncloud.org/viewtopic.php?p=70365#p70365

thanks

Edit : Ok it seems that the path to owncloud inside the jail is : /usr/local/www/owncloud/
Edit 2 : Or maybe /usr/pbi/owncloud-amd64/www/owncloud/ ... :?

Now how to launch the "php" command :/
Edit 3 : Ok I found the php bin folder : /usr/pbi/owncloud-amd64/bin/php . So 2 solutions to use php in command line. Adding it to path variable or simply execute it (./php) in the bin folder.
 
Last edited:

Zou

Dabbler
Joined
Jul 26, 2014
Messages
12
OK so here is how i configure OwnCloud to manage my FreeNAS datas (my aim is to access them from outside my network through OwnCloud)

Here is my setup :
- FreeNAS-9.2.1.9 to share data on my network to different Users (smb/nfs/...)
- I have only one dataset.
- In my dataset I use folders to sort my datas. One folder for Medias, one for Downloads and the last one for Personal Documents (each user will have his own folder in this folder).

Before beginning I want you to know that I'm not a FreeNAS or OwnCloud expert. My solution is probably not the more secure or safe for your data so if you follow my instructions, you do it at your own risk.

Now that you are warned let's begin.

First, be sure that OwnCloud plugin is correctly installed and that the first user has already been created
In order that OwnCloud manages your data, the user "www" must have rwx permissions on desired files and folders

In my case I created a new group called "data". In this group I added the user "www" and all the users who have to access the OC shared datas in rwx permissions.

Now this group must be the "owner group" for files and folders you want that OwnCloud manages.
You can use the -R option to apply recursively the chgrp command to a folder :
#chgrp -R <group> <file or folder path>
in my case : #chgrp -R data MEDIAS

Add the rwx permission to the owner group, again use the -R option to apply recursively the chmod command.
#chmod -R <permission code> <file or folder path>
eg. : #chmod -R 775 MEDIA

Now the permissions are correct go to the Jail shell (Jails -> View Jails -> <Select owncloud_1> -> Shell Button) and add the "data" group with the same GID as in FreeNAS :
#pw groupadd <group name> -g <Desired Group ID>
eg. : #pw groupadd data -g 1200

Then let's add Storage to the Jail. Create a folder in the Jail (eg. "medias") and set the "owner group" to data :
#cd /media/<username>/files/
#mkdir medias
#chgrp data medias
#chmod 775 medias


Config the new jail storage in FreeNAS WebUI (Jails -> Owncloud_1 ->Storage -> Add Storage).
First select your desired FreeNAS Storage. Then select the folder you've juste created in the jail.

Last step, tell OwnCloud to scan for new content.
In the the Jail shell :
#cd /usr/pbi/owncloud-amd64/bin/
#./php ../www/owncloud/console.php files:scan --all

Rem : PHP is not a default command in the Jail so we have to launch it from the bin folder (or add php as default command)
This should be done each time you add a folder in the OC User Root folder (/media/<OC User>/)
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Might be something we look explore in the future. The ownCloud port has an option to depend on mysql instead of sqlite.

You can also partially fill in the owncloud config as documented here. http://doc.owncloud.org/server/7.0/admin_manual/configuration/configuration_automation.html
This would allow us to let people setup owncloud as usual, pick their admin user, but in the backend they are using mysql and don't even know it (they won't be presented with the advanced database option).
This could solve the performance issue alot of owncloud plugin users face.

Finally I also propose we drop a crontab in their for the www user which would trigger owncloud to use system cron instead of trying to run cron.php during page triggers. (another performance boost)

####
I can probably work on the changes needed for this one day (maybe for OC8?) and make a Pull Request, but... I think current owncloud users will not be able to cleanly "upgrade" from sqlite to mysql. So we have to figure out how to deal with that.
 

SpiritFly

Dabbler
Joined
Jul 11, 2014
Messages
25
I'm on the mind to install owncloud on my freenas for quite some time now.

I still can't decide which guide to use: Joshua's - ngnix, DrKK - lighttps or wait until the owncloud pbi plugin gets ironed out and working perfectly?

Any suggestions on the best path to take?
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Hi everyone,
I'm pretty close to completing an update (v8.0.0) of the owncloud plugin. I had a few questions that others may have an opinion on.

Optional Dependencies
Should I include smbclient/ffmpeg/libreoffice? These give additional functionality but make the PBI larger. Including libreoffice doubles the plugin's size from 97MB to 188MB and in my testing with a local plugin repo made updates from OC7 fail with the error "Unable to make a PBI patch"
I'm leaning towards not including these and just telling users to 'pkg install libreoffice' if they want to edit .DOC(X) files.

sqlite vs. mysql
Should the plugin include mysql instead of sqlite?
http://doc.owncloud.org/server/8.0/...mance_tips.html#using-mysql-instead-of-sqlite
This depends on what audience we are targeting. Out of the box MySQL is taking 458MB of RAM.
 
Last edited:
J

jkh

Guest
I think sticking with sqlite is a good idea. mysql adds, as you noted, a lot more overhead for essentially no gain in the case of owncloud (unless there's some snazzy feature it enables that I missed).
 
Status
Not open for further replies.
Top