Problems with restored folder

Sorry to hear you’re facing problems :slight_frown:

If you’re urgently looking for support to keep your business running, consider checking out our paid support options.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the following as you can (you can cut and paste this into your topic):

Nextcloud version (eg, 10.0.2): 12.0.0
Operating system and version (eg, Ubuntu 16.04): debian 8 jessie
Apache or nginx version (eg, Apache 2.4.25): apache 2.4.10
PHP version (eg, 5.6): php5.6.30-0 +deb8u1
Is this the first time you’ve seen this error?: yes

Can you reliably replicate it? (If so, please outline steps): not for sure, first user who has this problem

The issue you are facing: user erased a synced folder, after a few hours he recoverd the item via webinterface. now the folder is marked red in windows nextcloud client, and is not beeing synced. when he browse the recovered folder via webinterface, you see all files and folders, but youre unable to open them, filsize 0kb ore sometihing like this. Looking into the users date/files folder on the linux root filesystem shows correct file size.
any idea, how we can get the files back to working?

The output of your Nextcloud log in Admin > Logging:

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

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

Remember, this information may be requested if it isn’t supplied; for fastest response please provide as much as you can :heart: Feel free to use a pastebin service, otherwise log files can be indented with 4 spaces on each line to present them in a friendlier way on the forum.

I would open the client, then unselect the folder from syncing (will delete the folder on the client), then wait until the client is properly synced and add the folder again.

Thanks for your answer, this is something we already did.
Problem is that the files are missing an the local client, but as mentioned above we see them looking into the local filesystem / data folder on the nextcloud server.
And also if we would like to open some of the files via web interface, where everything is shown correctly, we get errors, that files aren’t accessible or something else.
Looks like something during the recovery process went wrong.

you can run a check over all data, make sure the permissions of files and folders allow access of the weserver-user.
sudo -u webserver-user php /path/to/nextcloud/occ files:scan --all

sorry for the late reply, had some days holiday.
The file scandid not bring any change, but now we get the following error after next sync to the nextcloud server:

OCP\Encryption\Exceptions\GenericEncryptionException: Bad Signature

/var/www/nextcloud/apps/encryption/lib/Crypto/Crypt.php - line 463: OCA\Encryption\Crypto\Crypt->checkSignature('2JMbAKYoJWnWYUg...', 'ZH\xA9\x06\xEF\xBDH\xA3$ w/89\xD7...', 'cd86da35f717daa...')
/var/www/nextcloud/apps/encryption/lib/Crypto/Encryption.php - line 378: OCA\Encryption\Crypto\Crypt->symmetricDecryptFileContent('2JMbAKYoJWnWYUg...', 'ZH\xA9\x06\xEF\xBDH\xA3$ w/89\xD7...', 'AES-256-CTR', 0, 0)
/var/www/nextcloud/lib/private/Files/Stream/Encryption.php - line 460: OCA\Encryption\Crypto\Encryption->decrypt(*** sensitive parameters replaced ***)
/var/www/nextcloud/lib/private/Files/Stream/Encryption.php - line 291: OC\Files\Stream\Encryption->readCache()
[internal function] OC\Files\Stream\Encryption->stream_read(8192)
/var/www/nextcloud/3rdparty/icewind/streams/src/Wrapper.php - line 83: fread(Resource id #43, 8192)
/var/www/nextcloud/3rdparty/icewind/streams/src/CallbackWrapper.php - line 91: Icewind\Streams\Wrapper->stream_read(8192)
[internal function] Icewind\Streams\CallbackWrapper->stream_read(8192)
/var/www/nextcloud/3rdparty/sabre/http/lib/Sapi.php - line 78: stream_copy_to_stream(Resource id #46, Resource id #48, '68352')
/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 498: Sabre\HTTP\Sapi sendResponse(Object(Sabre\HTTP\Response))
/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 254: Sabre\DAV\Server->invokeMethod(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))
/var/www/nextcloud/apps/dav/lib/Server.php - line 253: Sabre\DAV\Server->exec()
/var/www/nextcloud/apps/dav/appinfo/v2/remote.php - line 33: OCA\DAV\Server->exec()
/var/www/nextcloud/remote.php - line 162: require_once('/var/www/nextcl...')

Any further suggestions?


seems to be related to the encryption app @bjoern

okay, so if the problem is related by the encryption app, is there any chance to get the data back working?

The signature is already broken, so you can’t just restore it. I tried once to set it up to ignore signature errors (just to get the files back) but I didn’t succeed (I’m not a php expert):

I created a new feature request to provide a tools to allow decryption despite of signature errors: