Repository navigation
Closed
Labels
0. Needs triagePending check for reproducibility or if it fits our roadmapbugfeature: encryption (server-side)
Description
Steps to reproduce
- Create New User
- Have the user login for first time
- Delete User Account
Expected behaviour
Error should not appear
Actual behaviour
When deleted the user getting an error that can process the user dose gt deleted bafter refreshing the web page but getting error in the logs
Server configuration
Operating system:
Ubuntu 20.04
Web server:
Apache2
Database:
MariaDB 10.5.12
PHP version:
8.0
Nextcloud version: (see Nextcloud admin page)
NC 22.2.0
Updated from an older Nextcloud/ownCloud or fresh install:
NC 21
Where did you install Nextcloud from:
Are you using external storage, if yes which one: local/smb/sftp/...
No
Are you using encryption: yes/no
YES
Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...
Nextcloud log (data/nextcloud.log)
Nextcloud log
{"reqId":"R6dZFFlJW2RU9GPv8ch2","level":3,"time":"2021-11-06T14:18:40+00:00","remoteAddr":"10.241.202.18","user":"axheli","app":"no app in context","method":"DELETE","url":"/ocs/v2.php/cloud/users/test","message":"path needs to be relative to the system wide data folder and point to a user specific file","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36","version":"22.2.0.2","exception":{"Exception":"BadMethodCallException","Message":"path needs to be relative to the system wide data folder and point to a user specific file","Code":0,"Trace":[{"file":"/var/www/nextcloud/lib/private/Encryption/Keys/Storage.php","line":367,"function":"getUidAndFilename","class":"OC\\Encryption\\Util","type":"->"},{"file":"/var/www/nextcloud/lib/private/Encryption/Keys/Storage.php","line":189,"function":"getFileKeyDir","class":"OC\\Encryption\\Keys\\Storage","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Storage/Wrapper/Encryption.php","line":315,"function":"deleteAllFileKeys","class":"OC\\Encryption\\Keys\\Storage","type":"->"},{"function":"rmdir","class":"OC\\Files\\Storage\\Wrapper\\Encryption","type":"->"},{"file":"/var/www/nextcloud/apps/files_trashbin/lib/Storage.php","line":193,"function":"call_user_func"},{"file":"/var/www/nextcloud/apps/files_trashbin/lib/Storage.php","line":125,"function":"doDelete","class":"OCA\\Files_Trashbin\\Storage","type":"->"},{"file":"/var/www/nextcloud/lib/private/Authentication/Listeners/UserDeletedFilesCleanupListener.php","line":72,"function":"rmdir","class":"OCA\\Files_Trashbin\\Storage","type":"->"},{"file":"/var/www/nextcloud/lib/private/EventDispatcher/ServiceEventListener.php","line":75,"function":"handle","class":"OC\\Authentication\\Listeners\\UserDeletedFilesCleanupListener","type":"->"},{"file":"/var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":251,"function":"__invoke","class":"OC\\EventDispatcher\\ServiceEventListener","type":"->"},{"file":"/var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":73,"function":"callListeners","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php","line":88,"function":"dispatch","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php","line":100,"function":"dispatch","class":"OC\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/User/User.php","line":301,"function":"dispatchTyped","class":"OC\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/nextcloud/apps/provisioning_api/lib/Controller/UsersController.php","line":1001,"function":"delete","class":"OC\\User\\User","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":217,"function":"deleteUser","class":"OCA\\Provisioning_API\\Controller\\UsersController","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":126,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":156,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":301,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/nextcloud/ocs/v1.php","line":62,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/nextcloud/ocs/v2.php","line":23,"args":["/var/www/nextcloud/ocs/v1.php"],"function":"require_once"}],"File":"/var/www/nextcloud/lib/private/Encryption/Util.php","Line":233,"CustomMessage":"--"},"id":"6186903b2c352"}
Reacted by Syone and Nivesh Krishna
Metadata
Metadata
Assignees
Labels
0. Needs triagePending check for reproducibility or if it fits our roadmapbugfeature: encryption (server-side)
Activity
[-]NC 22.2 BadMethodCallException: path needs to be relative to the system wide data folder and point to a user specific file[/-][+]BadMethodCallException: path needs to be relative to the system wide data folder and point to a user specific file[/+]triopsi commentedon Jan 14, 2022
Same error here but over the Rest API.
Response:
In the Syslog:
gmaxbass commentedon Feb 24, 2022
Same problem on 22.2.5 docker image using occ user:delete
docker exec -ti --user www-data cleantest01-nc php /var/www/html/occ user:delete luke.skywalker
In Util.php line 233:
path needs to be relative to the system wide data folder and point to a user specific file
user:delete
However this seems to be only a wrong error since user is deleted.
Is there any fix/workaround for this?
Niveshkrishna commentedon Apr 28, 2022
Same error to me as well when using drop_account app. User is deleted but this exception is thrown
https://framagit.org/framasoft/nextcloud/drop_account
Pytal commentedon May 17, 2022
Fixed in #32357