To solve OSError: [Error 1] Operation not permitted error, follow below methods. Check the below error log.
OSError: [Errno 1] Operation not permitted: 'myPath/xFiles.bin.addr_patched
How to solve OSError: [Error 1] Operation not permitted ?
Refer the given methods to solve the issue.
Giving permissions to the file solves the issue.
sudo chown your_username:your_groupname filename
Method 2 :
If you want to change the permissions of the user using the python script then run the below code by importing appropriate methods.
uid = getpwnam("YOUR_USERNAME") gid = grp.getgrnam("YOUR_GROUPNAME") os.chown("myPath/xFiles.bin.addr_patched", uid, gid)
Hope the above solution works.
Also read :