archivematica / Issues

Issues repository for the Archivematica project
GNU Affero General Public License v3.0
16 stars 1 forks source link

Problem: Transfer names with '/' fail ingest #1642

Open jens-st opened 10 months ago

jens-st commented 10 months ago

Expected behaviour

Current behaviour

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/share/archivematica/virtualenvs/archivematica-storage-service/lib/python3.6/site-packages/tastypie/resources.py", line 227, in wrapper response = callback(request, *args, kwargs) File "/usr/share/archivematica/virtualenvs/archivematica-storage-service/lib/python3.6/site-packages/tastypie/resources.py", line 476, in dispatch_detail return self.dispatch('detail', request, kwargs) File "/usr/share/archivematica/virtualenvs/archivematica-storage-service/lib/python3.6/site-packages/tastypie/resources.py", line 499, in dispatch response = method(request, kwargs) File "/usr/lib/archivematica/storage-service/locations/api/resources.py", line 685, in post_detail return self._handle_location_file_move(move_files, request, *args, *kwargs) File "/usr/lib/archivematica/storage-service/locations/api/resources.py", line 632, in _handle_location_file_move return move_files_fn(data["files"], origin_location, destination_location) File "/usr/lib/archivematica/storage-service/locations/api/resources.py", line 679, in move_files files, origin_location, destination_location File "/usr/lib/archivematica/storage-service/locations/api/resources.py", line 565, in _move_files_between_locations package=None, File "/usr/lib/archivematica/storage-service/locations/models/space.py", line 429, in move_from_storage_service source_path, destination_path, args, kwargs File "/usr/lib/archivematica/storage-service/locations/models/local_filesystem.py", line 44, in move_from_storage_service self.space.create_local_directory(destination_path) File "/usr/lib/archivematica/storage-service/locations/models/space.py", line 624, in create_local_directory os.makedirs(dir_path, mode) File "/usr/share/archivematica/virtualenvs/archivematica-storage-service/lib/python3.6/os.py", line 210, in makedirs makedirs(head, mode, exist_ok) File "/usr/share/archivematica/virtualenvs/archivematica-storage-service/lib/python3.6/os.py", line 220, in makedirs mkdir(name, mode) PermissionError: [Errno 13] Permission denied: '/mnt/import'



**Steps to reproduce**

1. Start transfer with https://www.archivematica.org/en/docs/archivematica-1.14/dev-manual/api/api-reference-archivematica/#package using a transfer name containing '/', i.e. `/mnt/import/TEST-SIP_2023-11-27_16-36-28_13849/`
2. Check dashboard
3. Check status with https://www.archivematica.org/en/docs/archivematica-1.14/dev-manual/api/api-reference-archivematica/#status
4. Check storage service log for exception

**Your environment (version of Archivematica, operating system, other relevant details)**

* Archivematica v1.14.1
* Storage Service v0.20.1
* Ubuntu Server 18.04.6 LTS

---

**For Artefactual use:**

Before you close this issue, you must check off the following:

- [ ] All pull requests related to this issue are properly linked
- [ ] All pull requests related to this issue have been merged
- [ ] A testing plan for this issue has been implemented and passed (testing plan information should be included in the issue body or comments)
- [ ] Documentation regarding this issue has been written and merged (if applicable)
- [ ] Details about this issue have been added to the release notes (if applicable)