I'm trying to delete the directory from MEDIA_ROOT
with shutil. After I have processed the files in the MEDIA_ROOT
, I just want to clean up the directory along with the files in it. But getting permission denied error while using shutil. The default user is myuser
. Is there a way to set folder with delete permission. I even tried the following permission in settings.py
.
FILE_UPLOAD_DIRECTORY_PERMISSIONS = 0o755
FILE_UPLOAD_PERMISSIONS = 0o644