# Could not create folder, false error?

**URL:** <https://help.nextcloud.com/t/could-not-create-folder-false-error/65962>\
**Category:** ℹ️ Support\
**Created:** [December 10, 2019, 6:38pm UTC](https://help.nextcloud.com/t/could-not-create-folder-false-error/65962 "2019-12-10T18:38:47Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Xaero](https://help.nextcloud.com/letter_avatar/xaero/32/6_22734026db12803ebb3e059622ac3534.png) [@Xaero](https://help.nextcloud.com/u/Xaero)\
**Post date:** [December 10, 2019, 6:38pm UTC](https://help.nextcloud.com/t/could-not-create-folder-false-error/65962/1 "2019-12-10T18:38:47Z")

</div>

Nextcloud version: 17.0.1  
Operating system: Ubuntu 18.04.3 LTS (Standard LAMP install)  
Apache version: 2.4.29  
PHP version: 7.2.24  
MySQL version: 5.7.28  
Redis-server: 5.4.0.9

I have made a fresh install Ubuntu LAMP with latest Nextcloud manual install. I run Nextcloud as the only “site” on the server and use the default /var/www/html as web root. The files are owned by www-data:www-data and all other file and folder permissions has been set as per recommendations to the manual. I have applied all recommendations in the “Overview” tab in the admin panel. I have my primary Nextcloud storage configured to use a CIFS share mounted in /mnt/nextcloud, also set with recommended file and folder owner and permissions. The server and the Nextcloud instance is running perfect.

My CIFS mount in fstab:

```auto
//servername/nextcloud /mnt/nextcloud cifs vers=3.0,iocharset=utf8,gid=33,dir_mode=0770,credentials=/root/smbcredentials,uid=33 0 0

```

My Nexcloud config has some adjustments, but is minimal:

```auto
root@nextcloud:/var/www/html/config# cat config.php
<?php
$CONFIG = array (
  'instanceid' => 'XXXXXXXXXXXXXXXXXXX',
  'passwordsalt' => 'XXXXXXXXXXXXXXXXXXX',
  'secret' => 'XXXXXXXXXXXXXXXXXXX',
  'trusted_domains' =>
  array (
    0 => 'XXXXXXXXXXXXXXXXXXX:8443',
    1 => 'XXXXXXXXXXXXXXXXXXX:8443',
  ),
  'datadirectory' => '/mnt/nextcloud/',
  'dbtype' => 'mysql',
  'version' => '17.0.1.1',
  'overwrite.cli.url' => 'https://XXXXXXXXXXXXXXXXXXX:8443',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'oc_admin',
  'dbpassword' => 'XXXXXXXXXXXXXXXXXXX',
  'installed' => true,
  'filesystem_check_changes' => 1,
  'filelocking.enabled' => true,
  'maintenance' => false,
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'overwriteprotocol' => 'https',
  'preview_max_x' => 1024,
  'preview_max_y' => 768,
  'preview_max_scale_factor' => 1,
  'redis' =>
  array (
    'host' => '/var/run/redis/redis-server.sock',
    'port' => 0,
    'timeout' => 0.0,
  ),
  'mail_smtpmode' => 'smtp',
  'mail_smtphost' => 'smtp.XXXXXXXXXXXXXXXXXXX',
  'mail_sendmailmode' => 'smtp',
  'mail_smtpport' => '465',
  'mail_smtpsecure' => 'ssl',
  'mail_from_address' => 'XXXXXXXXXXXXXXXXXXX',
  'mail_domain' => 'XXXXXXXXXXXXXXXXXXX',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtpauth' => 1,
  'mail_smtpname' => 'XXXXXXXXXXXXXXXXXXX',
  'mail_smtppassword' => 'XXXXXXXXXXXXXXXXXXX',
);

```

The issue you are facing:

The warnings I get in my Nextcloud admin log (see full error below), indicates that there was an error to create a new folder. This error is generated in my log every now and then when I scroll through a folder with thousands if photos, using the gallery preview on my iPhone. Upon investigation, the folder that is indicated in the error, is the preview cache folders that is auto generated in AppData. I double checked the permissions, and they are set correct. How ever, I also noticed that the cache folder already has thousands of successfully auto generated folders, including the one that the error log indicated couldn’t be created. So somewhere the generation of folders tries to create duplicates, or there’s some other bug in the process of checking and creating the folders.

Steps to replicate it:

1. Add a folder with thousands of photos to your user storage.
2. Using the Nextcloud app on an iPhone, fast scroll down the gallery app with an occasional pause for the previews to show on screen.
3. Check admin GUI error log for “OCP\Files\NotPermittedException”

The output of your Nextcloud log in **Admin \> Logging** :

```auto
	OCP\Files\NotPermittedException: Could not create folder
/var/www/html/lib/private/Files/AppData/AppData.php - line 155:

OC\Files\Node\Folder->newFolder("45349")

/var/www/html/lib/private/Preview/Generator.php - line 432:

OC\Files\AppData\AppData->newFolder("45349")

/var/www/html/lib/private/Preview/Generator.php - line 118:

OC\Preview\Generator->getPreviewFolder(OC\Files\Node\File {})

/var/www/html/lib/private/PreviewManager.php - line 210:

OC\Preview\Generator->getPreview(OC\Files\Node\File {}, 281, 609, false, "cover", "image/jpeg")

/var/www/html/core/Controller/PreviewController.php - line 170:

OC\PreviewManager->getPreview(OC\Files\Node\File {}, 281, 609, false, "cover")

/var/www/html/core/Controller/PreviewController.php - line 105:

OC\Core\Controller\PreviewController->fetchPreview(OC\Files\Node\File {}, 281, 609, true, true, "cover")

/var/www/html/lib/private/AppFramework/Http/Dispatcher.php - line 170:

OC\Core\Controller\PreviewController->getPreview("Data/photos ... G", 281, 609, true, true, "cover")

/var/www/html/lib/private/AppFramework/Http/Dispatcher.php - line 99:

OC\AppFramework\Http\Dispatcher->executeController(OC\Core\Cont ... {}, "getPreview")

/var/www/html/lib/private/AppFramework/App.php - line 126:

OC\AppFramework\Http\Dispatcher->dispatch(OC\Core\Cont ... {}, "getPreview")

/var/www/html/lib/private/AppFramework/Routing/RouteActionHandler.php - line 47:

OC\AppFramework\App::main("OC\\Core\\C ... r", "getPreview", OC\AppFramew ... {}, { _route: "c ... "})

<<closure>>

OC\AppFramework\Routing\RouteActionHandler->__invoke({ _route: "c ... "})

/var/www/html/lib/private/Route/Router.php - line 297:

call_user_func(OC\AppFramew ... {}, { _route: "c ... "})

/var/www/html/lib/base.php - line 1000:

OC\Route\Router->match("/core/preview.png")

/var/www/html/index.php - line 42:

OC::handleRequest()

```

Thankful for any suggestions and advice.

---

<div class="post-metadata">

**Author:** ![Xaero](https://help.nextcloud.com/letter_avatar/xaero/32/6_22734026db12803ebb3e059622ac3534.png) [@Xaero](https://help.nextcloud.com/u/Xaero)\
**Post date:** [December 12, 2019, 6:33am UTC](https://help.nextcloud.com/t/could-not-create-folder-false-error/65962/2 "2019-12-12T06:33:15Z")

</div>

A little bump to this one. I’ve been at it for hours yesterday and can’t seem to find what the issue is.

---

<div class="post-metadata">

**Author:** ![Xaero](https://help.nextcloud.com/letter_avatar/xaero/32/6_22734026db12803ebb3e059622ac3534.png) [@Xaero](https://help.nextcloud.com/u/Xaero)\
**Post date:** [January 2, 2020, 8:51am UTC](https://help.nextcloud.com/t/could-not-create-folder-false-error/65962/3 "2020-01-02T08:51:15Z")

</div>

EDIT: This was NOT the solution, still the same error.  
Soo… I have solved this one after extensive testing. If anyone has this exact same error, look in your linux system log if you also see “cifs vfs free previous auth\_key.response”. The “permission” error occurred at the same time as I get the CIFS error. This seems to be related to SMB mounts using SMB version 3.02 (which is default in ubuntu 18.04 of left unconfigured) Try set version 2.0 or 3.0 instead. This worked for me.

---

<div class="post-metadata">

**Author:** ![Xaero](https://help.nextcloud.com/letter_avatar/xaero/32/6_22734026db12803ebb3e059622ac3534.png) [@Xaero](https://help.nextcloud.com/u/Xaero)\
**Post date:** [January 7, 2020, 6:58am UTC](https://help.nextcloud.com/t/could-not-create-folder-false-error/65962/4 "2020-01-07T06:58:07Z")

</div>

May have spoke too soon. The error is still there, so above “solution” is not it…

---

<div class="post-metadata">

**Author:** ![Xaero](https://help.nextcloud.com/letter_avatar/xaero/32/6_22734026db12803ebb3e059622ac3534.png) [@Xaero](https://help.nextcloud.com/u/Xaero)\
**Post date:** [May 22, 2020, 6:13am UTC](https://help.nextcloud.com/t/could-not-create-folder-false-error/65962/5 "2020-05-22T06:13:39Z")

</div>

Several patches later I still have this error. Too bad this forum is dead 😕

---

<div class="post-metadata">

**Author:** ![VGE](https://help.nextcloud.com/letter_avatar/vge/32/6_22734026db12803ebb3e059622ac3534.png) [@VGE](https://help.nextcloud.com/u/VGE)\
**Post date:** [January 13, 2021, 10:27am UTC](https://help.nextcloud.com/t/could-not-create-folder-false-error/65962/6 "2021-01-13T10:27:22Z")

</div>

It is really dead… I have a same sort of issue, but no clear solution.

---

<div class="post-metadata">

**Author:** ![Xaero](https://help.nextcloud.com/letter_avatar/xaero/32/6_22734026db12803ebb3e059622ac3534.png) [@Xaero](https://help.nextcloud.com/u/Xaero)\
**Post date:** [January 13, 2021, 11:33am UTC](https://help.nextcloud.com/t/could-not-create-folder-false-error/65962/7 "2021-01-13T11:33:03Z")

</div>

I’m just gonna ditch nextcloud and get a proper storage system that has actual support.

---

<div class="post-metadata">

**Author:** ![wwe](https://help.nextcloud.com/user_avatar/help.nextcloud.com/wwe/32/72963_2.png) [@wwe](https://help.nextcloud.com/u/wwe)\
**Post date:** [December 4, 2024, 12:24pm UTC](https://help.nextcloud.com/t/could-not-create-folder-false-error/65962/8 "2024-12-04T12:24:43Z")

</div>



---

<div class="post-metadata">

**Author:** ![wwe](https://help.nextcloud.com/user_avatar/help.nextcloud.com/wwe/32/72963_2.png) [@wwe](https://help.nextcloud.com/u/wwe)\
**Post date:** [December 11, 2024, 4:07pm UTC](https://help.nextcloud.com/t/could-not-create-folder-false-error/65962/9 "2024-12-11T16:07:46Z")

</div>


