You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1 - create 2 users admin and user1
2 - Enable encryption with user-keys. Login as admin and user1.
3 - Now try to run decrypt-all command as follows: ./occ encryption:decrypt-all -c yes
4 - set admin pwd
5 - Stop the command with crtl ^c
6 - re-enable encryption ./occ encryption:enable
7 - re-run ./occ encryption:decrypt-all -c yes
Expected behaviour
Files should not get locked.
Actual behaviour
Files get locked. In the rename operation, the file gets locked. And once the file gets locked try to give Ctrl+C interrupt.
Server logs
{"reqId":"fIPdClUXId4qyQRzPcM3","level":3,"time":"2018-09-05T15:07:06+00:00","remoteAddr":"","user":"--","app":"OC\\Encryption\\DecryptAll","method":"--","url":"--","message":"Exception trying to decrypt file <\/admin\/files\/file1.txt> for user <admin>: {\"Exception\":\"Doctrine\\\\DBAL\\\\Exception\\\\DriverException\",\"Message\":\"An exception occurred while executing 'INSERT INTO \\\"oc_file_locks\\\" (\\\"key\\\",\\\"lock\\\",\\\"ttl\\\") SELECT ?,?,? WHERE NOT EXISTS (SELECT 1 FROM \\\"oc_file_locks\\\" WHERE \\\"key\\\" = ?)' with params [\\\"files\\\\\\\/7ff417ff21a5d83e5e739f9907ece177\\\", 1, 1536163626, \\\"files\\\\\\\/7ff417ff21a5d83e5e739f9907ece177\\\"]:\\n\\nSQLSTATE[HY000]: General error: 5 database is locked\",\"Code\":0,\"Trace\":\"#0 \\\/var\\\/www\\\/owncloud\\\/lib\\\/composer\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/DBALException.php(128): Doctrine\\\\DBAL\\\\Driver\\\\AbstractSQLiteDriver->convertException('An exception oc...', Object(Doctrine\\\\DBAL\\\\Driver\\\\PDOException))\\n#1 \\\/var\\\/www\\\/owncloud\\\/lib\\\/composer\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/Connection.php(1015):
Server configuration
Operating system:
Ubuntu 16.04
Web server:
Apache
Database:
MySQL
PHP version:
7.1
ownCloud version:
ownCloud 10.0.10RC1
Updated from an older ownCloud or fresh install:
Fresh
Are you using external storage, if yes which one:
No
Are you using encryption:
Yes
Logs
No logs in owncloud.log
Client configuration
browser
Firefox
The text was updated successfully, but these errors were encountered:
GitMate.io thinks possibly related issues are #22171 (Interruptable occ commands do not get interrupted when pressed ctrl-c), #26838 (File locking), #24737 (File Locked), #28991 (file is locked), and #16895 (File not decrypting).
Another solution would be to provide an occ command to release the lock for all files.
The alternative is waiting one hour then running cron for lock expiration...
In a scenario where the admin decided to interrupt decryption after realizing that it takes longer than expected, they should be able to recover quickly from the file locks. That's where an occ command would come handy.
Steps to reproduce
1 - create 2 users admin and user1
2 - Enable encryption with user-keys. Login as admin and user1.
3 - Now try to run decrypt-all command as follows:
./occ encryption:decrypt-all -c yes
4 - set admin pwd
5 - Stop the command with crtl ^c
6 - re-enable encryption
./occ encryption:enable
7 - re-run
./occ encryption:decrypt-all -c yes
Expected behaviour
Files should not get locked.
Actual behaviour
Files get locked. In the rename operation, the file gets locked. And once the file gets locked try to give Ctrl+C interrupt.
Server logs
Server configuration
Operating system:
Ubuntu 16.04
Web server:
Apache
Database:
MySQL
PHP version:
7.1
ownCloud version:
ownCloud 10.0.10RC1
Updated from an older ownCloud or fresh install:
Fresh
Are you using external storage, if yes which one:
No
Are you using encryption:
Yes
Logs
Client configuration
browser
Firefox
The text was updated successfully, but these errors were encountered: