@anonymous-piwik-user opened this issue on June 1st 2012

Since version 1.2 or so, I've experienced permission problems that keep me from using the automatic update feature. I assume this is due to some setting my host has in place.

To update, I download the zip file, then copy my config over. However, after I set this up, I always have a permission problem, and get a screen something like the following:

Piwik couldn't write to some directories.

Try to Execute the following commands on your server:

chown -R www-data:www-data /f5/mysite/public/piwik8
chmod -R 0755 /f5/mysite/public/piwik8/tmp/
chmod -R 0755 /f5/mysite/public/piwik8/tmp/templates_c/
chmod -R 0755 /f5/mysite/public/piwik8/tmp/cache/
chmod -R 0755 /f5/mysite/public/piwik8/tmp/assets/
chmod -R 0755 /f5/mysite/public/piwik8/tmp/tcpdf/

If this doesn't work, you can try to create the directories with your FTP software, and set the CHMOD to 0755 (or 0777 if 0755 is not enough). To do so with your FTP software, right click on the directories then click permissions.

Then I try to chmod these, but don't have sufficient permissions on my server---so every time I update, I need to email my host and ask to have these files repermissioned to the web user. I don't know who the default current owner is, but having a default that requires I contact my host does make updating slow and arduous.

Is there any way these files can be permissioned to the correct owner by default, with whatever permissions they need to function correctly? Keywords: permissions, install

@mattab commented on June 3rd 2012

The files should be owned by your web user and have chmod 755 so that automatic update works and you don't need to run any command.

Does the auto update work andreplaces all files and then you get this message?

@anonymous-piwik-user commented on June 3rd 2012

I'm unable to use auto-update, when I try, I get the following:

"There is a new version of Piwik available for update

Piwik is unable to overwrite your current installation. You can either fix the directory/file permissions, or download the package and install version 1.8.1 manually: "

...but again, that's probably a host issue I assume we can do nothing about. Certainly something for a different ticket.

But back to this---when I install a new piwik installation from

git clone git://github.com/piwik/piwik.git

I notice there is no tmp/ folder at all---I always have to create one and chmod it myself, and that seems to be the problem, I assume if /tmp were a part of the installation, with the web user as owner and 755 permissions, it would work OK?

@anonymous-piwik-user commented on June 3rd 2012

Replying to mittenchops:

I'm unable to use auto-update, when I try, I get the following:

"There is a new version of Piwik available for update

Piwik is unable to overwrite your current installation. You can either fix the directory/file permissions, or download the package and install version 1.8.1 manually: "

...but again, that's probably a host issue I assume we can do nothing about. Certainly something for a different ticket.

But back to this---when I install a new piwik installation from

git clone git://github.com/piwik/piwik.git

I notice there is no tmp/ folder at all---I always have to create one and chmod it myself, and that seems to be the problem, I assume if /tmp were a part of the installation, with the web user as owner and 755 permissions, it would work OK?

It looks like downloading latest.zip does have the /tmp directory that the git repo does not have. And the permissions are...

drwxr-xr-x

which I believe is 755.

But the subdirectories templates/ cache/ assets/ and tcpdf/ do not exist, and neither the user nor the group is 'web' or 'www-data', but instead is the same numbered owner as all the other directories.

@mattab commented on June 3rd 2012

But the subdirectories templates/ cache/ assets/ and tcpdf/ do not exist, and neither the user nor the group is 'web' or 'www-data', but instead is the same numbered owner as all the other directories.

They should be created automatically you just need give WRITE access to /tmp/ and piwik will create automatically

@anonymous-piwik-user commented on June 3rd 2012

Can this be addressed so that the tmp folder has the correct permissions and owner upon creation, instead of something the user has to do manually?

This issue was closed on June 3rd 2012
Powered by GitHub Issue Mirror