[How-To] ownCloud using NGINX, PHP-FPM, and MySQL

Michael Sparks

Explorer
Joined
Apr 23, 2014
Messages
56
What am I missing here, I tried updating from 8.2.0 to 8.2.1 via OC settings. I received this error "Update failed.Unable to move /usr/local/www/owncloud/_oc-upgrade/8.2.1.4/core/resources to /usr/local/www/owncloud/resources"

I understand what its saying however when I shell in and try to run the command manually inside the OC jail.
Code:
mv /usr/local/www/owncloud/_oc-upgrade/8.2.1.4/core/resources /usr/local/www/owncloud/resources


I get:
mv: rename /usr/local/www/owncloud/_oc-upgrade/8.2.1.4/core/resources to /usr/local/www/owncloud/resources/resources: No such file or directory.

Are we not able to upgrade via OC webpage?

Thank you!
 

Handle

Dabbler
Joined
Oct 20, 2015
Messages
30
I managed to make the inclusion of samba / cifs shares work. Feel free to include the steps into your guide as I didn't find them anywhere else and I'm sure that it will help some people :)

Pick a folder to put the source files of libsmbclient-php into (I chose /usr/local/src).
Code:
mkdir /usr/local/src
cd /usr/local/src
git clone git://github.com/eduardok/libsmbclient-php.git
pkg install samba36-libsmbclient-3.6.25_2
cd libsmbclient-php ; phpize
./configure --with-libsmbclient=/usr/local
make install clean

Now we need to add the module to the php extensions:
Code:
echo "extension=smbclient.so" >> /usr/local/etc/php/extensions.ini

Warning: Please double check that there are two >, otherwise the file will be truncated. Now we restart php-fpm with
Code:
service php-fpm restart

and we are done. You can now use samba / cifs shares with the External storage support plugin :) Just as a note: When you activate the plugin the autologin feature will be gone. That's not a bug, it is intended.
 
Last edited:

Nucshuco

Explorer
Joined
Aug 22, 2014
Messages
52
What am I missing here, I tried updating from 8.2.0 to 8.2.1 via OC settings. I received this error "Update failed.Unable to move /usr/local/www/owncloud/_oc-upgrade/8.2.1.4/core/resources to /usr/local/www/owncloud/resources"

I understand what its saying however when I shell in and try to run the command manually inside the OC jail.
Code:
mv /usr/local/www/owncloud/_oc-upgrade/8.2.1.4/core/resources /usr/local/www/owncloud/resources


I get:
mv: rename /usr/local/www/owncloud/_oc-upgrade/8.2.1.4/core/resources to /usr/local/www/owncloud/resources/resources: No such file or directory.

Are we not able to upgrade via OC webpage?

Thank you!
I had to clear out the resources folder to get it to work
 

Michael Sparks

Explorer
Joined
Apr 23, 2014
Messages
56

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
I update tp redis with the steps you above. Everything looks ok.
But just another Thing... i have this errror message in the admin screen:

your files will be reacheabel from the internet. The .htacces file doesn't work. It will be strongly recommend to change the webserver configuration or move your document-root-folder away from webserver

Just a translation from german. Hope you can this understand :)

Thany you!
if you followed the guide your datadirectory would be at /mnt/files (instead of the default /usr/local/www/owncloud/data) so this wouldn't be an issue. You should check you did that properly
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
What am I missing here, I tried updating from 8.2.0 to 8.2.1 via OC settings. I received this error "Update failed.Unable to move /usr/local/www/owncloud/_oc-upgrade/8.2.1.4/core/resources to /usr/local/www/owncloud/resources"

I understand what its saying however when I shell in and try to run the command manually inside the OC jail.
Code:
mv /usr/local/www/owncloud/_oc-upgrade/8.2.1.4/core/resources /usr/local/www/owncloud/resources


I get:
mv: rename /usr/local/www/owncloud/_oc-upgrade/8.2.1.4/core/resources to /usr/local/www/owncloud/resources/resources: No such file or directory.

Are we not able to upgrade via OC webpage?

Thank you!
I don't know, I've used the admin page in the past a while ago switched over to using occ. I suggest posting a bug on the owncloud github page.
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
I managed to make the inclusion of samba / cifs shares work. Feel free to include the steps into your guide as I didn't find them anywhere else and I'm sure that it will help some people :)

Pick a folder to put the source files of libsmbclient-php into (I chose /usr/local/src).
Code:
mkdir /usr/local/src
cd /usr/local/src
git clone git://github.com/eduardok/libsmbclient-php.git
cd libsmbclient-php ; phpize
setenv LDFLAGS -L/usr/local/lib
./configure
make install clean

Now we need to add the module to the php extensions:
Code:
echo "extension=smbclient.so" >> /usr/local/etc/php/extensions.ini

Warning: Please double check that there are two >, otherwise the file will be truncated. Now we restart php-fpm with
Code:
service php-fpm restart

and we are done. You can now use samba / cifs shares with the External storage support plugin :) Just as a note: When you activate the plugin the autologin feature will be gone. That's not a bug, it is intended.
awesome! I used to tell people to just install 'samba-libsmbclient' but I have read that using the php library is faster. Maybe we can eventually package that up as a FreeBSD port so people can just install it as an optional dependency.
 

ArgaWoW

Patron
Joined
Jul 4, 2015
Messages
444
if you followed the guide your datadirectory would be at /mnt/files (instead of the default /usr/local/www/owncloud/data) so this wouldn't be an issue. You should check you did that properly
I followed the guide exactly and my file be at /mnt/files/ everything is at it should be. But the error is still there
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
I followed the guide exactly and my file be at /mnt/files/ everything is at it should be. But the error is still there
Hmm, maybe your "deny all" location in the nginx.conf file needs to be looked at. This has been updated in 8.2
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Double post, this forum is causing issues... =/
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Thanks for quick reply Joshua,
would you be so so kind and tell me how to do that, please. I can't follow your thoughts. Sorry [emoji57]
Check the attached part of your /usr/local/etc/nginx/nginx.conf
Specifically lines 24-26
 

Attachments

  • Screenshot from 2015-11-29 01-06-12.png
    Screenshot from 2015-11-29 01-06-12.png
    31.8 KB · Views: 369

ArgaWoW

Patron
Joined
Jul 4, 2015
Messages
444
Check the attached part of your /usr/local/etc/nginx/nginx.conf
Specifically lines 24-26
i have try it but without luck. I have edit my nxinx.conf like posted in this tread to Redirect to ssl with my own Domain. Perhaps i have done the mistake in there but i can't figure out whats wrong. Please find attached my nginx.conf. Perhaps you can find the Problem.

Many thanks for your advice!
 

Attachments

  • nginx.conf.txt
    3 KB · Views: 481

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
I update tp redis with the steps you above. Everything looks ok.
But just another Thing... i have this errror message in the admin screen:

your files will be reacheabel from the internet. The .htacces file doesn't work. It will be strongly recommend to change the webserver configuration or move your document-root-folder away from webserver

Just a translation from german. Hope you can this understand :)

Thany you!
I suggest you remove the /data location block (lines 78-82)
and replace your line 61 with " location ~ ^/(?:\.|build|tests|config|lib|3rdparty|templates|data|autotest|occ|issue|indie|db_|console) {"
 

ArgaWoW

Patron
Joined
Jul 4, 2015
Messages
444
I suggest you remove the /data location block (lines 78-82)
and replace your line 61 with " location ~ ^/(?:\.|build|tests|config|lib|3rdparty|templates|data|autotest|occ|issue|indie|db_|console) {"
if have done so, but the message is still there. and i got the folowing in log:

Cannot modify header information - headers already sent by (output started at /usr/local/www/owncloud/3rdparty/sabre/http/lib/Sapi.php:70) at /usr/local/www/owncloud/3rdparty/sabre/http/lib/Sapi.php#58
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
if have done so, but the message is still there. and i got the folowing in log:

Cannot modify header information - headers already sent by (output started at /usr/local/www/owncloud/3rdparty/sabre/http/lib/Sapi.php:70) at /usr/local/www/owncloud/3rdparty/sabre/http/lib/Sapi.php#58
did you restart nginx after the change? I would search for or post that error message on github. I think that may be a bug application side.
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Yes I did the restart.
ok, I'm not sure what that error is checking for then. You should be safe to ignore it since your data directory isn't under the webroot.
 
Top