Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[OCP\Files\NotPermittedException] Could not create folder "/appdata_ocfmw89yr7pg/preview/a/b/a/d/2/c/9/34634" Version 5.4.0 #453

Open
coesy opened this issue Mar 2, 2024 · 3 comments

Comments

@coesy
Copy link

coesy commented Mar 2, 2024

I've been trying to run occ preview:generate-all -vvv. It gets quite a lot of the way through the folders and just errors out with the error in the title. I've checked and the folder already exists, it seems to be trying to create the folder, see's that it exists and errors out. I keep getting stuck at this point. It seems that there are a few forum posts on this, is there a fix for this now? This is 5.4.0

Thanks

@coesy
Copy link
Author

coesy commented Mar 3, 2024

Full stack trace here

In Folder.php line 162:
2024-03-03T16:00:19+00:00                                                                                
2024-03-03T16:00:19+00:00   [OCP\Files\NotPermittedException]                                            
2024-03-03T16:00:19+00:00   Could not create folder "/appdata_ocfmw89yr7pg/preview/2/0/7/e/e/4/b/65940"  
2024-03-03T16:00:19+00:00                                                                                
2024-03-03T16:00:19+00:00 
2024-03-03T16:00:19+00:00 Exception trace:
2024-03-03T16:00:19+00:00   at /app/www/public/lib/private/Files/Node/Folder.php:162
2024-03-03T16:00:19+00:00  OC\Files\Node\Folder->newFolder() at /app/www/public/lib/private/Files/AppData/AppData.php:147
2024-03-03T16:00:19+00:00  OC\Files\AppData\AppData->newFolder() at /app/www/public/lib/private/Preview/Storage/Root.php:74
2024-03-03T16:00:19+00:00  OC\Preview\Storage\Root->newFolder() at /app/www/public/lib/private/Preview/Generator.php:607
2024-03-03T16:00:19+00:00  OC\Preview\Generator->getPreviewFolder() at /app/www/public/lib/private/Preview/Generator.php:133
2024-03-03T16:00:19+00:00  OC\Preview\Generator->generatePreviews() at /app/www/public/lib/private/PreviewManager.php:207
2024-03-03T16:00:19+00:00  OC\PreviewManager->generatePreviews() at /config/www/nextcloud/apps/previewgenerator/lib/Command/Generate.php:230
2024-03-03T16:00:19+00:00  OCA\PreviewGenerator\Command\Generate->parseFile() at /config/www/nextcloud/apps/previewgenerator/lib/Command/Generate.php:212
2024-03-03T16:00:19+00:00  OCA\PreviewGenerator\Command\Generate->parseFolder() at /config/www/nextcloud/apps/previewgenerator/lib/Command/Generate.php:210
2024-03-03T16:00:19+00:00  OCA\PreviewGenerator\Command\Generate->parseFolder() at /config/www/nextcloud/apps/previewgenerator/lib/Command/Generate.php:210
2024-03-03T16:00:19+00:00  OCA\PreviewGenerator\Command\Generate->parseFolder() at /config/www/nextcloud/apps/previewgenerator/lib/Command/Generate.php:190
2024-03-03T16:00:19+00:00  OCA\PreviewGenerator\Command\Generate->generateUserPreviews() at /config/www/nextcloud/apps/previewgenerator/lib/Command/Generate.php:136
2024-03-03T16:00:19+00:00  OCA\PreviewGenerator\Command\Generate->OCA\PreviewGenerator\Command\{closure}() at /app/www/public/lib/private/User/Manager.php:656
2024-03-03T16:00:19+00:00  OC\User\Manager->callForSeenUsers() at /config/www/nextcloud/apps/previewgenerator/lib/Command/Generate.php:135
2024-03-03T16:00:19+00:00  OCA\PreviewGenerator\Command\Generate->execute() at /app/www/public/3rdparty/symfony/console/Command/Command.php:298
2024-03-03T16:00:19+00:00  Symfony\Component\Console\Command\Command->run() at /app/www/public/3rdparty/symfony/console/Application.php:1040
2024-03-03T16:00:19+00:00  Symfony\Component\Console\Application->doRunCommand() at /app/www/public/3rdparty/symfony/console/Application.php:301
2024-03-03T16:00:19+00:00  Symfony\Component\Console\Application->doRun() at /app/www/public/3rdparty/symfony/console/Application.php:171
2024-03-03T16:00:19+00:00  Symfony\Component\Console\Application->run() at /app/www/public/lib/private/Console/Application.php:206
2024-03-03T16:00:19+00:00  OC\Console\Application->run() at /app/www/public/console.php:100
2024-03-03T16:00:19+00:00  require_once() at /app/www/public/occ:11
2024-03-03T16:00:19+00:00 
2024-03-03T16:00:19+00:00 preview:generate-all [-p|--path [PATH]] [--] [<user_id>...]
2024-03-03T16:00:19+00:00 

@A1asd
Copy link

A1asd commented Mar 13, 2024

Try running this command as the user this folder belongs too. Usually this should be www-data
sudo -u www-data occ preview:generate-all -vvv

@joshtrichards
Copy link
Member

joshtrichards commented Mar 29, 2024

Related (maybe): #421

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants