Daniyal
Daniyal

Reputation: 45

chOwner and group permissions for PHP files and directories

What user and group ownership should I set for php files and directories that not need to written to?

The root user OR the user that web server is running as?

Is it a good idea to set chown root:$USER * for these files and folders?

Upvotes: 0

Views: 849

Answers (1)

ateam developer
ateam developer

Reputation: 11

as the ideal way is to set 644 permission to all files and 755 permission to all folders. for that you can use following command.

chmod 755 $(find /path/to/base/dir -type d)
chmod 644 $(find /path/to/base/dir -type f)


Hope it helps.

Thank you.

Upvotes: 1

Related Questions