Nextcloud 19.0.1 Problem with deleting files/folders

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version: 19.0.1 - 19.0.1.1
Operating system and version: Linux 5.4.51-v7l+ #1327 SMP Thu Jul 23 11:04:39 BST 2020 armv7l
Apache or nginx version : nginx/1.18.0 (fpm-fcgi)
PHP version: 7.4.8

Modules loaded: Core, date, libxml, openssl, pcre, zlib, filter, hash, Reflection, SPL, session, standard, sodium, cgi-fcgi, mysqlnd, PDO, xml, apcu, bcmath, bz2, calendar, ctype, curl, dom, mbstring, FFI, fileinfo, ftp, gd, gettext, gmp, iconv, igbinary, imagick, intl, json, ldap, exif, mysqli, pdo_mysql, Phar, posix, readline, redis, shmop, SimpleXML, sockets, sysvmsg, sysvsem, sysvshm, tokenizer, xmlreader, xmlwriter, xsl, zip, Zend OPcache

The issue you are facing:

Problem with deleting files and folders

Is this the first time you’ve seen this error? (Y/N): N

Steps to replicate it:

  1. delete file in groupfolder or in normal folder
  2. get status error deleting “file/folder”

The output of your Nextcloud log in Admin > Logging:

{"reqId":"G4OZXksiR6VUA2mSqsCO","level":4,"time":"2020-08-05T13:50:46+02:00","remoteAddr":"1**.***.***.***","user":"***Username***","app":"webdav","method":"DELETE","url":"/remote.php/dav/files/***Username***/**folderstructure**/*filename*","message":{"Exception":"Exception","Message":"Failed to move groupfolder item to trash","Code":0,"Trace":[{"file":"/var/www/nextcloud/apps/files_trashbin/lib/Trash/TrashManager.php","line":103,"function":"moveToTrash","class":"OCA\\GroupFolders\\Trash\\TrashBackend","type":"->"},{"file":"/var/www/nextcloud/apps/files_trashbin/lib/Storage.php","line":192,"function":"moveToTrash","class":"OCA\\Files_Trashbin\\Trash\\TrashManager","type":"->"},{"file":"/var/www/nextcloud/apps/files_trashbin/lib/Storage.php","line":99,"function":"doDelete","class":"OCA\\Files_Trashbin\\Storage","type":"->"},{"file":"/var/www/nextcloud/apps/files_accesscontrol/lib/StorageWrapper.php","line":287,"function":"unlink","class":"OCA\\Files_Trashbin\\Storage","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/View.php","line":1161,"function":"unlink","class":"OCA\\FilesAccessControl\\StorageWrapper","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/View.php","line":718,"function":"basicOperation","class":"OC\\Files\\View","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/File.php","line":455,"function":"unlink","class":"OC\\Files\\View","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Tree.php","line":183,"function":"delete","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":295,"function":"delete","class":"Sabre\\DAV\\Tree","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpDelete","class":"Sabre\\DAV\\CorePlugin","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":474,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":251,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":319,"function":"start","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/Server.php","line":320,"function":"exec","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/appinfo/v2/remote.php","line":35,"function":"exec","class":"OCA\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/remote.php","line":167,"args":["/var/www/nextcloud/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/var/www/nextcloud/apps/groupfolders/lib/Trash/TrashBackend.php","Line":183,"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (Windows NT 10.0; rv:78.0) Gecko/20100101 Firefox/78.0","version":"19.0.1.1","id":"5f2a9d35d8e6c"}

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

{
    "instanceid": "***REMOVED SENSITIVE VALUE***",
    "passwordsalt": "***REMOVED SENSITIVE VALUE***",
    "secret": "***REMOVED SENSITIVE VALUE***",
    "trusted_domains": [
        "***REMOVED SENSITIVE VALUE***",
        "***REMOVED SENSITIVE VALUE***",
        "localhost",
        "***REMOVED SENSITIVE VALUE***"
    ],
    "datadirectory": "***REMOVED SENSITIVE VALUE***",
    "dbtype": "mysql",
    "version": "19.0.1.1",
    "overwritehost": "***REMOVED SENSITIVE VALUE***",
    "overwriteprotocol": "https",
    "overwritewebroot": "\/",
    "overwrite.cli.url": "***REMOVED SENSITIVE VALUE***",
    "dbname": "***REMOVED SENSITIVE VALUE***",
    "dbhost": "***REMOVED SENSITIVE VALUE***",
    "dbport": "",
    "dbtableprefix": "oc_",
    "mysql.utf8mb4": true,
    "dbuser": "***REMOVED SENSITIVE VALUE***",
    "dbpassword": "***REMOVED SENSITIVE VALUE***",
    "installed": true,
    "activity_expire_days": 14,
    "auth.bruteforce.protection.enabled": true,
    "blacklisted_files": [
        ".htaccess",
        "Thumbs.db",
        "thumbs.db"
    ],
    "cron_log": true,
    "enable_previews": true,
    "enabledPreviewProviders": [
        "OC\\Preview\\PNG",
        "OC\\Preview\\JPEG",
        "OC\\Preview\\GIF",
        "OC\\Preview\\BMP",
        "OC\\Preview\\XBitmap",
        "OC\\Preview\\Movie",
        "OC\\Preview\\PDF",
        "OC\\Preview\\MP3",
        "OC\\Preview\\TXT",
        "OC\\Preview\\MarkDown"
    ],
    "filesystem_check_changes": 0,
    "filelocking.enabled": "true",
    "htaccess.RewriteBase": "\/",
    "integrity.check.disabled": false,
    "knowledgebaseenabled": false,
    "logfile": "***REMOVED SENSITIVE VALUE***",
    "loglevel": 2,
    "logtimezone": "***REMOVED SENSITIVE VALUE***",
    "log_rotate_size": 104857600,
    "maintenance": false,
    "memcache.local": "\\OC\\Memcache\\APCu",
    "memcache.locking": "\\OC\\Memcache\\Redis",
    "preview_max_x": 1024,
    "preview_max_y": 768,
    "preview_max_scale_factor": 1,
    "redis": {
        "host": "***REMOVED SENSITIVE VALUE***",
        "port": 0,
        "timeout": 0
    },
    "quota_include_external_storage": false,
    "share_folder": "\/Shares",
    "skeletondirectory": "",
    "theme": "",
    "trashbin_retention_obligation": "auto, 7",
    "updater.release.channel": "stable",
    "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
    "app_install_overwrite": [
        "joplin"
    ],
    "twofactor_enforced": "true",
    "twofactor_enforced_groups": [],
    "twofactor_enforced_excluded_groups": []
}

The output of your Apache/nginx/system log in /var/log/____:

PASTE HERE

This is still a problem in 19.0.4
Anyone has a solution?

Please consider moving your question to these existing topics to keep the forum organized:

File stuck - can’t move or delete it
Issues with deleting, moving, and renaming files - External storage

apart from what @rhua just said…

have you checked the links? if one of it is fitting pls let us know and we would do the move for you (if you cant’t do it yourself)

I first tried following the next instruction:

Which at step one resulted in mayor errors and the process being killed:

Starting scan for user 1 out of 3 (Some_user_without_groupfolder_access)
Starting scan for user 2 out of 3 (Some_user_with_Groupfolder_access)
    Exception during scan: An exception occurred while executing 'SELECT `fileid` FROM `oc_filecache` WHERE (`storage` = ?) AND (`path_hash` = ?)' with params [1, "1e6013faa7e8570d55f5164261dc1b4d"]:

SQLSTATE[HY000]: General error: 2006 MySQL server has gone away
#0 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php(169): Doctrine\DBAL\Driver\AbstractMySQLDriver->convertException()
#1 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php(145): Doctrine\DBAL\DBALException::wrapException()
#2 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(911): Doctrine\DBAL\DBALException::driverExceptionDuringQuery()
#3 /var/www/nextcloud/lib/private/DB/Connection.php(194): Doctrine\DBAL\Connection->executeQuery()
#4 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Query/QueryBuilder.php(200): OC\DB\Connection->executeQuery()
#5 /var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php(216): Doctrine\DBAL\Query\QueryBuilder->execute()
#6 /var/www/nextcloud/lib/private/Files/Cache/Cache.php(472): OC\DB\QueryBuilder\QueryBuilder->execute()
#7 /var/www/nextcloud/lib/private/Files/Cache/Wrapper/CacheJail.php(144): OC\Files\Cache\Cache->getId()
#8 /var/www/nextcloud/lib/private/Files/Cache/Wrapper/CacheWrapper.php(151): OC\Files\Cache\Wrapper\CacheJail->getId()
#9 /var/www/nextcloud/apps/groupfolders/lib/Mount/RootEntryCache.php(47): OC\Files\Cache\Wrapper\CacheWrapper->getId()
#10 /var/www/nextcloud/lib/private/Files/Cache/Wrapper/CacheWrapper.php(151): OCA\GroupFolders\Mount\RootEntryCache->getId()
#11 /var/www/nextcloud/lib/private/Files/Cache/Scanner.php(386): OC\Files\Cache\Wrapper\CacheWrapper->getId()
#12 /var/www/nextcloud/lib/private/Files/Cache/Scanner.php(391): OC\Files\Cache\Scanner->scanChildren()
#13 /var/www/nextcloud/lib/private/Files/Cache/Scanner.php(391): OC\Files\Cache\Scanner->scanChildren()
#14 /var/www/nextcloud/lib/private/Files/Cache/Scanner.php(391): OC\Files\Cache\Scanner->scanChildren()
#15 /var/www/nextcloud/lib/private/Files/Cache/Scanner.php(340): OC\Files\Cache\Scanner->scanChildren()
#16 /var/www/nextcloud/lib/private/Files/Utils/Scanner.php(260): OC\Files\Cache\Scanner->scan()
#17 /var/www/nextcloud/apps/files/lib/Command/Scan.php(151): OC\Files\Utils\Scanner->scan()
#18 /var/www/nextcloud/apps/files/lib/Command/Scan.php(207): OCA\Files\Command\Scan->scanFiles()
#19 /var/www/nextcloud/3rdparty/symfony/console/Command/Command.php(255): OCA\Files\Command\Scan->execute()
#20 /var/www/nextcloud/core/Command/Base.php(169): Symfony\Component\Console\Command\Command->run()
#21 /var/www/nextcloud/3rdparty/symfony/console/Application.php(1012): OC\Core\Command\Base->run()
#22 /var/www/nextcloud/3rdparty/symfony/console/Application.php(272): Symfony\Component\Console\Application->doRunCommand()
#23 /var/www/nextcloud/3rdparty/symfony/console/Application.php(148): Symfony\Component\Console\Application->doRun()
#24 /var/www/nextcloud/lib/private/Console/Application.php(215): Symfony\Component\Console\Application->run()
#25 /var/www/nextcloud/console.php(100): OC\Console\Application->run()
#26 /var/www/nextcloud/occ(11): require_once('/var/www/nextcl...')
#27 {main}
Starting scan for user 3 out of 3 (Some_other_user)
Killed

After this i tried the next proposed solution which actually solved some problems (but not all).

Then I went back to the first procedure, which this time didn’t cause any errors.
But still didn’t solve the problem.

So to be clear:

The newer problem in my log file named (and occured after my initial post):

OCP\Files\NotPermittedException: Could not create path

Is SOLVED with the instructions.

But the one in my log file that is named:

Exception: Failed to move groupfolder item to trash

Still occurs

I do not wish to move this question to another topic, as i’m quite sure it is a problem on it’s own that has not been solved yet… (or that i’m aware of after frantically searching for a solution on the forum.)

Is there any more information that can help search for a solution?

Thanks a lot.