Help! /var /www/ deleted

I accidentally logged me of sftp on my WD My Cloud, and deleted the www folder completely.
The web interface is now no longer available and I can no longer through putty log. On the data I can access via Samba still.
What can I do now?
Sorry for my bad English!


Sorry to hear that.

Does resetting the unit make any changes?

If you haven’t try that, please do a 4 seconds reset using the physical button on the back of the unit and try to create the share again.

Surely a Factory Restore would be warranted over a normal reset. Can’t see how a reset is going to restore deleted files. Factory Restore requires 40 second hold of the reset button.

Can’t see how a reset is going to restore deleted files.

It all depends on how those deleted files are created; are they part of the firmware image, or are they created by the startup of the Apache web server (I’m assuming those files are associated with Apache)? (I don’t know; I guess you could check the firmware image file).

If the former, then neither reset nor Factory Restore will recreate them (as they would be part of the downloaded firmware image, and I don’t think any Factory Restore re-installs the firmware image).

If the latter, then either 4 second reset, or 40 second System Only Factory Restore may restart the Apache server and re-create the files.

BTW, we need to be careful when discussing ‘Factory Restore’, as there are three versions, with big differences if you want to retain your data…

Escalating actions:
4 second reset (clears admin password, set IP to DHCP, retains all user data)
40 second power-up reset/System Only Factory Restore (clears user accounts, retains all user data)
Quick Factory Restore (deletes all user data)
Full Factory Restore (deletes and overwrites all user data)

See p64 of the User Manual.

I would reinstall the firmware. Found this from a previous post.

if you can ssh in, yes you can force a firmware reload.

See my post in this thread

Key script to run:


That was going to be my first suggestion. But then I spotted:

“I can no longer through putty log”…

I couldn’t remember the name of the firmware update script, so that’s a nice reminder…