title: Accidentally changed permissions for entire server on Ubuntu: sudo chown -R www-data:www-data /
body: <p>I accidentally ran the following command on my Debian 8.0 webserver as root:</p>
  
  <p><code>sudo chown -R www-data:www-data /</code></p>
  
  <p>thinking that it would only change permissions of the directory I am currently in.</p>
  
  <p>Instead it messed with the whole server. Is there any way I can correct this? At the moment I cannot access my website any longer.</p>
  
  <p>Please help!</p>
  
  <p>Edit: What I mainly need to do is get mysql running so I can get my database.</p>
  
  <p><code>systemctl status mysql.service</code> outputs:</p>
  
  <pre><code>May 25 22:19:22 vps27276.alfahosting-vps.de mysqld[21178]: 200525 
  22:19:22 [ERROR] InnoDB: The system tablespace must be writable!
  May 25 22:19:22 vps27276.alfahosting-vps.de mysqld[21178]: 200525 
  22:19:22 [ERROR] Plugin 'InnoDB' init function returned error.
  May 25 22:19:22 vps27276.alfahosting-vps.de mysqld[21178]: 200525 
  22:19:22 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
  May 25 22:19:22 vps27276.alfahosting-vps.de mysqld[21178]: 200525 
  22:19:22 [Note] Plugin 'FEEDBACK' is disabled.
  May 25 22:19:22 vps27276.alfahosting-vps.de mysqld[21178]: 200525 
  22:19:22 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
  May 25 22:19:22 vps27276.alfahosting-vps.de mysqld[21178]: 200525 22:19:22 [ERROR] Unknown/unsupported storage engine: InnoDB
  May 25 22:19:22 vps27276.alfahosting-vps.de mysqld[21178]: 200525 22:19:22 [ERROR] Aborting
  May 25 22:19:22 vps27276.alfahosting-vps.de mysqld[21178]:
  May 25 22:19:22 vps27276.alfahosting-vps.de mysqld[21178]: 200525 22:19:22 [Note] /usr/sbin/mysqld: Shutdown complete
  </code></pre>