core icon indicating copy to clipboard operation
core copied to clipboard

Integrity checker: exclude .webapp file

Open GreatEmerald opened this issue 10 years ago • 19 comments

Currently, the integrity checker complains when there is a .webapp file in the root of the OwnCloud installation directory. This file is generated, and required, by the webapp-config tool used to install all web apps on Gentoo.

Steps to reproduce

  1. Install OwnCloud using webapp-config into the root of a subdomain (suggested method):
webapp-config -h cloud.example.com -d / -I owncloud 9.0.0

Expected behaviour

The integrity checker should not complain.

Actual behaviour

The integrity checker gives the following error:

Technical information
=====================
The following list covers which files have failed the integrity check. Please read
the previous linked documentation to learn more about the errors and how to fix
them.

Results
=======
- core
    - EXTRA_FILE
        - .webapp

Raw output
==========
Array
(
    [core] => Array
        (
            [EXTRA_FILE] => Array
                (
                    [.webapp] => Array
                        (
                            [expected] => 
                            [current] => 
                        )

                )

        )

)

Server configuration

Operating system: Gentoo Linux

Web server: nginx 1.8.1

Database: MariaDB 10.0.23

PHP version: 5.6.20

ownCloud version: 9.0.0

Updated from an older ownCloud or fresh install: Updated

Where did you install ownCloud from: webapp-config

Signing status (ownCloud 9.0 and above): see above

GreatEmerald avatar Apr 23 '16 16:04 GreatEmerald

In https://github.com/owncloud/core/pull/22756#issuecomment-199016878 @akhokhlushin has referred two two files created by that tool?

ghost avatar Apr 23 '16 16:04 ghost

Hm, that's true:

$ ls -a
.             core              lib           settings
..            cron.php          occ           status.php
3rdparty      data              ocs           themes
apps          db_structure.xml  ocs-provider  updater
AUTHORS       .htaccess         public.php    .user.ini
config        index.html        remote.php    version.php
console.php   index.php         resources     .webapp
COPYING-AGPL  l10n              robots.txt    .webapp-owncloud-9.0.0

I'm not sure why the integrity log doesn't list the second one. But both should be excluded, in any case.

GreatEmerald avatar Apr 23 '16 16:04 GreatEmerald

I second that request. The .webapp contains what is installed there the .webapp-owncloud-9.0.0 contains all files installed by webapp-config there.

noci2012 avatar May 22 '16 20:05 noci2012

As a temporary workaround, is it possible to make the ownCloud integrity check ignore certain extra files or all extra files?

jaakristioja avatar Jun 03 '16 18:06 jaakristioja

I have near identical results as @GreatEmerald: Technical information ===================== The following list covers which files have failed the integrity check. Please read the previous linked documentation to learn more about the errors and how to fix them.

Results
=======
- core
    - EXTRA_FILE
        - .webapp

Raw output
==========
Array
(
    [core] => Array
        (
            [EXTRA_FILE] => Array
                (
                    [.webapp] => Array
                        (
                            [expected] => 
                            [current] => 
                        )

                )

        )

)

OS: Funtoo/Gentoo Linux 4.6.1-gentoo #1 SMP Webserver: apache (2.4.20) Database: mysql (5.6.30) PHP (5.5.36/7.0.7) owncloud (9.0.2) $ ls -la total 1476 drwxr-xr-x 15 root root 4096 Jun 10 10:57 . drwxr-xr-x 3 root root 8 Jun 10 10:57 .. drwxr-xr-x 29 root root 4096 Jun 10 10:57 3rdparty drwxrwxr-x 26 apache apache 4096 Jun 10 10:57 apps -rw-r--r-- 2 root root 8065 Jun 10 10:40 AUTHORS drwxrwxr-x 2 apache apache 24 Jun 10 10:59 config -rw-r--r-- 2 root root 3439 Jun 10 10:40 console.php -rw-r--r-- 2 root root 34520 Jun 10 10:40 COPYING-AGPL drwxr-xr-x 16 root root 4096 Jun 10 10:57 core -rw-r--r-- 2 root root 5919 Jun 10 10:41 cron.php drwxrwx--- 5 apache apache 4096 Jun 10 11:53 data -rw-r--r-- 2 root root 32727 Jun 10 10:41 db_structure.xml -rw-r--r-- 1 root root 3323 Jun 10 10:57 .htaccess -rw-r--r-- 2 root root 179 Jun 10 10:41 index.html -rw-r--r-- 2 root root 2026 Jun 10 10:41 index.php drwxr-xr-x 3 root root 32 Jun 10 10:57 l10n drwxr-xr-x 5 root root 40 Jun 10 10:57 lib -rw-r--r-- 2 root root 283 Jun 10 10:41 occ drwxr-xr-x 2 root root 32 Jun 10 10:57 ocs drwxr-xr-x 2 root root 16 Jun 10 10:57 ocs-provider -rw-r--r-- 2 root root 2969 Jun 10 10:41 public.php -rw-r--r-- 2 root root 4599 Jun 10 10:41 remote.php drwxr-xr-x 5 root root 24 Jun 10 10:57 resources -rw-r--r-- 2 root root 26 Jun 10 10:41 robots.txt drwxr-xr-x 12 root root 4096 Jun 10 10:57 settings -rw-r--r-- 2 root root 1819 Jun 10 10:41 status.php drwxr-xr-x 3 root root 16 Jun 10 10:57 themes drwxr-xr-x 7 root root 4096 Jun 10 10:57 updater -rw-r--r-- 2 root root 163 Jun 10 10:39 .user.ini -rw-r--r-- 2 root root 233 Jun 10 10:41 version.php -rw------- 1 root root 343 Jun 10 10:57 .webapp -rw------- 1 root root 1310529 Jun 10 10:57 .webapp-owncloud-9.0.2

rsa4046 avatar Jun 12 '16 15:06 rsa4046

@rsa4046 Well, this issue is still open so its normal that you're getting the same result.

To exclude the .webapp folder anyone is welcome to create a Pull Request with the .webapp folder added to this file:

https://github.com/owncloud/core/blob/v9.0.2/lib/private/integritycheck/iterator/excludefilebynamefilteriterator.php#L41

ghost avatar Jun 12 '16 18:06 ghost

Fix will be included in oC 9.1: https://github.com/owncloud/core/issues/25184

ghost avatar Jul 11 '16 10:07 ghost

thx @RealRancor

DeepDiver1975 avatar Jul 11 '16 10:07 DeepDiver1975

@GreatEmerald wondered, why only one of the webapp-files was shown in the result.. Now, after the "fix", the first one is gone, but the other appeared :( Could you reopen the issue?

Results
=======
- core
    - EXTRA_FILE
        - .webapp-owncloud-9.1.0

Raw output
==========
Array
(
    [core] => Array
        (
            [EXTRA_FILE] => Array
                (
                    [.webapp-owncloud-9.1.0] => Array
                        (
                            [expected] => 
                            [current] => 
                        )

                )

        )

)

kaindl avatar Aug 11 '16 01:08 kaindl

Yea, looks like the commit only took care of one file, not both. But I don't seem to have a way to reopen this issue, sorry.

GreatEmerald avatar Aug 11 '16 09:08 GreatEmerald

This seems more complicated to me, than I thought.. We can't just have .webapp*, because it is compared with in_array, so it does only look for exact matches.. As the file contains the version number, I don't think it would be reasonable to put the exact filename into the list, as it would have to be changed in every release.. :(

kaindl avatar Aug 11 '16 14:08 kaindl

Why am I seeing : ?

  • core
    • EXTRA_FILE
      • .webapp-nextcloud-10.0.0

okias avatar Sep 17 '16 00:09 okias

See https://github.com/owncloud/core/issues/24218#issuecomment-239179096

ghost avatar Sep 17 '16 06:09 ghost

would also be useful for zfs snapshots as reported here https://github.com/owncloud/core/issues/26400

PVince81 avatar Oct 24 '16 09:10 PVince81

another report for adding exceptions: https://github.com/owncloud/core/issues/26467 but also for adding a FAQ entry

PVince81 avatar Oct 24 '16 18:10 PVince81

have no idea why @PVince81 add #26467 as duplicate of this, its nothing like this at all.

arr0n avatar Oct 24 '16 18:10 arr0n

@arr0n okay sorry, must be another one. There's a ticket about "allow excluding arbitrary files". Let me search again...

PVince81 avatar Oct 24 '16 18:10 PVince81

here we go: https://github.com/owncloud/core/issues/23186

Will relink the original ticket.

PVince81 avatar Oct 24 '16 18:10 PVince81

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

lock[bot] avatar Aug 03 '19 05:08 lock[bot]