Files executable or not

Operating system: Ubuntu
OS version: 20.04

Some files in /home/domain/public_html/ etc… have permission -rwxr-x— (executable)
In other sites the file permission is: -rw-r----- (not executable)

I would like to know what the reason is for executable or not?

Much more information would be needed to determine why a given file has a given permission, starting with the types of files you’re talking about. For the sake of both functionality and security, I suggest you not mess with the permissions unless you know exactly what you’re doing and why.

This sounds like more of a coding / scripting question than a Virtualmin question.


Ok. A little more information:
The question appeared when I happened to see that basically all files in a new Wordpress site had permission -rwxr-x— (executable) while corresponding files in an older version had -rw-r ----- (not executable)
I know files like need to be executable. PHP files, however, do not.
Therefore, I would like to know why the PHP files in this case are.
I use PHP-FPM if that matters.

Ah, okay.

I’m afraid that answer will have to wait for someone more expert than I am about Wordpress (which likely would be any of 99 people in any random group of 100).


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.