Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Write Permission to File to Allow truncate() Operation to Succeed #296

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

edverma
Copy link

@edverma edverma commented Jul 17, 2024

I got the following error and am proposing this change to remediate.

Status code: 1
Error: Traceback (most recent call last):
File "/usr/src/app/preload.py", line 978, in
result = method(**data.get("parameters", {}))
File "/usr/src/app/preload.py", line 923, in main_preload
preload(additional_bytes, app_data, splash_image_path)
File "/usr/src/app/preload.py", line 713, in preload
part.resize(additional_bytes)
File "/usr/src/app/preload.py", line 434, in resize
self._resize_last_partition_of_disk_image(additional_bytes)
File "/usr/src/app/preload.py", line 334, in _resize_last_partition_of_disk_image
expand_file(self.image, additional_bytes)
File "/usr/src/app/preload.py", line 523, in expand_file
f.truncate(size + additional_bytes)
PermissionError: [Errno 13] Permission denied

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant