Open Bluetexon opened 4 years ago
Hi,
I can confirm this error for a .tar.gz file too. p7zip and unrar are installed and working on Ubuntu 20.04.01.
Also, I miss information about the temporary path where the files are unpacked before moving them to the final destination. I have added a directory extract_tmp
below NC data directory (in my case /var/nextcloud/
) and as a symlink in /var/www/nextcloud/data/
.
Here are the errors from the logfile:
{"reqId":"WdI2pSsVOGXEDcjnNqjy","level":3,"time":"2021-01-27T13:42:21+01:00","remoteAddr":"217.251.35.42","user":"christian","app":"PHP","method":"POST","url":"/index.php/apps/extract/ajax/extract.php","message":{"Exception":"Error","Message":"error_log() expects parameter 1 to be string, array given at /var/www/nextcloud/apps/extract/lib/Controller/ExtractionController.php#152","Code":0,"Trace":[{"function":"onError","class":"OC\\Log\\ErrorHandler","type":"::"},{"file":"/var/www/nextcloud/apps/extract/lib/Controller/ExtractionController.php","line":152,"function":"error_log"},{"file":"/var/www/nextcloud/apps/extract/lib/Controller/ExtractionController.php","line":90,"function":"extractOther","class":"OCA\\Extract\\Controller\\ExtractionController","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":169,"function":"extract","class":"OCA\\Extract\\Controller\\ExtractionController","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":100,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":152,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":309,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/nextcloud/lib/base.php","line":1008,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/nextcloud/index.php","line":37,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/nextcloud/lib/private/Log/ErrorHandler.php","Line":91,"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36","version":"20.0.6.1","id":"6011619767299"}
This probably refers to the original error message that something is wrong with p7zip. It occurs after the call of function extractOther
were 7za is used.
The other messages below might be consequential errors and refer more the temporary directory:
{"reqId":"WdI2pSsVOGXEDcjnNqjy","level":3,"time":"2021-01-27T13:42:21+01:00","remoteAddr":"217.251.35.42","user":"christian","app":"PHP","method":"POST","url":"/index.php/apps/extract/ajax/extract.php","message":{"Exception":"Error","Message":"unlink(/data//extract_tmp/GeoLite2-Country_20210119/GeoLite2-Country_20210119.tar): No such file or directory at /var/www/nextcloud/apps/extract/lib/Controller/ExtractionController.php#93","Code":0,"Trace":[{"function":"onError","class":"OC\\Log\\ErrorHandler","type":"::"},{"file":"/var/www/nextcloud/apps/extract/lib/Controller/ExtractionController.php","line":93,"function":"unlink"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":169,"function":"extract","class":"OCA\\Extract\\Controller\\ExtractionController","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":100,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":152,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":309,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/nextcloud/lib/base.php","line":1008,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/nextcloud/index.php","line":37,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/nextcloud/lib/private/Log/ErrorHandler.php","Line":91,"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36","version":"20.0.6.1","id":"601161976719a"}
{"reqId":"WdI2pSsVOGXEDcjnNqjy","level":3,"time":"2021-01-27T13:42:21+01:00","remoteAddr":"217.251.35.42","user":"christian","app":"no app in context","method":"POST","url":"/index.php/apps/extract/ajax/extract.php","message":{"Exception":"OCP\\Files\\NotFoundException","Message":"/extract_tmp/GeoLite2-Country_20210119 not found while trying to get owner","Code":0,"Trace":[{"file":"/var/www/nextcloud/lib/private/Files/Filesystem.php","line":911,"function":"getOwner","class":"OC\\Files\\View","type":"->"},{"file":"/var/www/nextcloud/apps/files_versions/lib/Storage.php","line":101,"function":"getOwner","class":"OC\\Files\\Filesystem","type":"::"},{"file":"/var/www/nextcloud/apps/files_versions/lib/Storage.php","line":131,"function":"getUidAndFilename","class":"OCA\\Files_Versions\\Storage","type":"::"},{"file":"/var/www/nextcloud/apps/files_versions/lib/Hooks.php","line":144,"function":"setSourcePathAndUser","class":"OCA\\Files_Versions\\Storage","type":"::"},{"file":"/var/www/nextcloud/lib/private/legacy/OC_Hook.php","line":110,"function":"pre_renameOrCopy_hook","class":"OCA\\Files_Versions\\Hooks","type":"::"},{"file":"/var/www/nextcloud/lib/private/Files/View.php","line":784,"function":"emit","class":"OC_Hook","type":"::"},{"file":"/var/www/nextcloud/lib/private/Files/Filesystem.php","line":728,"function":"rename","class":"OC\\Files\\View","type":"->"},{"file":"/var/www/nextcloud/apps/extract/lib/Controller/ExtractionController.php","line":165,"function":"rename","class":"OC\\Files\\Filesystem","type":"::"},{"file":"/var/www/nextcloud/apps/extract/lib/Controller/ExtractionController.php","line":100,"function":"postExtract","class":"OCA\\Extract\\Controller\\ExtractionController","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":169,"function":"extract","class":"OCA\\Extract\\Controller\\ExtractionController","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":100,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":152,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":309,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/nextcloud/lib/base.php","line":1008,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/nextcloud/index.php","line":37,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/nextcloud/lib/private/Files/View.php","Line":1693,"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36","version":"20.0.6.1","id":"60116197670a9"}
{"reqId":"WdI2pSsVOGXEDcjnNqjy","level":3,"time":"2021-01-27T13:42:21+01:00","remoteAddr":"217.251.35.42","user":"christian","app":"core","method":"POST","url":"/index.php/apps/extract/ajax/extract.php","message":"unable to rename, source directory is not writable : extract_tmp","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36","version":"20.0.6.1","id":"6011619766eb9"}
For me, the error disappeared. This is how it worked (for me):
I'm using external storage with local folders. The temporary directory is placed inside the root directory of the external storage (here: /data
). This directory must have appropriate rights so that NC can create the directory. After the compressed file has been unpacked, the data is moved and the temporary directory is deleted.
If you are installing Nextcloud with Docker you need to go into the container and install unrar to do so.
Hi,
I've installed Extract and ran the two commands
sudo apt install p7zip p7zip-full
sudo apt install unrar
Then I tried to unpack a .7z file and encountered the following error message:
I've already reinstalled Extract and all three packages.
Am I missing something or does need p7zip and p7zip-full a more specific configuration?