nextcloud / nextcloud/previewgenerator
OCP\Files\NotPermittedException: Could not create folder
Open
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 520
- Forks
- 55
- PR merge metrics
- No merged PRs in 30d
Description
Nextcloud 27.1.1
App Version 5.3.0
{"reqId":"vCSnsB4a1rJGGcirP94I","level":3,"time":"2023-10-04T10:57:46-05:00","remoteAddr":"1.0.0.2","user":"xxxx","app":"index","method":"GET","url":"/apps/photos/api/v1/preview/636520?etag=f9f1277d1f1622ad879fe0cde4767b45&x=64&y=64","message":"Could not create folder \"/appdata_oc368e1f50dl/preview/4/d/8/1/3/f/7/636520\"","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36","version":"27.1.1.0","exception":{"Exception":"OCP\\Files\\NotPermittedException","Message":"Could not create folder \"/appdata_oc368e1f50dl/preview/4/d/8/1/3/f/7/636520\"","Code":0,"Trace":[{"file":"/var/www/nextcloud/lib/private/Files/AppData/AppData.php","line":147,"function":"newFolder","class":"OC\\Files\\Node\\Folder","type":"->"},{"file":"/var/www/nextcloud/lib/private/Preview/Storage/Root.php","line":74,"function":"newFolder","class":"OC\\Files\\AppData\\AppData","type":"->"},{"file":"/var/www/nextcloud/lib/private/Preview/Generator.php","line":643,"function":"newFolder","class":"OC\\Preview\\Storage\\Root","type":"->"},{"file":"/var/www/nextcloud/lib/private/Preview/Generator.php","line":139,"function":"getPreviewFolder","class":"OC\\Preview\\Generator","type":"->"},{"file":"/var/www/nextcloud/lib/private/Preview/Generator.php","line":116,"function":"generatePreviews","class":"OC\\Preview\\Generator","type":"->"},{"file":"/var/www/nextcloud/lib/private/PreviewManager.php","line":192,"function":"getPreview","class":"OC\\Preview\\Generator","type":"->"},{"file":"/var/www/nextcloud/apps/photos/lib/Controller/PreviewController.php","line":162,"function":"getPreview","class":"OC\\PreviewManager","type":"->"},{"file":"/var/www/nextcloud/apps/photos/lib/Controller/PreviewController.php","line":128,"function":"fetchPreview","class":"OCA\\Photos\\Controller\\PreviewController","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":230,"function":"index","class":"OCA\\Photos\\Controller\\PreviewController","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":137,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":183,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":315,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/nextcloud/lib/base.php","line":1068,"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":162,"CustomMessage":"--"},"id":"651d8d1b292dd"}
Also happen on photos.
https://github.com/nextcloud/photos/issues/1498
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the reported trace in lib/private/Files/AppData/AppData.php, lib/private/Preview/Storage/Root.php, and lib/private/Preview/Generator.php, then compare the related nextcloud/photos issue 1498. Reproduce the preview request for item 636520 and determine why the preview folder cannot be created. Done means the reported NotPermittedException is explained and preview generation works without the folder-creation error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100