Reputation: 88
My Python program uses the terminal(system) command to perform the task on the file and script. I am going to convert this Python program into Mac OS application and Linux application using pyinstaller. I am going to pass the application installer file to my friends. However, I have following questions.
If script or file doesn't have proper permission which my program is trying to access, will Python get an error?
Running some script or opening file will require the permission of root. So is there a possible option that will prompt the user for root(admin) password or run my application with root privilege?
Thanks
Upvotes: 0
Views: 2450
Reputation: 434
Try chmod 777 filname.py
, this will give the file all rights for execution and editing. There are also other modes for chmod
like 755, which will also work for your case.
Upvotes: 2