+ 23

Python Programmers What Is This Permission os.chmod(sys.argv[0], 3) ?

I was boring so I tried this on PyDroid 3 : os.chmod(sys.argv[0], 3) in PyDroid 3 the system.argv[0] is running as the script file and the hackrun file so after I used that code it just outputs : Traceback most recent calls/last File:arm-linux-adnroid/accomps_files/iiec_hackrun/hackrun.py exec(open(fakepyfile).read(), __main__.__dict__) PermissionError[errno13]: Permission Denied I reinstalled PyDroid 3 and it's libraries so what is the permission ? os.chmod(sys.argv[0], 3) ?

14th Feb 2018, 5:26 PM
warlord
warlord - avatar
6 Answers
+ 5
As I get it, you changed your own permissions to the file under execution to write and run. And the parser wanted to *read* thus failed.
14th Feb 2018, 6:05 PM
Kuba SiekierzyƄski
Kuba SiekierzyƄski - avatar
+ 23
@patel I didn't mean why preferring python I mean what is this permission os.chmod(sys.argv[0], 3)
18th Feb 2018, 2:30 PM
warlord
warlord - avatar
+ 22
@Kuba Thanks sir :)
14th Feb 2018, 6:27 PM
warlord
warlord - avatar
+ 19
@Kuba Siekierzynsky is there is any list for those integer chmods in python when it tells you to use a number of a permission
14th Feb 2018, 6:08 PM
warlord
warlord - avatar
14th Feb 2018, 6:26 PM
Kuba SiekierzyƄski
Kuba SiekierzyƄski - avatar
18th Feb 2018, 2:27 PM
Patel Nisarg
Patel Nisarg - avatar