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

Integrity Check wants to delete whole piwik directory #12290

Closed
Kukitom opened this issue Nov 20, 2017 · 18 comments · Fixed by #12323
Closed

Integrity Check wants to delete whole piwik directory #12290

Kukitom opened this issue Nov 20, 2017 · 18 comments · Fixed by #12323
Assignees
Labels
Bug For errors / faults / flaws / inconsistencies etc. Regression Indicates a feature used to work in a certain way but it no longer does even though it should.
Milestone

Comments

@Kukitom
Copy link

Kukitom commented Nov 20, 2017

This is shown me on the configure Site:

Unexpected directories were found in your Piwik installation.
-> Please delete these directories to avoid mistakes. <-

Directory to delete: sr / www / users /xxx / xxx / piwik

To delete all these directories at once, you can execute the following command:
rm -Rf


So it does means i must Delete PIWIK

Es wurden unerwartete Verzeichnisse in deiner Piwik-Installation gefunden.
--> Bitte lösche diese Verzeichnisse, um Fehler zu vermeiden. <--

Zu löschendes Verzeichnis: sr/www/users/bloggi/wsi-design/piwik

Um alle diese Verzeichnisse auf einmal zu löschen, kannst du folgenden Befehl ausführen:
rm -Rf

@Findus23
Copy link
Member

That's definitely an error. You shouldn't delete the piwik folder.

@Kukitom
Copy link
Author

Kukitom commented Nov 20, 2017

OK so i wait whats come in next Update. Hope no other user do it.

Thanks

@Findus23
Copy link
Member

In the meantime you can maybe help us find out why this happens on your systems and not on other.

Is this the only directory/file the check complains about?
What operating system are you using for the server? On what filesystem are the files? Is there anything "unusual" about your setup?

@Findus23 Findus23 changed the title i must delete Piwik ??? Integrity Check wants to delete whole piwik directory Nov 20, 2017
@Kukitom
Copy link
Author

Kukitom commented Nov 20, 2017

First sorry i will be help but my english is to bad so i don't understand all.
this the only directory/file the check complains about. i only take the beta-update automatic.
All updates run without any problems. i always look after update and check complains.

here are my server systems:
Piwik-Version: 3.2.1-b1
MySQL-Version: 5.5.58
PHP-Version: 7.0.25

@fdellwing
Copy link
Contributor

Please post the output of:

uname -a
lsb_release -a
df -h
mount -l

@Kukitom
Copy link
Author

Kukitom commented Nov 24, 2017

I don't know what you mean. I can't work with console or terminal. Sorry

@fdellwing
Copy link
Contributor

Than it will be hard to find any clue about why piwik wants to delete the whole directory.

@mpaolo
Copy link

mpaolo commented Nov 27, 2017

same issue here:

Linux mysite.com 4.4.8-xxxx-grs-ipv6-64 #8 SMP Tue Apr 26 16:44:58 CEST 2016 x86_64 GNU/Linux

No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 8.9 (jessie)
Release: 7
Codename: jessie

Filesystem Size Used Avail Use% Mounted on
/dev/root 20G 2.9G 16G 16% /
/dev/sda2 1.8T 35G 1.7T 3% /var

/dev/sda1 on / type ext4 (rw,relatime,errors=remount-ro,data=ordered) [/]
/dev/sda2 on /var type ext4 (rw,relatime,data=ordered) [/var]

Piwik 3.2.1-b1

Also, the integrity check reports

File size mismatch: /var/www/piwik/vendor/geoip/geoip/src/geoip.inc

that's because I had to mod it enclosing a number of functions with
if (!function_exists('...
because piwik crashed on update with a number of error in log like
PHP Fatal error: Cannot redeclare geoip_country_name_by_name_v6() in /var/www/piwik/vendor/geoip/geoip/src/geoip.inc on line 1615

@Findus23
Copy link
Member

@mpaolo
Regarding the last error you may want to look at #12291

@mpaolo
Copy link

mpaolo commented Nov 27, 2017

@Findus23 yep, thank you

@fdellwing
Copy link
Contributor

Well your filesystem looks like every other modern ext4 mount. The only things outstanding are the relatime and the data=ordered which are default for ext4 for quite some time now.

@mpaolo
Copy link

mpaolo commented Nov 28, 2017

guess bug is around here

    foreach (self::getPathsToInvestigate() as $file) {
        $file = substr($file, 2); // remove starting characters ./ to match format in manifest.inc.php

as the install dir (/var/www/piwik = PIWIK_DOCUMENT_ROOT) itself should be removed/skipped as it's not included in manifest.inc.php for the check, so it should be dropped here:

protected static function getPathsToInvestigate()
{
    $filesToInvestigate = array_merge(
    // all normal files
        Filesystem::globr(PIWIK_DOCUMENT_ROOT, '*'),
        // all hidden files
        Filesystem::globr(PIWIK_DOCUMENT_ROOT, '.*')
    );
    return $filesToInvestigate;
}

where $filesToInvestigate returns stuff that in $file above become like

file: ar/www/piwik/archives
dirname: ar/www/piwik
file: ar/www/piwik/bower.json
dirname: ar/www/piwik
file: ar/www/piwik/archives
dirname: ar/www/piwik

etc

ar/www/piwik/bower.json

@fdellwing
Copy link
Contributor

That would explain why it wants to delete sr/... instead of the correct /usr/....

@fdellwing
Copy link
Contributor

The logical conclusion would be to revert #12022 and find another fix for #11731

@mpaolo
Copy link

mpaolo commented Nov 28, 2017

perhaps just doing a chdir(PIWIK_DOCUMENT_ROOT) before generating the list?

@mpaolo
Copy link

mpaolo commented Nov 28, 2017

trying that I get

Directory to delete: themes
Directory to delete: vendor/mnapoli
Directory to delete: vendor/tecnick.com

for dirs and

File to delete: config/config.ini.sample.php
File to delete: config/global.ini.auto-backup-before-update.php
File to delete: lang/am.php
File to delete: lang/ar.php
... lot others lang/*.php
File to delete: misc/GeoLite2-City.mmdb
File to delete: misc/cron/archive.windows.ps1
File to delete: misc/others/crossdomain.xml
File to delete: misc/others/generateDoc.bat
File to delete: misc/others/generateDoc.sh
File to delete: misc/others/iframeWidget.htm
File to delete: misc/others/phpdoc-config.ini
File to delete: misc/others/test_cookies_GenerateHundredsWebsitesAndVisits.php
File to delete: misc/others/test_generateLotsVisitsWebsites.php
File to delete: misc/others/phpstorm-codestyles/Piwik_codestyle.xml
File to delete: misc/others/phpstorm-codestyles/README.md
File to delete: misc/phpstorm-codestyles/Piwik_codestyle.xml
File to delete: misc/phpstorm-codestyles/README.md
File to delete: misc/proxy-hide-piwik-url/piwik.php
File to delete: libs/bower_components/jquery-ui/ui/.jshintrc
File to delete: vendor/monolog/monolog/.php_cs
File to delete: vendor/pear/archive_tar/.travis.sh
File to delete: vendor/piwik/device-detector/.php_cs
File to delete: vendor/twig/twig/.editorconfig

which seem old/other stuff, i.e. the dirs/files deletion list now seems to make sense (?)

@Kukitom
Copy link
Author

Kukitom commented Dec 2, 2017

Sorry for so late answers. First time i take the terminal.
So here my results:

uname -a
Linux dedi3852.your-server.de 3.16.0-4-amd64 #1 SMP Debian 3.16.43-2+deb8u5 (2017-09-19) x86_64 GNU/Linux

lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 8.9 (jessie)
Release: 8.9
Codename: jessie

df -h
Filesystem Size Used Avail Use% Mounted on
/dev/dm-0 9.8G 362M 8.9G 4% /
udev 10M 0 10M 0% /dev
tmpfs 3.1G 792K 3.1G 1% /run
/dev/dm-1 2.6T 18G 2.5T 1% /usr
tmpfs 7.8G 0 7.8G 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 7.8G 0 7.8G 0% /sys/fs/cgroup
/dev/md0 86M 35M 52M 40% /boot
/dev/mapper/vg-tmp 28G 45M 26G 1% /tmp
/dev/mapper/vg-var 79G 3.3G 72G 5% /var
tmpfs 7.8G 0 7.8G 0% /var/spool/exim/scan
/dev/mapper/vg-vartmp 5.8G 76M 5.4G 2% /var/tmp

mount -l
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime,gid=444,hidepid=2)
udev on /dev type devtmpfs (rw,relatime,size=10240k,nr_inodes=2016496,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,relatime,size=3230344k,mode=755)
/dev/mapper/vg-root on / type ext4 (rw,relatime,errors=remount-ro,data=ordered)
/dev/mapper/vg-usr on /usr type ext4 (rw,relatime,nobarrier,data=ordered,jqfmt=vfsv1,usrjquota=aquota.user)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/lib/systemd/systemd-cgroups-agent,name=systemd)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/net_cls,net_prio type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls,net_prio)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=22,pgrp=1,timeout=300,minproto=5,maxproto=5,direct)
mqueue on /dev/mqueue type mqueue (rw,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime)
/dev/md0 on /boot type ext3 (rw,relatime,stripe=4,data=ordered)
/dev/mapper/vg-tmp on /tmp type ext4 (rw,relatime,nobarrier,data=ordered,jqfmt=vfsv1,usrjquota=aquota.user)
/dev/mapper/vg-var on /var type ext4 (rw,relatime,nobarrier,data=ordered)
tmpfs on /var/spool/exim/scan type tmpfs (rw,nosuid,nodev,noexec,relatime,mode=750,uid=8,gid=8)
/dev/mapper/vg-vartmp on /var/tmp type ext4 (rw,noexec,relatime,nobarrier,data=ordered)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,relatime)

@mattab mattab added the Bug For errors / faults / flaws / inconsistencies etc. label Dec 3, 2017
@sgiehl sgiehl added the Regression Indicates a feature used to work in a certain way but it no longer does even though it should. label Dec 3, 2017
@sgiehl sgiehl self-assigned this Dec 3, 2017
@sgiehl sgiehl added this to the 3.2.1 milestone Dec 3, 2017
@mattab
Copy link
Member

mattab commented Dec 4, 2017

Thank you all for reporting this beta-version issue quickly to us, this was very helpful as we had not seen this issue before. It should be fixed in Piwik 3.2.1-rc1 released just now.

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. Regression Indicates a feature used to work in a certain way but it no longer does even though it should.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants