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

Don't tell people to run chmod -R 755 on their install if update fails #13628

Closed
fdellwing opened this issue Oct 18, 2018 · 3 comments · Fixed by #14412
Closed

Don't tell people to run chmod -R 755 on their install if update fails #13628

fdellwing opened this issue Oct 18, 2018 · 3 comments · Fixed by #14412
Assignees
Labels
c: Security For issues that make Matomo more secure. Please report issues through HackerOne and not in Github. Help wanted Beginner friendly issues or issues where we'd highly appreciate community's help and involvement.
Milestone

Comments

@fdellwing
Copy link
Contributor

Related to #13626

Please don't tell people to run chmod -R 755 /var/www/piwik. This will make all the files executable by everyone.

Either use chmod -R 754 /var/www/piwik (the easy solution) or find /var/www/piwik -type d -exec chmod 755 {} \; (the good solution).

@Findus23 Findus23 added the c: Security For issues that make Matomo more secure. Please report issues through HackerOne and not in Github. label Oct 18, 2018
@Findus23 Findus23 added the Help wanted Beginner friendly issues or issues where we'd highly appreciate community's help and involvement. label Oct 20, 2018
@mattab
Copy link
Member

mattab commented Nov 13, 2018

Thanks for the suggestion: pull request welcome @fdellwing

@fdellwing
Copy link
Contributor Author

@mattab There is a PR for this: #13630

@Findus23
Copy link
Member

See also #4046

@mattab mattab added this to the 3.10.0 milestone Mar 18, 2019
tsteur added a commit that referenced this issue May 5, 2019
fix #13628

For not writable directory it generated eg this:
```
chown -R foo:localaccounts /var/www/matomo
find /var/www/matomo/tmp -type f -exec chmod 644 {} \;
find /var/www/matomo/tmp -type d -exec chmod 755 {} \;
```

for auto update it also adds execute permission for `console`

```
chmod 755 /var/www/matomo/console
```

Not sure if any other file needs permission to execute? Couldn't think of any right now. Of course the find commands above they don't change the permission of any symlinks or so. Not sure what users possibly have in there and if it could create some issue. Could extend the find command to something like `-type f or -type l`.

Also generally not sure if `find` is compatible like this on all *nix.

@Findus23 maybe any thoughts?
@tsteur tsteur self-assigned this May 5, 2019
diosmosis pushed a commit that referenced this issue May 17, 2019
#14412)

fix #13628

For not writable directory it generated eg this:
```
chown -R foo:localaccounts /var/www/matomo
find /var/www/matomo/tmp -type f -exec chmod 644 {} \;
find /var/www/matomo/tmp -type d -exec chmod 755 {} \;
```

for auto update it also adds execute permission for `console`

```
chmod 755 /var/www/matomo/console
```

Not sure if any other file needs permission to execute? Couldn't think of any right now. Of course the find commands above they don't change the permission of any symlinks or so. Not sure what users possibly have in there and if it could create some issue. Could extend the find command to something like `-type f or -type l`.

Also generally not sure if `find` is compatible like this on all *nix.

@Findus23 maybe any thoughts?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: Security For issues that make Matomo more secure. Please report issues through HackerOne and not in Github. Help wanted Beginner friendly issues or issues where we'd highly appreciate community's help and involvement.
Projects
None yet
4 participants