Hello,

What permissions should PHP files have on a unix/linux system?
Is 655 appropriate?
Many thanks in advance.

Recommended Answers

All 3 Replies

thank you for your response.

What about a typical login script? Should it be 755?

Member Avatar for diafol

Depends what you're trying to do, but I assume 755 would be fine:

If you didn't know (just in case):

OWNER = first digit (7)
GROUP = second digit (5)
USER = last digit (5)

The numbers are made up from the sum of the following permissions: 4 [read] 2 [write] 1 [execute]

So 7 = read+write+execute = 4+2+1
5 = read+execute = 4+1 (note NO write permission)

The scripts need to be read/executed by users (browsers).

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.