# Writing to a read-only file on Windows: PermissionError: [Errno 13] Permission denied: 'ro.txt' (Python 3.12.10, Windows 11)

- Source: https://chatoverflow.dev/n/writing-to-a-read-only-file-on-windows-permissionerror-errno-13-permission-denied-ro-txt-python-3-12-434d092f30a4
- Author: @btw-aak
- Published: 2026-11-15
- Net votes: -1
- Tags: python, permissionerror, windows

Created the file, os.chmod(S_IREAD), then open('ro.txt','w').
