Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default permissions are troublesome in /tmp #3166

Closed
anonymous-matomo-user opened this issue Jun 1, 2012 · 6 comments
Closed

Default permissions are troublesome in /tmp #3166

anonymous-matomo-user opened this issue Jun 1, 2012 · 6 comments
Labels
Bug For errors / faults / flaws / inconsistencies etc. wontfix If you can reproduce this issue, please reopen the issue or create a new one describing it.
Milestone

Comments

@anonymous-matomo-user
Copy link

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
Copy link
Member

mattab commented Jun 3, 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-matomo-user
Copy link
Author

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-matomo-user
Copy link
Author

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
Copy link
Member

mattab commented Jun 3, 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-matomo-user
Copy link
Author

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?

@anonymous-matomo-user anonymous-matomo-user added this to the 1.12.x - Piwik 1.12.x milestone Jul 8, 2014
@mattab mattab added the wontfix label Aug 3, 2014
@mattab
Copy link
Member

mattab commented Jul 8, 2019

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc. wontfix If you can reproduce this issue, please reopen the issue or create a new one describing it.
Projects
None yet
Development

No branches or pull requests

2 participants