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) ?

2/14/2018 5:26:19 PM


6 Answers

New Answer


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.


@patel I didn't mean why preferring python I mean what is this permission os.chmod(sys.argv[0], 3)


@Kuba Thanks sir :)


@Kuba Siekierzynsky is there is any list for those integer chmods in python when it tells you to use a number of a permission


Yes, for example: https://www.linux.com/learn/understanding-linux-file-permissions


#Trythis question https://www.sololearn.com/Discuss/1069156/?ref=app