nextcloud / nextcloud/files_zip
Error while Zipping when root folder is read only: `No create permission for path`
Open
Nobody has claimed this yet.
bug
- Dominant language
- JavaScript
- Stars
- 31
- Forks
- 5
- Avg merge
- 1d
- Merged PRs (30d)
- 14
Description
Just tried the app and I got the following issue:
{
"reqId": "ddnrK6weTbpLI0qMPo7o",
"level": 3,
"time": "2021-11-19T00:55:02+01:00",
"remoteAddr": "",
"user": "--",
"app": "files_zip",
"method": "",
"url": "--",
"message": "Failed to create zip archive",
"userAgent": "--",
"version": "22.2.3.0",
"exception": {
"Exception": "OCP\\Files\\NotPermittedException",
"Message": "No create permission for path",
"Code": 0,
"Trace": [
{
"file": "/var/www/nextcloud/apps/files_zip/lib/Service/ZipService.php",
"line": 92,
"function": "newFile",
"class": "OC\\Files\\Node\\Folder",
"type": "->"
},
{
"file": "/var/www/nextcloud/apps/files_zip/lib/BackgroundJob/ZipJob.php",
"line": 65,
"function": "zip",
"class": "OCA\\FilesZip\\Service\\ZipService",
"type": "->"
},
{
"file": "/var/www/nextcloud/lib/public/BackgroundJob/Job.php",
"line": 79,
"function": "run",
"class": "OCA\\FilesZip\\BackgroundJob\\ZipJob",
"type": "->"
},
{
"file": "/var/www/nextcloud/lib/public/BackgroundJob/QueuedJob.php",
"line": 47,
"function": "execute",
"class": "OCP\\BackgroundJob\\Job",
"type": "->"
},
{
"file": "/var/www/nextcloud/cron.php",
"line": 127,
"function": "execute",
"class": "OCP\\BackgroundJob\\QueuedJob",
"type": "->"
}
],
"File": "/var/www/nextcloud/lib/private/Files/Node/Folder.php",
"Line": 209,
"CustomMessage": "Failed to create zip archive"
},
"id": "6196e81a535c6"
}
It has most likely the same reason why https://github.com/nextcloud/server/issues/25787 happened.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with lib/Service/ZipService.php at line 92, where the trace shows newFile failing, then follow the call from lib/BackgroundJob/ZipJob.php line 65. Reproduce zipping with a read-only root folder and verify that the archive is created successfully without the “No create permission for path” error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100