ZyXEL NSA310S - most recent ownCloud version possible to run

I own a small home NAS/Server - Zyxel NSA310S. Unfortunately, in the official package repository, only the 5.0.8 version is available. Last year I managed to install the 7.x. version, using the method below:

    (Connect to the NSA as root using telnet - you first need to enable 
    in the administrator's webpanel. Then you can run the commands.)
cd /usr/local/zy-pkgs/gui
wget http://download.owncloud.org/community/owncloud-latest.tar.bz2
tar xjvf owncloud-latest.tar.bz2
cp ownCloud/config/config.php owncloud/config/config.php
vi owncloud/config/config.php
    (To set 'version' to the correct value for the downloaded one.)
cd /usr/local/zy-pkgs/gui/owncloud/lib/private
chmod 660 config.php
cd /usr/local/zy-pkgs/gui
mv ownCloud oldCloud
    (Just to be safe, keeping the old original version at hand for now.)
mv owncloud ownCloud
    (Putting the new version in place of the old one. Now only thing needed 
    is to log in as the admin to the web interface and follow the instruction
    shown on screen - voila, new version installed and working.)

Unfortunately, this method does not work at all with the current version of ownCloud. I don't know what has been changed that broke this method of upgrade, nor which version was the last one to work.

Has anyone experimented with ZyXEL NSA's? Or has any idea which version of the ownCloud might work with this device?

I use the newest version of the firmware - 4.75.


Solution 1:

I did some experimenting, and I found out that the installation method I mentioned in the original question works with the 8.0.10. Or at least - it partially works - the application only worked after I executed

chmod -R 777 /usr/local/zy-pkgs/gui/ownCloud

as a last step. Without this I was getting a blank page. Of course I highly discourage doing this as this allows anyone to read, run or edit any file in the directory, which is a serious security breach.

Currently I'm experimenting with the ownCloud built-in upgrade tool, to see how much will it allow me to upgrade the application, then I'll try installing the highest working version manually, and I'll try finding the file that needs some special attention when it comes to permissions.

Update: The ownCloud successfully updated to 8.0.13. Now the updater suggests upgrading to 8.1.8. Trying it now.

Update 2: Version 8.1.8 doesn't work, trying to open it in the browser fails - a blank page is shown. Chmod'ing the ownCloud directorry to 777 doesn't change anything. The 8.0.13 is probably the newest version that can work on these devices, and for now I'll stick with it.

Update 3: Version 8.0.13 can't be installed using this method (blank page despite chmod'ing whole directory to 777). The only possible way to get 8.0.13 up and running seems to be installing 8.0.10 and then upgrading using the built-in tool.

Update 4: I managed to get version 8.0.13 work from clean install after chown'ing the ownCloud directory to root:root and chmod'ing it to og+rw (I know it's probably not an optimal solution from security standpoint, but that's still way better than 777). Then I updated it succesfully to 8.0.13 using the built-in updater. The whole process of installing the new version on the device is as follows:

    (Connect to the NSA as root using telnet - you first need to enable 
    in the administrator's webpanel. Then you can run the commands.)
cd /usr/local/zy-pkgs/gui
wget https://download.owncloud.org/community/owncloud-8.0.13.tar.bz2
tar xjvf owncloud-8.0.13.tar.bz2
cp ownCloud/config/config.php owncloud/config/config.php
vi owncloud/config/config.php
    (To set 'version' to the correct value for the downloaded one - 8.0.13 in this case)
mv ownCloud oldCloud
    (Just to be safe, keeping the old original version at hand for now.)
mv owncloud ownCloud
    (Putting the new version in place of the old one.)
chown -R root:root ownCloud
    (Changing ownership to root:root, the way original ZyXEL apps are)
chmod -R uog+rw ownCloud
    (Giving permission to read and write the files to the system users,
    this is needed, because otherwise the app won't work - an empty 
    page will be shown.)

    Next step is opening the app in browser, by visiting 
    http://nsa's_ip/pkg/ownCloud and following the instructions 
    displayed on screen. Feel free to remove the oldCloud directory if
    everything worked fine. To do this run the command:
    rm -rf oldCloud

DO NOT update to 8.1.X or newer, it will not work on these devices - blank page will be displayed.

Update 5: I have tested the current version (8.0.14) - both the update from 8.0.13 and the clean install process based on the one shown above work. The application is running cleanly and reliably. Still no luck on 8.1.x though.

Solution 2:

I would have loved to comment but I could not as I do have a to low reputation but I want to thank Jakub for his excellent description and add some things that may be of use to others.

I own a NSA325-v2 from Zyxel and got stuck with OwnCloud 7.0.3. I used Jakubs great tutorial and could update to 8.0.13. For anyone looking for a fine granular version backup: here is a good link FullVersion History of OwnCloud

Just some additions (for the NSA325-v2):

  • You must check if Telnet is enabled before connecting
  • I could not use wget to download from an https site, so I downloaded it manually and transferred it with SSH using WinSCP
  • I had to go to packages > look for ownCloud and disable it before update and re-enable it before logging in to NasIP/pkg/ownCloud
  • Most important difference: You must "copy" the folder /usr/local/zy-pkgs/gui/oldCloud/data to .../ownCloud/data preserving access rights and group assignments prior to starting the package again.

After that success I upgraded to 8.0.16 sucessfully (using exactly the same approach).

After that I upgraded to 8.1.12 successfully but I had to add the line "'trusted_domains' => array ('nsa325-v2' )," to config.php before I could log in.

However: When trying to upgrade to 8.2.11 using the OwnCloud build in internal updater everything the update seems to work, but when logging in OwnCloud starts to complain about missing PHP module CURL and I could not install this, yet.