My hosting provider says my python script must be made to be executable(chmod755). What does this mean & how do I do it?
Cheers!
If you have ssh access to your web space, connect and issue
chmod 755 nameofyourscript.py
If you do not have ssh access but rather connect by FTP, check your FTP application to see whether it supports setting the permissions.
As to the meaning of 755:
The digits are constructed by adding the permision values. 1 = executable, 2 = writable and 4 = readable. I.e. 755 means that you yourself can read, write and execute the file and everybody else can read and execute it.
Unix-like systems have "file modes" that say who can read/write/execute a file. The mode 755 means owner can read/write/execute, and everyone else can read/execute but not write. To make your Python script have this mode, you type
chmod 0755 script.py
You also need a shebang like
#!/usr/bin/python
on the very first line of the file to tell the operating system what kind of script it is.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With