Tell us what should happen
Tell us what happens instead
Error | PHP | fread(): read of 8192 bytes failed with errno=21 Is a directory at /var/www/nextcloud/lib/private/Files/Storage/Wrapper/Encryption.php#861
-- | -- | --
Operating system:
Ubunti 18.0.4
Web server:
Apache2
Database:
MySQL
PHP version:
7.4.7
Nextcloud version: (see Nextcloud admin page)
19.0
Updated from an older Nextcloud/ownCloud or fresh install:
Where did you install Nextcloud from:
Signing status:
Signing status
Login as admin user into your Nextcloud and access
http://example.com/index.php/settings/integrity/failed
paste the results here.
List of activated apps:
App list
Enabled:
If you have access to your command line run e.g.:
sudo -u www-data php occ app:list
from within your Nextcloud installation folder
Nextcloud configuration:
Config report
If you have access to your command line run e.g.:
sudo -u www-data php occ config:list system
from within your Nextcloud installation folder
or
Insert your config.php content here.
Make sure to remove all sensitive content such as passwords. (e.g. database password, passwordsalt, secret, smtp password, …)
Are you using external storage, if yes which one: local/smb/sftp/...
Are you using encryption: yes/no
Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...
LDAP config
With access to your command line run e.g.:
sudo -u www-data php occ ldap:show-config
from within your Nextcloud installation folder
Without access to your command line download the data/owncloud.db to your local
computer or access your SQL server remotely and run the select query:
SELECT * FROM `oc_appconfig` WHERE `appid` = 'user_ldap';
Eventually replace sensitive data as the name/IP-address of your LDAP server or groups.
Browser:
Operating system:
Web server error log
Insert your webserver log here
Nextcloud log
Insert your Nextcloud log here
Browser log
Insert your browser log here, this could for example include:
a) The javascript console log
b) The network log
c) ...

Looks like it may have something to do with PHP 7.4.7 I went back to PHP 7.3.19 and did not get that error.
I can confirm this bug. I have the same error using the docker image with PHP 7.4.7.
Hello any updates on this.
Still have this issue
Fatal | webdav | TypeError: Argument 2 passed to OC\Files\Storage\Wrapper\Encryption::modifyMetaData() must be of the type array, null given, called in /var/www/nextcloud/lib/private/Files/Storage/Wrapper/Encryption.php on line 208 | | 16 minutes ago
-- | -- | -- | -- | --
Error | PHP | Trying to access array offset on value of type null at /var/www/nextcloud/lib/private/Files/Storage/Wrapper/Encryption.php#208 | | 16 minutes ago
Fatal | webdav | TypeError: Argument 2 passed to OC\Files\Storage\Wrapper\Encryption::modifyMetaData() must be of the type array, null given, called in /var/www/nextcloud/lib/private/Files/Storage/Wrapper/Encryption.php on line 208 | | 17 minutes ago
Error | PHP | Trying to access array offset on value of type null at /var/www/nextcloud/lib/private/Files/Storage/Wrapper/Encryption.php#208 | | 17 minutes ago
Error | PHP | fread(): read of 8192 bytes failed with errno=21 Is a directory at /var/www/nextcloud/lib/private/Files/Storage/Wrapper/Encryption.php#861
Still having this issue on Nextcloud 19.0.1 PHP: Version: 7.4.8
@MorrisJobke Is this something thats being worked on?
fread(): read of 8192 bytes failed with errno=21 Is a directory at /var/www/nextcloud/lib/private/Files/Storage/Wrapper/Encryption.php#862
@MorrisJobke any updates on this issue?
@MorrisJobke any updates on this issue?
Not really. I linked just the wrong ticket 🙈
@MorrisJobke Okay thank you for the update. Anyway we can have someone look into this please!
Same issue on NC 19.0.3
Have exactly the same problem after updating to 19.0.3. All previous versions worked just fine.
@MorrisJobke Do we have an leads on this?
@axheli I do have these errors in the log as well.
And also in the client

But it doesn't seem to affect Nextcloud beyond these errors.
Everythings gets deleted fine, and uploaded fine.
Or did I miss something?
Please fix asap. Also having this issue on NC 19.0.4
I have an encrypted nextcloud (encrypted for each user separately). The error occurs, when a user tries to delete a folder in a folder, that is shared with him.
It also occurs when I try to cut and paste a folder.
Error: fread(): read of 8192 bytes failed with errno=21 Is a directory at /var/www/nextcloud/lib/private/Files/Storage/Wrapper/Encryption.php#862
Operating system: Ubuntu server 18.0.4
Web server: Apache2
Database: MySQL / MariaDB
PHP version: 7.4.3
Nextcloud version: (see Nextcloud admin page) 19.0.4
Updated from an older Nextcloud/ownCloud or fresh install: From Nextcloud 18 (Nextcloud 18 was fresh install)
Getting dozens of those:
`Error: fread(): read of 8192 bytes failed with errno=21 Is a directory at /var/www/nextcloud/lib/private/Files/Storage/Wrapper/Encryption.php#862
<
OC\Log\ErrorHandler::onError()
/var/www/nextcloud/lib/private/Files/Storage/Wrapper/Encryption.php - line 862:
fread()
/var/www/nextcloud/lib/private/Files/Storage/Wrapper/Encryption.php - line 930:
OC\Files\Storage\Wrapper\Encryption->readFirstBlock()
/var/www/nextcloud/lib/private/Files/Storage/Wrapper/Encryption.php - line 961:
OC\Files\Storage\Wrapper\Encryption->getHeader()
/var/www/nextcloud/lib/private/Files/Storage/Wrapper/Encryption.php - line 294:
OC\Files\Storage\Wrapper\Encryption->getEncryptionModule()
/var/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php - line 278:
OC\Files\Storage\Wrapper\Encryption->rename()
/var/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php - line 572:
OC\Files\Storage\Wrapper\Wrapper->rename()
/var/www/nextcloud/apps/files_trashbin/lib/Trashbin.php - line 294:
OC\Files\Storage\Wrapper\Wrapper->moveFromStorage()
/var/www/nextcloud/apps/files_trashbin/lib/Trash/LegacyTrashBackend.php - line 108:
OCA\Files_Trashbin\Trashbin::move2trash()
/var/www/nextcloud/apps/files_trashbin/lib/Trash/TrashManager.php - line 103:
OCA\Files_Trashbin\Trash\LegacyTrashBackend->moveToTrash()
/var/www/nextcloud/apps/files_trashbin/lib/Storage.php - line 192:
OCA\Files_Trashbin\Trash\TrashManager->moveToTrash()
/var/www/nextcloud/apps/files_trashbin/lib/Storage.php - line 118:
OCA\Files_Trashbin\Storage->doDelete()
/var/www/nextcloud/lib/private/Files/View.php - line 1161:
OCA\Files_Trashbin\Storage->rmdir()
/var/www/nextcloud/lib/private/Files/View.php - line 350:
OC\Files\View->basicOperation()
/var/www/nextcloud/apps/dav/lib/Connector/Sabre/Directory.php - line 308:
OC\Files\View->rmdir()
/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Tree.php - line 183:
OCA\DAVConnector\Sabre\Directory->delete()
/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php - line 295:
Sabre\DAV\Tree->delete()
/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php - line 89:
Sabre\DAVCorePlugin->httpDelete()
/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 474:
Sabre\DAV\Server->emit()
/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 251:
Sabre\DAV\Server->invokeMethod()
/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 319:
Sabre\DAV\Server->start()
/var/www/nextcloud/apps/dav/lib/Server.php - line 320:
Sabre\DAV\Server->exec()
/var/www/nextcloud/apps/dav/appinfo/v2/remote.php - line 35:
OCA\DAV\Server->exec()
/var/www/nextcloud/remote.php - line 167:
require_once("/var/www/ne ... p")`
Based on what i can see its happening on PHP 7.4 if you downgrade to 7.3 i dont see this error, but that's not a solutions. There should be a fix of this.
Based on what i can see its happening on PHP 7.4 if you downgrade to 7.3 i dont see this error, but that's not a solutions. There should be a fix of this.
Hopefully for NC 19.0.6 and 20.0.3. This error is crowding my logfiles for weeks already.
@MorrisJobke any updates on this issue?
Not really. I linked just the wrong ticket 🙈
Can you please unlink this since you liked it to the wrong ticket so we can get a fix for this?
Can you please unlink this since you liked it to the wrong ticket so we can get a fix for this?
There is no such thing as unlink. I mentioned it and then it will be shown in here. Deleting the mention also still keeps the entry in here. So not much I can do here.