You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When clicking in fresh nc installation (v24.0.2 but was seen in earlier versions also) sometimes NotPermittedException occurs in error log; with #33061 applied one can see, that nc probably tries to create dir in / not in datadirectory (which is set not to / but to /some/subdir and permissions are ok there).
Examples:
(1) /appdata_oc034hqmkiqu/js/files
2022-06-29 11:43:56 [...] {"reqId":"mHgE762aPEcPc8eNUepJ","level":3,"time":"2022-06-29T09:43:56+00:00","remoteAddr":"[...]","user":"[...]","app":"index","method":"GET","url":"/apps/files/","message":"{\"Exception\":\"OCP\\\\Files\\\\NotPermittedException\",\"Message\":\"Could not create folder \\\"/appdata_oc034hqmkiqu/js/files\\\"\",\"Code\":0,\"Trace\":[{\"file\":\"/var/www/nextcloud/lib/private/Files/AppData/AppData.php\",\"line\":156,\"function\":\"newFolder\",\"class\":\"OC\\\\Files\\\\Node\\\\Folder\",\"type\":\"->\"},{\"file\":\"/var/www/nextcloud/lib/private/Template/JSCombiner.php\",\"line\":91,\"function\":\"newFolder\",\"class\":\"OC\\\\Files\\\\AppData\\\\AppData\",\"type\":\"->\"},{\"file\":\"/var/www/nextcloud/lib/private/Template/JSResourceLocator.php\",\"line\":123,\"function\":\"process\",\"class\":\"OC\\\\Template\\\\JSCombiner\",\"type\":\"->\"},{\"file\":\"/var/www/nextcloud/lib/private/Template/JSResourceLocator.php\",\"line\":110,\"function\":\"cacheAndAppendCombineJsonIfExist\",\"class\":\"OC\\\\Template\\\\JSResourceLocator\",\"type\":\"->\"},{\"file\":\"/var/www/nextcloud/lib/private/Template/ResourceLocator.php\",\"line\":78,\"function\":\"doFind\",\"class\":\"OC\\\\Template\\\\JSResourceLocator\",\"type\":\"->\"},{\"file\":\"/var/www/nextcloud/lib/private/TemplateLayout.php\",\"line\":377,\"function\":\"find\",\"class\":\"OC\\\\Template\\\\ResourceLocator\",\"type\":\"->\"},{\"file\":\"/var/www/nextcloud/lib/private/TemplateLayout.php\",\"line\":205,\"function\":\"findJavascriptFiles\",\"class\":\"OC\\\\TemplateLayout\",\"type\":\"::\"},{\"file\":\"/var/www/nextcloud/lib/private/legacy/OC_Template.php\",\"line\":185,\"function\":\"__construct\",\"class\":\"OC\\\\TemplateLayout\",\"type\":\"->\"},{\"file\":\"/var/www/nextcloud/lib/public/AppFramework/Http/TemplateResponse.php\",\"line\":204,\"function\":\"fetchPage\",\"class\":\"OC_Template\",\"type\":\"->\"},{\"file\":\"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php\",\"line\":178,\"function\":\"render\",\"class\":\"OCP\\\\AppFramework\\\\Http\\\\TemplateResponse\",\"type\":\"->\"},{\"file\":\"/var/www/nextcloud/lib/private/AppFramework/App.php\",\"line\":172,\"function\":\"dispatch\",\"class\":\"OC\\\\AppFramework\\\\Http\\\\Dispatcher\",\"type\":\"->\"},{\"file\":\"/var/www/nextcloud/lib/private/Route/Router.php\",\"line\":298,\"function\":\"main\",\"class\":\"OC\\\\AppFramework\\\\App\",\"type\":\"::\"},{\"file\":\"/var/www/nextcloud/lib/base.php\",\"line\":1023,\"function\":\"match\",\"class\":\"OC\\\\Route\\\\Router\",\"type\":\"->\"},{\"file\":\"/var/www/nextcloud/index.php\",\"line\":36,\"function\":\"handleRequest\",\"class\":\"OC\",\"type\":\"::\"}],\"File\":\"/var/www/nextcloud/lib/private/Files/Node/Folder.php\",\"Line\":164,\"CustomMessage\":\"--\"}","[...]","version":"24.0.2.1"}
(2) /appdata_oc1uj5kj618l/css/dashboard
2022-06-29 16:47:22 [...] {"reqId":"faFapQIgCcxdIgKnVLaR","level":3,"time":"2022-06-29T14:47:22+00:00","remoteAddr":"[...]","user":"[...]","app":"index","method":"GET","url":"/apps/dashboard/","message":"{\"Exception\":\"OCP\\\\Files\\\\NotPermittedException\",\"Message\":\"Could not create folder \\\"/appdata_oc1uj5kj618l/css/dashboard\\\"\",\"Code\":0,\"Trace\":[{\"file\":\"/var/www/nextcloud/lib/private/Files/AppData/AppData.php\",\"line\":156,\"function\":\"newFolder\",\"class\":\"OC\\\\Files\\\\Node\\\\Folder\",\"type\":\"->\"},{\"file\":\"/var/www/nextcloud/lib/private/Template/SCSSCacher.php\",\"line\":151,\"function\":\"newFolder\",\"class\":\"OC\\\\Files\\\\AppData\\\\AppData\",\"type\":\"->\"},{\"file\":\"/var/www/nextcloud/lib/private/Template/CSSResourceLocator.php\",\"line\":109,\"function\":\"process\",\"class\":\"OC\\\\Template\\\\SCSSCacher\",\"type\":\"->\"},{\"file\":\"/var/www/nextcloud/lib/private/Template/CSSResourceLocator.php\",\"line\":84,\"function\":\"cacheAndAppendScssIfExist\",\"class\":\"OC\\\\Template\\\\CSSResourceLocator\",\"type\":\"->\"},{\"file\":\"/var/www/nextcloud/lib/private/Template/ResourceLocator.php\",\"line\":78,\"function\":\"doFind\",\"class\":\"OC\\\\Template\\\\CSSResourceLocator\",\"type\":\"->\"},{\"file\":\"/var/www/nextcloud/lib/private/TemplateLayout.php\",\"line\":342,\"function\":\"find\",\"class\":\"OC\\\\Template\\\\ResourceLocator\",\"type\":\"->\"},{\"file\":\"/var/www/nextcloud/lib/private/TemplateLayout.php\",\"line\":250,\"function\":\"findStylesheetFiles\",\"class\":\"OC\\\\TemplateLayout\",\"type\":\"::\"},{\"file\":\"/var/www/nextcloud/lib/private/legacy/OC_Template.php\",\"line\":185,\"function\":\"__construct\",\"class\":\"OC\\\\TemplateLayout\",\"type\":\"->\"},{\"file\":\"/var/www/nextcloud/lib/public/AppFramework/Http/TemplateResponse.php\",\"line\":204,\"function\":\"fetchPage\",\"class\":\"OC_Template\",\"type\":\"->\"},{\"file\":\"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php\",\"line\":178,\"function\":\"render\",\"class\":\"OCP\\\\AppFramework\\\\Http\\\\TemplateResponse\",\"type\":\"->\"},{\"file\":\"/var/www/nextcloud/lib/private/AppFramework/App.php\",\"line\":172,\"function\":\"dispatch\",\"class\":\"OC\\\\AppFramework\\\\Http\\\\Dispatcher\",\"type\":\"->\"},{\"file\":\"/var/www/nextcloud/lib/private/Route/Router.php\",\"line\":298,\"function\":\"main\",\"class\":\"OC\\\\AppFramework\\\\App\",\"type\":\"::\"},{\"file\":\"/var/www/nextcloud/lib/base.php\",\"line\":1023,\"function\":\"match\",\"class\":\"OC\\\\Route\\\\Router\",\"type\":\"->\"},{\"file\":\"/var/www/nextcloud/index.php\",\"line\":36,\"function\":\"handleRequest\",\"class\":\"OC\",\"type\":\"::\"}],\"File\":\"/var/www/nextcloud/lib/private/Files/Node/Folder.php\",\"Line\":165,\"CustomMessage\":\"--\"}","userAgent":"[...]","version":"24.0.2.1"}
After errors, directory appdata_[...] specified in messages exists in datadirectory and nc is working fine, no other errors occur.
Sounds like some kind of race in fresh installation, before appdata_* subdir is created in datadirectory.
Initialize fresh nc installation and do some clicking (files, dashboard) and check error log. If no such message - try again after initialization (problem does not occur on every install).
Expected behavior
No NotPermittedException errors in log when datadirectory points to path with correct permissions.
Installation method
Manual installation
Operating system
Debian/Ubuntu
PHP engine version
PHP 7.4
Web server
Apache (supported)
Database engine version
MariaDB
Is this bug present after an update or on a fresh install?
Fresh Nextcloud Server install
Are you using the Nextcloud Server Encryption module?
Hi, please update to 24.0.9 or better 25.0.3 and report back if it fixes the issue. Thank you!
My goal is to add a label like e.g. 25-feedback to this ticket of an up-to-date major Nextcloud version where the bug could be reproduced. However this is not going to work without your help. So thanks for all your effort!
Bug description
When clicking in fresh nc installation (v24.0.2 but was seen in earlier versions also) sometimes NotPermittedException occurs in error log; with #33061 applied one can see, that nc probably tries to create dir in / not in datadirectory (which is set not to
/
but to/some/subdir
and permissions are ok there).Examples:
(1) /appdata_oc034hqmkiqu/js/files
(2) /appdata_oc1uj5kj618l/css/dashboard
After errors, directory
appdata_[...]
specified in messages exists in datadirectory and nc is working fine, no other errors occur.Sounds like some kind of race in fresh installation, before appdata_* subdir is created in datadirectory.
Similar reports (probably same cause):
#29980
https://help.nextcloud.com/t/ocp-files-notpermittedexception-could-not-create-folder/133818
https://help.nextcloud.com/t/could-not-create-folder-false-error/65962
Steps to reproduce
Initialize fresh nc installation and do some clicking (files, dashboard) and check error log. If no such message - try again after initialization (problem does not occur on every install).
Expected behavior
No
NotPermittedException
errors in log when datadirectory points to path with correct permissions.Installation method
Manual installation
Operating system
Debian/Ubuntu
PHP engine version
PHP 7.4
Web server
Apache (supported)
Database engine version
MariaDB
Is this bug present after an update or on a fresh install?
Fresh Nextcloud Server install
Are you using the Nextcloud Server Encryption module?
Encryption is Disabled
What user-backends are you using?
Configuration report
No response
List of activated Apps
Nextcloud Signing status
No response
Nextcloud Logs
No response
Additional info
No response
The text was updated successfully, but these errors were encountered: