Issue: CIFS mount as NextCloud Root directory

Hello -

I have a strange problem I can’t use a CIFS mount as data storage for nextcloud user data.
On install nextcloud creates all data fine on that storage but site is not loading (loading loop)

Mountet as: www-data:nogroup

Samba Conf:
[MyDataStorage]
comment = NextCloud
path = /opt/MyDataStorage
valid users = @www-data
force group = www-data
create mask = 0775
directory mask = 0775
writable = yes

{"reqId":"ZHHB1OhBLCVpQQNGUPnY","remoteAddr":"10.0.2.2","app":"PHP","message":"Uncaught Doctrine\\DBAL\\DBALException: Failed to connect to the database: An exception occurred while executing 'PRAGMA journal_mode = WAL':\n\nSQLSTATE[HY000]: General error: 10 disk I\/O error in \/var\/www\/html\/lib\/private\/DB\/Connection.php:60\nStack trace:\n#0 \/var\/www\/html\/3rdparty\/doctrine\/dbal\/lib\/Doctrine\/DBAL\/Connection.php(973): OC\\DB\\Connection->connect()\n#1 \/var\/www\/html\/lib\/private\/DB\/Connection.php(215): Doctrine\\DBAL\\Connection->executeUpdate('PRAGMA read_unc...', Array, Array)\n#2 \/var\/www\/html\/3rdparty\/doctrine\/dbal\/lib\/Doctrine\/DBAL\/Connection.php(621): OC\\DB\\Connection->executeUpdate('PRAGMA read_unc...')\n#3 \/var\/www\/html\/lib\/private\/DB\/Connection.php(147): Doctrine\\DBAL\\Connection->setTransactionIsolation(2)\n#4 \/var\/www\/html\/3rdparty\/doctrine\/dbal\/lib\/Doctrine\/DBAL\/DriverManager.php(172): OC\\DB\\Connection->__construct(Array, Object(Doctrine\\DBAL\\Driver\\PDOSqlite\\Driver), Object(Doctrine\\DBAL\\Configuration), Object(Doctrine\\Common\\EventManager))\n#5 \/var\/www\/html\/lib\/private\/DB\/ConnectionFactory.php( at \/var\/www\/html\/lib\/private\/DB\/Connection.php#60","level":3,"time":"2017-11-09T11:33:08+00:00","method":"GET","url":"\/","user":"--","version":"11.0.2.7"}
{"reqId":"8tbJVrhjUcXwxRANfVDO","remoteAddr":"10.0.2.2","app":"index","message":"Exception: {\"Exception\":\"Doctrine\\\\DBAL\\\\Exception\\\\DriverException\",\"Message\":\"An exception occurred while executing 'SELECT \\\"id\\\", \\\"uid\\\", \\\"login_name\\\", \\\"password\\\", \\\"name\\\", \\\"type\\\", \\\"remember\\\", \\\"token\\\", \\\"last_activity\\\", \\\"last_check\\\", \\\"scope\\\" FROM \\\"oc_authtoken\\\" WHERE \\\"token\\\" = ?' with params [\\\"e0159036e1598c67bdcf17e71c998741d1a56b63fe01fa36cd3557a27f27b6be82548831e4474b7c98f73cbe1b92f63b89d424db8ef22f011e763bd1cf1d946b\\\"]:\\n\\nSQLSTATE[HY000]: General error: 15 locking protocol\",\"Code\":0,\"Trace\":\"#0 \\\/var\\\/www\\\/html\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/DBALException.php(128): Doctrine\\\\DBAL\\\\Driver\\\\AbstractSQLiteDriver->convertException('An exception oc...', Object(Doctrine\\\\DBAL\\\\Driver\\\\PDOException))\\n#1 \\\/var\\\/www\\\/html\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/Connection.php(836): Doctrine\\\\DBAL\\\\DBALException::driverExceptionDuringQuery(Object(Doctrine\\\\DBAL\\\\Driver\\\\PDOSqlite\\\\Driver), Object(Doctrine\\\\DBAL\\\\Driver\\\\PDOException), 'SELECT \\\"id\\\", \\\"u...', Array)\\n#2 \\\/var\\\/www\\\/html\\\/lib\\\/private\\\/DB\\\/Connection.php(194): Doctrine\\\\DBAL\\\\Connection->executeQuery('SELECT \\\"id\\\", \\\"u...', Array, Array, NULL)\\n#3 \\\/var\\\/www\\\/html\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/Query\\\/QueryBuilder.php(206): OC\\\\DB\\\\Connection->executeQuery('SELECT \\\"id\\\", \\\"u...', Array, Array)\\n#4 \\\/var\\\/www\\\/html\\\/lib\\\/private\\\/DB\\\/QueryBuilder\\\/QueryBuilder.php(177): Doctrine\\\\DBAL\\\\Query\\\\QueryBuilder->execute()\\n#5 \\\/var\\\/www\\\/html\\\/lib\\\/private\\\/Authentication\\\/Token\\\/DefaultTokenMapper.php(78): OC\\\\DB\\\\QueryBuilder\\\\QueryBuilder->execute()\\n#6 \\\/var\\\/www\\\/html\\\/lib\\\/private\\\/Authentication\\\/Token\\\/DefaultTokenProvider.php(156): OC\\\\Authentication\\\\Token\\\\DefaultTokenMapper->getToken(*** sensitive parameters replaced ***)\\n#7 \\\/var\\\/www\\\/html\\\/lib\\\/private\\\/User\\\/Session.php(502): OC\\\\Authentication\\\\Token\\\\DefaultTokenProvider->getToken(*** sensitive parameters replaced ***)\\n#8 \\\/var\\\/www\\\/html\\\/lib\\\/private\\\/User\\\/Session.php(695): OC\\\\User\\\\Session->loginWithToken('e5a70abfb751b87...')\\n#9 \\\/var\\\/www\\\/html\\\/lib\\\/base.php(1055): OC\\\\User\\\\Session->tryTokenLogin(Object(OC\\\\AppFramework\\\\Http\\\\Request))\\n#10 \\\/var\\\/www\\\/html\\\/lib\\\/base.php(998): OC::handleLogin(Object(OC\\\\AppFramework\\\\Http\\\\Request))\\n#11 \\\/var\\\/www\\\/html\\\/index.php(40): OC::handleRequest()\\n#12 {main}\",\"File\":\"\\\/var\\\/www\\\/html\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/Driver\\\/AbstractSQLiteDriver.php\",\"Line\":85}","level":3,"time":"2017-11-09T11:31:17+00:00","method":"GET","url":"\/index.php\/login","user":"--","version":"11.0.2.7"}

Does anyone already know about this issue and have a solution?

Thanks a lot :slight_smile:

Has no one an idea why samba share cant be used as data storage direclty as /var/www/htmll/data/ `?