I’ll take another guess. If you have a file name and can execute it on command line, then it would imply that the file has executable permission. If you know the content of the file is executable, e.g., because it is a Python script or Bash script, but it won’t execute, then you’d give it execute permission (execute permission allows the attempt to execute, but won’t make nonsense actually execute). To see the permissions of a given file:
ls -l /where/ever/that/file/is
# which ls
# ls -l /bin/ls
-rwxr-xr-x 1 root root 125520 Jan 18 2018 /bin/ls*
In the above the permissions are:
This is basically shorthand for 3 attributes if you are the file owner, the same 3 attributes for people in that group, and finally, the same 3 attributes for “other” people. In that example, the owner has read ("
r"), write ("
w") and execute ("
x") permissions. If you are not the owner, but in the same group as the owner, then there would only be read and execute permissions, and write would be prohibited. Same for people who are not the owner and also not in the same group as the owner. The part you are interested in is execute, or “
The command for modifying permissions of a file you own is
chmod. There are many ways to use
chmod. If this is what you are needing to know, then can you tell me what “
ls -l ...” shows when using it on your file?