After moving data directory NextCloud 12 can't access it
Steps to reproduce
- Install NextCloud
- stop HTTPD (Apache)
- Mont additional HDD to /opt
- sudo rsync -avP /var/www/nextcloud-data /opt/data/
- grant 777 permissions to httpd:httpd on /opt/data (with 644 no success either)
- Changing ’datadirectory’ => ‘/opt/data’ and changing MariaDB entry row data from local::/var/www/nextcloud-data/ to local::/opt/data/
- restart all services
Expected behaviour
Data directory should be moved and everything should be working as before
Actual behaviour
Old session works, shows all files, but uploads fails with - Forbidden, Logs not showing on the admin section, and under Security & Setup warnings: Error occurred while checking server setup.
New Session shows NextCloud background with warning: Your data directory is not writable
Mobile and PC applications shows files but upload not working
Nextcloud.log - /opt/data/nextcloud.log has no new entries
sudo -u apache cp /var/www/html/nextcloud/data/test.php /opt/data/ works great and editing works also
When I move back data directory to old location everything again works...
Server configuration
Operating system: centos-release-7-3.1611.el7.centos.x86_64 Web server: httpd-2.4.6-45.el7.centos.4.x86_64 Database: mariadb-5.5.52-1.el7.x86_64 PHP version: php-7.0.21-1.el7.remi.x86_64 Nextcloud version: (see Nextcloud admin page) Nextcloud 12.0.0 Updated from an older Nextcloud/ownCloud or fresh install: fresh install Where did you install Nextcloud from: https://docs.nextcloud.com/server/12/admin_manual/installation/source_installation.html
Signing status:
Signing status
No errors have been found.
List of activated apps:
App list
Enabled:
- activity: 2.5.2
- admin_audit: 1.2.0
- bruteforcesettings: 1.0.2
- comments: 1.2.0
- dav: 1.3.0
- federatedfilesharing: 1.2.0
- federation: 1.2.0
- files: 1.7.2
- files_external: 1.3.0
- files_pdfviewer: 1.1.1
- files_sharing: 1.4.0
- files_texteditor: 2.4.1
- files_trashbin: 1.2.0
- files_versions: 1.5.0
- files_videoplayer: 1.1.0
- firstrunwizard: 2.1
- gallery: 17.0.0
- logreader: 2.0.0
- lookup_server_connector: 1.0.0
- nextcloud_announcements: 1.1
- notifications: 2.0.0
- oauth2: 1.0.5
- password_policy: 1.2.2
- provisioning_api: 1.2.0
- serverinfo: 1.2.0
- sharebymail: 1.2.0
- survey_client: 1.0.0
- systemtags: 1.2.0
- theming: 1.3.0
- twofactor_backupcodes: 1.1.1
- updatenotification: 1.2.0
- user_ldap: 1.2.1
- workflowengine: 1.2.0
Disabled:
- encryption
- user_external
Nextcloud configuration:
Config report
{
"system": {
"instanceid": "octs0l0iuz0p",
"passwordsalt": "***REMOVED SENSITIVE VALUE***",
"secret": "***REMOVED SENSITIVE VALUE***",
"trusted_domains": [
"192.168.20.99",
"next.xxx.lv",
"195.122.21.178"
],
"datadirectory": "\/opt\/data",
"overwrite.cli.url": "http:\/\/192.168.20.99\/nextcloud",
"dbtype": "mysql",
"version": "12.0.0.29",
"dbname": "nextclouddb",
"dbhost": "localhost",
"dbport": "",
"dbtableprefix": "oc_",
"dbuser": "***REMOVED SENSITIVE VALUE***",
"dbpassword": "***REMOVED SENSITIVE VALUE***",
"installed": true,
"memcache.local": "\\OC\\Memcache\\APCu",
"mail_from_address": "nextcloud",
"mail_smtpmode": "smtp",
"mail_smtpauthtype": "LOGIN",
"mail_domain": "xxx.lv",
"mail_smtphost": "192.168.20.98",
"mail_smtpport": "25",
"mail_smtpauth": 1,
"mail_smtpname": "***REMOVED SENSITIVE VALUE***",
"mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
"ldapIgnoreNamingRules": false,
"ldapProviderFactory": "\\OCA\\User_LDAP\\LDAPProviderFactory",
"maintenance": false,
"updater.secret": "***REMOVED SENSITIVE VALUE***",
"data-fingerprint": "e7ce47f74934ad74bea9f4225db1eafe"
}
}
Are you using external storage, if yes which one: local/smb/sftp/... local Are you using encryption: yes/no no Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/... no
LDAP configuration (delete this part if not used)
LDAP config
With access to your command line run e.g.:
sudo -u www-data php occ ldap:show-config
from within your Nextcloud installation folder
Without access to your command line download the data/owncloud.db to your local
computer or access your SQL server remotely and run the select query:
SELECT * FROM `oc_appconfig` WHERE `appid` = 'user_ldap';
Eventually replace sensitive data as the name/IP-address of your LDAP server or groups.
Client configuration
Browser: Any Operating system: any
Logs
Web server error log
Web server error log new session
Aug 16 10:04:00 nextcloud httpd[1650]: [:error] [pid 1650] [client 192.168.20.125:61462] {"reqId":"WZPuYD6LyBqtwPCQRbXztQAAAAk","level":3,"time":"2017-08-16T07:04:00+00:00","remoteAddr":"192.168.20.125","user":"--","app":"PHP","method":"GET","url":"\\/index.php\\/js\\/core\\/merged-template-prepend.js?v=df00724434e5f06d1daca52134e36ea3-2","message":"file_get_contents(\\/opt\\/data\\/appdata_octs0l0iuz0p\\/js\\/core\\/merged-template-prepend.js.deps): failed to open stream: Permission denied at \\/var\\/www\\/html\\/nextcloud\\/lib\\/private\\/Files\\/Storage\\/Local.php#209","userAgent":"Mozilla\\/5.0 (Windows NT 10.0; WOW64; rv:54.0) Gecko\\/20100101 Firefox\\/54.0","version":"12.0.0.29"}
Aug 16 10:04:00 nextcloud httpd[1650]: [:error] [pid 1650] [client 192.168.20.125:61462] {"reqId":"WZPuYD6LyBqtwPCQRbXztQAAAAk","level":3,"time":"2017-08-16T07:04:00+00:00","remoteAddr":"192.168.20.125","user":"--","app":"PHP","method":"GET","url":"\\/index.php\\/js\\/core\\/merged-template-prepend.js?v=df00724434e5f06d1daca52134e36ea3-2","message":"Invalid argument supplied for foreach() at \\/var\\/www\\/html\\/nextcloud\\/lib\\/private\\/Template\\/JSCombiner.php#107","userAgent":"Mozilla\\/5.0 (Windows NT 10.0; WOW64; rv:54.0) Gecko\\/20100101 Firefox\\/54.0","version":"12.0.0.29"}
Aug 16 10:04:00 nextcloud httpd[1650]: [:error] [pid 1650] [client 192.168.20.125:61462] {"reqId":"WZPuYD6LyBqtwPCQRbXztQAAAAk","level":3,"time":"2017-08-16T07:04:00+00:00","remoteAddr":"192.168.20.125","user":"--","app":"PHP","method":"GET","url":"\\/index.php\\/js\\/core\\/merged-template-prepend.js?v=df00724434e5f06d1daca52134e36ea3-2","message":"Invalid argument supplied for foreach() at \\/var\\/www\\/html\\/nextcloud\\/lib\\/private\\/Template\\/SCSSCacher.php#145","userAgent":"Mozilla\\/5.0 (Windows NT 10.0; WOW64; rv:54.0) Gecko\\/20100101 Firefox\\/54.0","version":"12.0.0.29"}
Aug 16 10:04:00 nextcloud httpd[1650]: [:error] [pid 1650] [client 192.168.20.125:61462] {"reqId":"WZPuYD6LyBqtwPCQRbXztQAAAAk","level":3,"time":"2017-08-16T07:04:00+00:00","remoteAddr":"192.168.20.125","user":"--","app":"PHP","method":"GET","url":"\\/index.php\\/js\\/core\\/merged-template-prepend.js?v=df00724434e5f06d1daca52134e36ea3-2","message":"Invalid argument supplied for foreach() at \\/var\\/www\\/html\\/nextcloud\\/lib\\/private\\/Template\\/SCSSCacher.php#145","userAgent":"Mozilla\\/5.0 (Windows NT 10.0; WOW64; rv:54.0) Gecko\\/20100101 Firefox\\/54.0","version":"12.0.0.29"}
Aug 16 10:04:00 nextcloud httpd[1650]: [:error] [pid 1650] [client 192.168.20.125:61462] {"reqId":"WZPuYD6LyBqtwPCQRbXztQAAAAk","level":3,"time":"2017-08-16T07:04:00+00:00","remoteAddr":"192.168.20.125","user":"--","app":"PHP","method":"GET","url":"\\/index.php\\/js\\/core\\/merged-template-prepend.js?v=df00724434e5f06d1daca52134e36ea3-2","message":"fopen(\\/opt\\/data\\/nextcloud.log): failed to open stream: Permission denied at \\/var\\/www\\/html\\/nextcloud\\/lib\\/private\\/Log\\/File.php#121","userAgent":"Mozilla\\/5.0 (Windows NT 10.0; WOW64; rv:54.0) Gecko\\/20100101 Firefox\\/54.0","version":"12.0.0.29"}
Web server error log Old session with logged in user trying to open logs
Aug 16 10:25:11 nextcloud httpd[4316]: [:error] [pid 4316] [client 192.168.20.125:61835] {"reqId":"WZPzV-sHVW67z8fFp7-s6QAAAAA","level":3,"time":"2017-08-16T07:25:11+00:00","remoteAddr":"192.168.20.125","user":"reinis","app":"PHP","method":"GET","url":"\\/index.php\\/settings\\/ajax\\/checksetup","message":"file_get_contents(\\/opt\\/data\\/appdata_octs0l0iuz0p\\/js\\/notifications\\/merged.js.deps): failed to open stream: Permission denied at \\/var\\/www\\/html\\/nextcloud\\/lib\\/private\\/Files\\/Storage\\/Local.php#209","userAgent":"Mozilla\\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\\/537.36 (KHTML, like Gecko) Chrome\\/60.0.3112.90 Safari\\/537.36","version":"12.0.0.29"}
Aug 16 10:25:11 nextcloud httpd[4316]: [:error] [pid 4316] [client 192.168.20.125:61835] {"reqId":"WZPzV-sHVW67z8fFp7-s6QAAAAA","level":3,"time":"2017-08-16T07:25:11+00:00","remoteAddr":"192.168.20.125","user":"reinis","app":"PHP","method":"GET","url":"\\/index.php\\/settings\\/ajax\\/checksetup","message":"Invalid argument supplied for foreach() at \\/var\\/www\\/html\\/nextcloud\\/lib\\/private\\/Template\\/JSCombiner.php#107","userAgent":"Mozilla\\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\\/537.36 (KHTML, like Gecko) Chrome\\/60.0.3112.90 Safari\\/537.36","version":"12.0.0.29"}
Aug 16 10:25:11 nextcloud httpd[4316]: [:error] [pid 4316] [client 192.168.20.125:61835] {"reqId":"WZPzV-sHVW67z8fFp7-s6QAAAAA","level":3,"time":"2017-08-16T07:25:11+00:00","remoteAddr":"192.168.20.125","user":"reinis","app":"PHP","method":"GET","url":"\\/index.php\\/settings\\/ajax\\/checksetup","message":"Invalid argument supplied for foreach() at \\/var\\/www\\/html\\/nextcloud\\/lib\\/private\\/Template\\/SCSSCacher.php#145","userAgent":"Mozilla\\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\\/537.36 (KHTML, like Gecko) Chrome\\/60.0.3112.90 Safari\\/537.36","version":"12.0.0.29"}
Aug 16 10:25:11 nextcloud httpd[4316]: [:error] [pid 4316] [client 192.168.20.125:61835] {"reqId":"WZPzV-sHVW67z8fFp7-s6QAAAAA","level":3,"time":"2017-08-16T07:25:11+00:00","remoteAddr":"192.168.20.125","user":"reinis","app":"PHP","method":"GET","url":"\\/index.php\\/settings\\/ajax\\/checksetup","message":"Invalid argument supplied for foreach() at \\/var\\/www\\/html\\/nextcloud\\/lib\\/private\\/Template\\/SCSSCacher.php#145","userAgent":"Mozilla\\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\\/537.36 (KHTML, like Gecko) Chrome\\/60.0.3112.90 Safari\\/537.36","version":"12.0.0.29"}
Aug 16 10:25:11 nextcloud httpd[4316]: [:error] [pid 4316] [client 192.168.20.125:61835] {"reqId":"WZPzV-sHVW67z8fFp7-s6QAAAAA","level":3,"time":"2017-08-16T07:25:11+00:00","remoteAddr":"192.168.20.125","user":"reinis","app":"PHP","method":"GET","url":"\\/index.php\\/settings\\/ajax\\/checksetup","message":"touch(): Unable to create file \\/opt\\/data\\/appdata_octs0l0iuz0p\\/css\\/core\\/styles.css because Permission denied at \\/var\\/www\\/html\\/nextcloud\\/lib\\/private\\/Files\\/Storage\\/Local.php#199","userAgent":"Mozilla\\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\\/537.36 (KHTML, like Gecko) Chrome\\/60.0.3112.90 Safari\\/537.36","version":"12.0.0.29"}
Aug 16 10:25:11 nextcloud httpd[4316]: [:error] [pid 4316] [client 192.168.20.125:61835] {"reqId":"WZPzV-sHVW67z8fFp7-s6QAAAAA","level":3,"time":"2017-08-16T07:25:11+00:00","remoteAddr":"192.168.20.125","user":"reinis","app":"PHP","method":"GET","url":"\\/index.php\\/settings\\/ajax\\/checksetup","message":"touch(): Unable to create file \\/opt\\/data\\/appdata_octs0l0iuz0p\\/css\\/core\\/styles.css.deps because Permission denied at \\/var\\/www\\/html\\/nextcloud\\/lib\\/private\\/Files\\/Storage\\/Local.php#199","userAgent":"Mozilla\\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\\/537.36 (KHTML, like Gecko) Chrome\\/60.0.3112.90 Safari\\/537.36","version":"12.0.0.29"}
Aug 16 10:25:12 nextcloud httpd[4316]: [:error] [pid 4316] [client 192.168.20.125:61835] {"reqId":"WZPzV-sHVW67z8fFp7-s6QAAAAA","level":3,"time":"2017-08-16T07:25:12+00:00","remoteAddr":"192.168.20.125","user":"reinis","app":"PHP","method":"GET","url":"\\/index.php\\/settings\\/ajax\\/checksetup","message":"touch(): Unable to create file \\/opt\\/data\\/appdata_octs0l0iuz0p\\/css\\/core\\/styles.css.gzip because Permission denied at \\/var\\/www\\/html\\/nextcloud\\/lib\\/private\\/Files\\/Storage\\/Local.php#199","userAgent":"Mozilla\\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\\/537.36 (KHTML, like Gecko) Chrome\\/60.0.3112.90 Safari\\/537.36","version":"12.0.0.29"}
Aug 16 10:25:12 nextcloud httpd[4316]: [:error] [pid 4316] [client 192.168.20.125:61835] {"reqId":"WZPzV-sHVW67z8fFp7-s6QAAAAA","level":3,"time":"2017-08-16T07:25:12+00:00","remoteAddr":"192.168.20.125","user":"reinis","app":"core","method":"GET","url":"\\/index.php\\/settings\\/ajax\\/checksetup","message":"Exception: {\\"Exception\\":\\"GuzzleHttp\\\\\\\\Exception\\\\\\\\RequestException\\",\\"Message\\":\\"cURL error 77: \\",\\"Code\\":0,\\"Trace\\":\\"#0 \\\\\\/var\\\\\\/www\\\\\\/html\\\\\\/nextcloud\\\\\\/3rdparty\\\\\\/guzzlehttp\\\\\\/guzzle\\\\\\/src\\\\\\/RequestFsm.php(103): GuzzleHttp\\\\\\\\Exception\\\\\\\\RequestException::wrapException(Object(GuzzleHttp\\\\\\\\Message\\\\\\\\Request), Object(GuzzleHttp\\\\\\\\Ring\\\\\\\\Exception\\\\\\\\RingException))\\\\n#1 \\\\\\/var\\\\\\/www\\\\\\/html\\\\\\/nextcloud\\\\\\/3rdparty\\\\\\/guzzlehttp\\\\\\/guzzle\\\\\\/src\\\\\\/RequestFsm.php(132): GuzzleHttp\\\\\\\\RequestFsm->__invoke(Object(GuzzleHttp\\\\\\\\Transaction))\\\\n#2 \\\\\\/var\\\\\\/www\\\\\\/html\\\\\\/nextcloud\\\\\\/3rdparty\\\\\\/react\\\\\\/promise\\\\\\/src\\\\\\/FulfilledPromise.php(25): GuzzleHttp\\\\\\\\RequestFsm->GuzzleHttp\\\\\\\\{closure}(Array)\\\\n#3 \\\\\\/var\\\\\\/www\\\\\\/html\\\\\\/nextcloud\\\\\\/3rdparty\\\\\\/guzzlehttp\\\\\\/ringphp\\\\\\/src\\\\\\/Future\\\\\\/CompletedFutureValue.php(55): React\\\\\\\\Promise\\\\\\\\FulfilledPromise->then(Object(Closure), NULL, NULL)\\\\n#4 \\\\\\/var\\\\\\/www\\\\\\/html\\\\\\/nextcloud\\\\\\/3rdparty\\\\\\/guzzlehttp\\\\\\/guzzle\\\\\\/src\\\\\\/Message\\\\\\/FutureResponse.php(43): GuzzleHttp\\\\\\\\Ring\\\\\\\\Future\\\\\\\\CompletedFutureValue->then(Object(Closure), NULL, NULL)\\\\n#5 \\\\\\/var\\\\\\/www\\\\\\/html\\\\\\/nextcloud\\\\\\/3rdparty\\\\\\/guzzlehttp\\\\\\/guzzle\\\\\\/src\\\\\\/RequestFsm.php(134): GuzzleHttp\\\\\\\\Message\\\\\\\\FutureResponse::proxy(Object(GuzzleHttp\\\\\\\\Ring\\\\\\\\Future\\\\\\\\CompletedFutureArray), Object(Closure))\\\\n#6 \\\\\\/var\\\\\\/www\\\\\\/html\\\\\\/nextcloud\\\\\\/3rdparty\\\\\\/guzzlehttp\\\\\\/guzzle\\\\\\/src\\\\\\/Client.php(165): GuzzleHttp\\\\\\\\RequestFsm->__invoke(Object(GuzzleHttp\\\\\\\\Transaction))\\\\n#7 \\\\\\/var\\\\\\/www\\\\\\/html\\\\\\/nextcloud\\\\\\/3rdparty\\\\\\/guzzlehttp\\\\\\/guzzle\\\\\\/src\\\\\\/Client.php(125): GuzzleHttp\\\\\\\\Client->send(Object(GuzzleHttp\\\\\\\\Message\\\\\\\\Request))\\\\n#8 \\\\\\/var\\\\\\/www\\\\\\/html\\\\\\/nextcloud\\\\\\/lib\\\\\\/private\\\\\\/Http\\\\\\/Client\\\\\\/Client.php(138): GuzzleHttp\\\\\\\\Client->get('https:\\\\\\/\\\\\\/www.own...', Array)\\\\n#9 \\\\\\/var\\\\\\/www\\\\\\/html\\\\\\/nextcloud\\\\\\/settings\\\\\\/Controller\\\\\\/CheckSetupController.php(217): OC\\\\\\\\Http\\\\\\\\Client\\\\\\\\Client->get('https:\\\\\\/\\\\\\/www.own...')\\\\n#10 \\\\\\/var\\\\\\/www\\\\\\/html\\\\\\/nextcloud\\\\\\/settings\\\\\\/Controller\\\\\\/CheckSetupController.php(419): OC\\\\\\\\Settings\\\\\\\\Controller\\\\\\\\CheckSetupController->isUsedTlsLibOutdated()\\\\n#11 [internal function]: OC\\\\\\\\Settings\\\\\\\\Controller\\\\\\\\CheckSetupController->check()\\\\n#12 \\\\\\/var\\\\\\/www\\\\\\/html\\\\\\/nextcloud\\\\\\/lib\\\\\\/private\\\\\\/AppFramework\\\\\\/Http\\\\\\/Dispatcher.php(160): call_user_func_array(Array, Array)\\\\n#13 \\\\\\/var\\\\\\/www\\\\\\/html\\\\\\/nextcloud\\\\\\/lib\\\\\\/private\\\\\\/AppFramework\\\\\\/Http\\\\\\/Dispatcher.php(90): OC\\\\\\\\AppFramework\\\\\\\\Http\\\\\\\\Dispatcher->executeController(Object(OC\\\\\\\\Settings\\\\\\\\Controller\\\\\\\\CheckSetupController), 'check')\\\\n#14 \\\\\\/var\\\\\\/www\\\\\\/html\\\\\\/nextcloud\\\\\\/lib\\\\\\/private\\\\\\/AppFramework\\\\\\/App.php(114): OC\\\\\\\\AppFramework\\\\\\\\Http\\\\\\\\Dispatcher->dispatch(Object(OC\\\\\\\\Settings\\\\\\\\Controller\\\\\\\\CheckSetupController), 'check')\\\\n#15 \\\\\\/var\\\\\\/www\\\\\\/html\\\\\\/nextcloud\\\\\\/lib\\\\\\/private\\\\\\/AppFramework\\\\\\/Routing\\\\\\/RouteActionHandler.php(47): OC\\\\\\\\AppFramework\\\\\\\\App::main('OC\\\\\\\\\\\\\\\\Settings\\\\\\\\\\\\\\\\Con...', 'check', Object(OC\\\\\\\\AppFramework\\\\\\\\DependencyInjection\\\\\\\\DIContainer), Array)\\\\n#16 [internal function]: OC\\\\\\\\AppFramework\\\\\\\\Routing\\\\\\\\RouteActionHandler->__invoke(Array)\\\\n#17 \\\\\\/var\\\\\\/www\\\\\\/html\\\\\\/nextcloud\\\\\\/lib\\\\\\/private\\\\\\/Route\\\\\\/Router.php(299): call_user_func(Object(OC\\\\\\\\AppFramework\\\\\\\\Routing\\\\\\\\RouteActionHandler), Array)\\\\n#18 \\\\\\/var\\\\\\/www\\\\\\/html\\\\\\/nextcloud\\\\\\/lib\\\\\\/base.php(1000): OC\\\\\\\\Route\\\\\\\\Router->match('\\\\\\/settings\\\\\\/ajax\\\\\\/...')\\\\n#19 \\\\\\/var\\\\\\/www\\\\\\/html\\\\\\/nextcloud\\\\\\/index.php(40): OC::handleRequest()\\\\n#20 {main}\\",\\"File\\":\\"\\\\\\/var\\\\\\/www\\\\\\/html\\\\\\/nextcloud\\\\\\/3rdparty\\\\\\/guzzlehttp\\\\\\/guzzle\\\\\\/src\\\\\\/Exception\\\\\\/RequestException.php\\",\\"Line\\":51}","userAgent":"Mozilla\\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\\/537.36 (KHTML, like Gecko) Chrome\\/60.0.3112.90 Safari\\/537.36","version":"12.0.0.29"}
Aug 16 10:25:12 nextcloud httpd[4316]: [:error] [pid 4316] [client 192.168.20.125:61835] {"reqId":"WZPzV-sHVW67z8fFp7-s6QAAAAA","level":3,"time":"2017-08-16T07:25:12+00:00","remoteAddr":"192.168.20.125","user":"reinis","app":"core","method":"GET","url":"\\/index.php\\/settings\\/ajax\\/checksetup","message":"Exception: {\\"Exception\\":\\"OCP\\\\\\\\Files\\\\\\\\NotFoundException\\",\\"Message\\":\\"\\",\\"Code\\":0,\\"Trace\\":\\"#0 \\\\\\/var\\\\\\/www\\\\\\/html\\\\\\/nextcloud\\\\\\/lib\\\\\\/private\\\\\\/Files\\\\\\/Node\\\\\\/Node.php(217): OC\\\\\\\\Files\\\\\\\\Node\\\\\\\\Node->getFileInfo()\\\\n#1 \\\\\\/var\\\\\\/www\\\\\\/html\\\\\\/nextcloud\\\\\\/lib\\\\\\/private\\\\\\/Files\\\\\\/Node\\\\\\/Node.php(117): OC\\\\\\\\Files\\\\\\\\Node\\\\\\\\Node->getPermissions()\\\\n#2 \\\\\\/var\\\\\\/www\\\\\\/html\\\\\\/nextcloud\\\\\\/lib\\\\\\/private\\\\\\/Files\\\\\\/Node\\\\\\/File.php(62): OC\\\\\\\\Files\\\\\\\\Node\\\\\\\\Node->checkPermissions(2)\\\\n#3 \\\\\\/var\\\\\\/www\\\\\\/html\\\\\\/nextcloud\\\\\\/lib\\\\\\/private\\\\\\/Files\\\\\\/SimpleFS\\\\\\/SimpleFile.php(95): OC\\\\\\\\Files\\\\\\\\Node\\\\\\\\File->putContent('html,body,div,s...')\\\\n#4 \\\\\\/var\\\\\\/www\\\\\\/html\\\\\\/nextcloud\\\\\\/lib\\\\\\/private\\\\\\/Template\\\\\\/SCSSCacher.php(228): OC\\\\\\\\Files\\\\\\\\SimpleFS\\\\\\\\SimpleFile->putContent('html,body,div,s...')\\\\n#5 \\\\\\/var\\\\\\/www\\\\\\/html\\\\\\/nextcloud\\\\\\/lib\\\\\\/private\\\\\\/Template\\\\\\/SCSSCacher.php(112): OC\\\\\\\\Template\\\\\\\\SCSSCacher->cache('\\\\\\/var\\\\\\/www\\\\\\/html\\\\\\/n...', 'styles.css', 'styles.scss', Object(OC\\\\\\\\Files\\\\\\\\SimpleFS\\\\\\\\SimpleFolder), 'core\\\\\\/css')\\\\n#6 \\\\\\/var\\\\\\/www\\\\\\/html\\\\\\/nextcloud\\\\\\/lib\\\\\\/private\\\\\\/Template\\\\\\/CSSResourceLocator.php(99): OC\\\\\\\\Template\\\\\\\\SCSSCacher->process('\\\\\\/var\\\\\\/www\\\\\\/html\\\\\\/n...', 'core\\\\\\/css\\\\\\/styles...', 'core')\\\\n#7 \\\\\\/var\\\\\\/www\\\\\\/html\\\\\\/nextcloud\\\\\\/lib\\\\\\/private\\\\\\/Template\\\\\\/CSSResourceLocator.php(55): OC\\\\\\\\Template\\\\\\\\CSSResourceLocator->cacheAndAppendScssIfExist('\\\\\\/var\\\\\\/www\\\\\\/html\\\\\\/n...', 'core\\\\\\/css\\\\\\/styles...', 'core')\\\\n#8 \\\\\\/var\\\\\\/www\\\\\\/html\\\\\\/nextcloud\\\\\\/lib\\\\\\/private\\\\\\/Template\\\\\\/ResourceLocator.php(75): OC\\\\\\\\Template\\\\\\\\CSSResourceLocator->doFind('core\\\\\\/css\\\\\\/styles')\\\\n#9 \\\\\\/var\\\\\\/www\\\\\\/html\\\\\\/nextcloud\\\\\\/lib\\\\\\/private\\\\\\/TemplateLayout.php(225): OC\\\\\\\\Template\\\\\\\\ResourceLocator->find(Array)\\\\n#10 \\\\\\/var\\\\\\/www\\\\\\/html\\\\\\/nextcloud\\\\\\/lib\\\\\\/private\\\\\\/TemplateLayout.php(170): OC\\\\\\\\TemplateLayout::findStylesheetFiles(Array)\\\\n#11 \\\\\\/var\\\\\\/www\\\\\\/html\\\\\\/nextcloud\\\\\\/lib\\\\\\/private\\\\\\/legacy\\\\\\/template.php(205): OC\\\\\\\\TemplateLayout->__construct('error', '')\\\\n#12 \\\\\\/var\\\\\\/www\\\\\\/html\\\\\\/nextcloud\\\\\\/lib\\\\\\/private\\\\\\/Template\\\\\\/Base.php(132): OC_Template->fetchPage()\\\\n#13 \\\\\\/var\\\\\\/www\\\\\\/html\\\\\\/nextcloud\\\\\\/lib\\\\\\/private\\\\\\/legacy\\\\\\/template.php(342): OC\\\\\\\\Template\\\\\\\\Base->printPage()\\\\n#14 \\\\\\/var\\\\\\/www\\\\\\/html\\\\\\/nextcloud\\\\\\/index.php(59): OC_Template::printExceptionErrorPage(Object(GuzzleHttp\\\\\\\\Exception\\\\\\\\RequestException))\\\\n#15 {main}\\",\\"File\\":\\"\\\\\\/var\\\\\\/www\\\\\\/html\\\\\\/nextcloud\\\\\\/lib\\\\\\/private\\\\\\/Files\\\\\\/Node\\\\\\/Node.php\\",\\"Line\\":97}","userAgent":"Mozilla\\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\\/537.36 (KHTML, like Gecko) Chrome\\/60.0.3112.90 Safari\\/537.36","version":"12.0.0.29"}
Aug 16 10:25:12 nextcloud httpd[4316]: [:error] [pid 4316] [client 192.168.20.125:61835] {"reqId":"WZPzV-sHVW67z8fFp7-s6QAAAAA","level":3,"time":"2017-08-16T07:25:12+00:00","remoteAddr":"192.168.20.125","user":"reinis","app":"PHP","method":"GET","url":"\\/index.php\\/settings\\/ajax\\/checksetup","message":"fopen(\\/opt\\/data\\/nextcloud.log): failed to open stream: Permission denied at \\/var\\/www\\/html\\/nextcloud\\/lib\\/private\\/Log\\/File.php#121","userAgent":"Mozilla\\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\\/537.36 (KHTML, like Gecko) Chrome\\/60.0.3112.90 Safari\\/537.36","version":"12.0.0.29"}
Nextcloud log (data/nextcloud.log)
Nextcloud log
Nothing logs...
Browser log
Browser log
Insert your browser log here, this could for example include:
a) The javascript console log
b) The network log
c) ...
This seems to be a permission problem:
file_get_contents(\/opt\/data\/appdata_octs0l0iuz0p\/js\/core\/merged-template-prepend.js.deps): failed to open stream: Permission denied at ...
Please check the permissions (especially x permission of all parent folders) of the folder structure and the parent folders.
If you need more help on this ask in the forums because this is a setup issue: https://help.nextcloud.com/
grant 777 permissions to httpd:httpd on /opt/data (with 644 no success either)
sudo -u apache cp /var/www/html/nextcloud/data/test.php /opt/data/ works great and editing works also
is your webserver user apache or httpd?
In the past, people had issues with SELinux, so it's worth looking into it as well.
User is apache
But there is something wrong with server config somewhere somehow:
Created simple PHP file in
/var/www/html/nextcloud/pi.php
Containig:
require('/opt/data/test.php');
It also doesn’t work
require(/opt/data/pi.php): failed to open stream: Permission denied in /var/www/html/nextcloud/pi.php
So problem is not in the NextCloud itself, but in my config somewhere somehow…
/opt all is 777 and apache:apache in shell all commands works great, but from Apache somehow noooot 👎
Keep on digging :slight_smile:
Thnx tflidd, problem was SELinux!