Piwik creates undeletable files, consequently update fails

(Echte Beratung) #1

Hi there,

I should have been warned when a fresh 0.6.2 install failed due to permission problems, but I wasn’t. Instead, I pulled 0.6.1 from SVN and installed that, which worked.

During installation, Piwik created the folders needed for Smarty in its tmp/ folder. Unfortunately, those files don’t get created as the ftp user and group, but as nobody:nobody. So now when I want to use the auto-updater, it fails with the following error:

Error while copying file to /is/htdocs/wp1192570_7304E6TQI2/www/piwik/plugins/VisitFrequency/templates/index.tpl.
Please check that the web server has enough permission to overwrite this file.
For example, on a linux server, if your apache user is www-data you can try to execute:
chown -R www-data:www-data /is/htdocs/wp1192570_7304E6TQI2/www/piwik
chmod -R 0755 /is/htdocs/wp1192570_7304E6TQI2/www/piwik

I am aware that obviously Apache is set to nobody:nobody, which is why those files get created as such. Unfortunately, it’s impossible to chown the files/folders, and chmodding of course doesn’t work either, as my ftp user isn’t the owner.

I figure as Piwik can obviously write to those files during operation, it should also be able to modify or delete them. The way it is now, I can neither overwrite nor delete the files, which makes both updating and removing it from the web server impossible without invoking (costly) support.

Is there a way of fixing the installer and updater so that I can update?

(That’s what I get for going with a hoster instead of having my own machines in the NOC. style_emoticons/<#EMO_DIR#>/blink.gif )

(Echte Beratung) #2

I could resolve the issue and post the solution here for those who might have the same problem.

To solve the problem, I hunted down a setting buried deep in the admin interface of my hoster (Host Europe) that spelled “Datei-Verwaltung” (File Management in English) which allowed to chmod and chown between my ftp user and groups and nobody. I left the umask as it was, but changed owner and group of the whole piwik directory to nobody (recursively).

Note: This solution has the caveat that I now cannot modify or delete anything in the piwik directory (and the directory itself) via FTP. To allow that, the owner and group must be set back to the ftp user and group respectively. DO NOT set all permissions to 777 as that might have security implications!

Keywords for Germans looking for a solution to the same problem:

Piwik Fehler Update schlägt fehl, Update fehlgeschlagen, Benutzerrechte, Host Europe, nobody:nobody