PermissionError

25 views
Skip to first unread message

Munna Singh

unread,
Jul 9, 2023, 10:54:55 AM7/9/23
to django...@googlegroups.com
Hi,
I'm using windows system for development purposes on which my code is working fine but the same code throwing error on remote system(ubuntu).
             repo_dir = "xyz"
              renamed_repo_dir = "xyz"+"_delete_xyz"
             os.rename(repo_dir, renamed_repo_dir)
              PermissionError: [Errno 13] Permission denied:

I'm trying to rename an existing directory coz i have to write a new directory with same path thn deleting the renamed one.

Please help.

thanks
Munna Singh

Makan Dianka

unread,
Jul 9, 2023, 12:51:05 PM7/9/23
to django...@googlegroups.com
can u so the full path of folder that u want rename plz?

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAPrh91RZjcfrsJge_%3D_AsD6SMD-hQL7uvLEh%3DPR-UFocQ-oV0w%40mail.gmail.com.

Makan Dianka

unread,
Jul 9, 2023, 12:53:21 PM7/9/23
to django...@googlegroups.com
I mean show the full path of the folder that u want rename 

DieHardMan 300

unread,
Jul 9, 2023, 8:56:33 PM7/9/23
to Django users
You might want to check if the project folder permission allow nginx to read/modify/delete. Normally checking by enter "ls -l" inside project folder in ubuntu terminal to check if "www-data:www-data" (user:group) has CRUD permission. If not using chown and chmod command.
ในวันที่ วันอาทิตย์ที่ 9 กรกฎาคม ค.ศ. 2023 เวลา 23 นาฬิกา 53 นาที 21 วินาที UTC+7 Makan Dianka เขียนว่า:
Reply all
Reply to author
Forward
0 new messages