From a1ee861266de44721f242f08567cefbe30364c6d Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Tue, 29 Nov 2011 18:50:58 +0100 Subject: [PATCH] ensure permissions for uploaded files --- pandora/archive/views.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pandora/archive/views.py b/pandora/archive/views.py index 7857eff6..03b14bd0 100644 --- a/pandora/archive/views.py +++ b/pandora/archive/views.py @@ -146,6 +146,7 @@ def upload(request): position = float(os.path.splitext(name)[0]) fr, created = models.Frame.objects.get_or_create(file=f, position=position) fr.frame.save(name, frame) + os.chmod(fr.frame.path, 0644) f.item.select_frame() f.item.save() item.tasks.update_poster.delay(f.item.itemId) @@ -157,6 +158,7 @@ def upload(request): f.data.delete() f.data.save('data.raw', request.FILES['file']) f.save() + os.chmod(f.data.path, 0644) item.tasks.load_subtitles.delay(f.item.itemId) response = json_response(text='file saved') else: