core icon indicating copy to clipboard operation
core copied to clipboard

storage backend \\OC\\Files\\Storage\\Home not found (owncloud 5.0.13)

Open marekbedy opened this issue 13 years ago • 28 comments

I got this message into owncloud.log after installing version 5.0.13. In the main screen is displayed message: "You dont have write permissions here".

OS: FreeBSD 9.2-STABLE DB backend: PostgreSQL PHP version: 5.4.21

{"app":"core","message":"storage backend \OC\Files\Storage\Home not found","level":3,"time":"2013-11-12T15:20:46+00:00"} {"app":"core","message":"storage backend \OC\Files\Storage\Home not found","level":3,"time":"2013-11-12T15:20:46+00:00"} {"app":"core","message":"storage backend \OC\Files\Storage\Home not found","level":3,"time":"2013-11-12T15:20:46+00:00"} {"app":"PHP","message":"Undefined index: size at /usr/local/www/owncloud/lib/helper.php#835","level":2,"time":"2013-11-12T15:20:46+00:00"}

marekbedy avatar Nov 12 '13 16:11 marekbedy

I'm getting the same issue with the almost the same installation on FreeBSD, only the DB backend is set to sqlite for me.

y0m76b avatar Nov 12 '13 18:11 y0m76b

cc @icewind1991 @butonic

blizzz avatar Nov 12 '13 22:11 blizzz

Did you guys install from scratch or upgrade ?

PVince81 avatar Nov 13 '13 18:11 PVince81

installed from scratch here

y0m76b avatar Nov 13 '13 19:11 y0m76b

Adding @bantu in case it could be related to the autoloader (which I'm not familiar with)

Either the class file doesn't exist or isn't accessible for some reason, or isn't "required" properly by PHP.

@GuillaumeBibaut do you also have PHP 5.4.21 ?

PVince81 avatar Nov 13 '13 19:11 PVince81

I installed from scratch, same results ...

marekbedy avatar Nov 13 '13 19:11 marekbedy

@marekbedy can you tell us which environment you are using, operating system ? PHP version ?

This would help finding out what you guys have in common to track down the issue. Thanks.

PVince81 avatar Nov 13 '13 19:11 PVince81

# pkg info php5 php5-5.4.21

y0m76b avatar Nov 13 '13 19:11 y0m76b

I'm using FreeBSD 9.2-RELEASE amd64

uname -a FreeBSD server.internet.com 9.2-RELEASE FreeBSD 9.2-RELEASE #0: Fri Sep 27 12:34:12 CEST 2013 [email protected]:/usr/obj/usr/src/sys/GENERIC amd64

y0m76b avatar Nov 13 '13 19:11 y0m76b

And of course, own cloud 5.0.13, with SQLite backend

y0m76b avatar Nov 13 '13 20:11 y0m76b

Just tried with php5 5.4.21 and it works fine. This is with Apache 2.2.22

Are you guys running Apache 2.4 ?

PVince81 avatar Nov 13 '13 20:11 PVince81

# pkg info apache22 apache22-2.2.25_1

y0m76b avatar Nov 13 '13 20:11 y0m76b

I'am running apache22-2.2.25_1:

Apache/2.2.25 (FreeBSD) mod_wsgi/3.4 Python/2.7.5 PHP/5.4.21 mod_ssl/2.2.25 OpenSSL/1.0.1e DAV/2 SVN/1.8.3

marekbedy avatar Nov 13 '13 20:11 marekbedy

Ok, I'm starting to see a pattern. Seems to be an issue happening only on FreeBSD :confused: I'm not able to reproduce it on Linux (openSUSE 12.3)

Can you check the permissions of the "data" directory and make sure that the web server can write there ? (but I don't think all of you three would make the same mistake at the same time)

PVince81 avatar Nov 13 '13 20:11 PVince81

yes, data directory is writable by webserver process (user www, group www): /usr/local/www/owncloud/data# ls -la total 8154 drwxrwx--- 4 www www 512 Nov 13 14:56 ./ drwxr-xr-x 14 www www 512 Nov 13 14:02 ../ -rw-r--r-- 1 www www 27 Nov 13 14:07 .htaccess -rw-r--r-- 1 www www 0 Nov 13 14:07 index.html drwxr-xr-x 3 www www 512 Nov 12 16:20 mbe/ -rw-r--r-- 1 www www 8321156 Nov 13 15:02 owncloud.log drwxr-xr-x 3 www www 512 Nov 12 16:38 user1/

marekbedy avatar Nov 13 '13 20:11 marekbedy

cd data
ll -R .
total 356
-rw-r--r--  1 www  www      27 Nov 13 17:53 .htaccess
-rw-r--r--  1 www  www       0 Nov 13 17:53 index.html
drwxr-xr-x  3 www  www       3 Nov 13 17:53 ownadmin/
-rw-r--r--  1 www  www   94208 Nov 13 18:11 owncloud.db
-rw-r--r--  1 www  www  136224 Nov 13 18:14 owncloud.log
drwxr-xr-x  3 www  www       3 Nov 13 17:55 yom/

./ownadmin:
total 2
drwxr-xr-x  2 www  www  2 Nov 13 17:53 files/

./ownadmin/files:
total 0

./yom:
total 2
drwxr-xr-x  2 www  www  2 Nov 13 17:55 files/

./yom/files:
total 0

And in my httpd.conf

User www
Group www

y0m76b avatar Nov 13 '13 20:11 y0m76b

The reason it seems is that here in lib/files/mount.php line 63:

private function createStorage() {
    if (class_exists($this->class)) {
        try {
            return new $this->class($this->arguments);
        } catch (\Exception $exception) {
            \OC_Log::write('core', $exception->getMessage(), \OC_Log::ERROR);
            return null;
        }
    } else {
        \OC_Log::write('core', 'storage backend ' . $this->class . ' not found', \OC_Log::ERROR);
        return null;
    }
}

The call to class_exists() with the argument "\OC\Files\Storage\Home" seems to fail and cause that error to appear in the log.

It's as if the class didn't exist, even though the file lib/files/storage/home.php wouldn't exist or isn't loaded, or is loaded too late. (race condition?)

PVince81 avatar Nov 13 '13 21:11 PVince81

I do not have this file in my installed owncloud

you are talking about the file : owncloud/lib/files/storage/home.php ?

y0m76b avatar Nov 13 '13 21:11 y0m76b

Yes. Is this file missing from the archive you installed ?

PVince81 avatar Nov 13 '13 21:11 PVince81

Probably FreeBSD guys made wrong instalation package. :)

marekbedy avatar Nov 13 '13 21:11 marekbedy