Skip to content

OS3 tricks

Stefaan Ghysels edited this page Nov 6, 2019 · 3 revisions

Reboot issues

A My Cloud device with a lot of services running may get stuck when trying to reboot. This is due to the custom reboot script on the NAS sometimes failing to stop all these services. It may also fail to unmount the main volume, cancelling the reboot.

You can bypass this custom reboot script with busybox to do a forced reboot.

busybox reboot

On the next boot the NAS usually runs a file system check (due to unclean reboot). Access to the web interface and 3rd party applications are started after the file system check, but SSH access is available.

This fsck may take a while

ps w | grep e2fsck

Secure downloads with wget

The firmware ships without ca certificates (or outdated certs) and uses wget --no-check-certificate too often. Use secure downloads by installing the mozilla ca bundle.

curl --remote-name --time-cond cacert.pem https://curl.haxx.se/ca/cacert.pem
mv cacert.pem /etc/ssl/cert.pem

Public access to WD web

Normally, the WD web interface is only available in the local network. In the apache webserver configuration, there are filters restricting access to the current subnet. There is a button in the web GUI to enable remote access.

Alternatively, run this script to remove the access restrictions.

#!/bin/sh

CONFIG=/usr/local/apache2/conf/httpd.conf
sed -i -e '/<RequireAny>/{N;N;N;d}' $CONFIG

kill -HUP $(pidof httpd)

Note that you may need to portforward 80/443 in your router (and be aware of the security impact!)

Disable HTTPS for WD web

I prefer running a more up-to-date version of nginx instead of apache. I'm using apache for the WD firmware only on port 80 (not portforwarded in the router) and nginx for my own projects on https port 443 (portforwarded in my router).

TODO: add script

Manage timezones

Get the current date

date

Get the current date in universal time (UTC)

date -u

List available timezones

ls /usr/sbin/zoneinfo/

Change the timezone

unlink /etc/localtime
ln -s /usr/sbin/zoneinfo/Amsterdam /etc/localtime