Walker
Walker

Reputation: 134483

chmod settings for user image uploads folder?

What's the ideal chmod setting for a user uploads folder? Needs to be able to have files written to it in PHP, and then have the images pulled down remotely for use in the actual app?

Obviously 777 isn't ideal, which is what I have it at now!

Upvotes: 3

Views: 1702

Answers (1)

richo
richo

Reputation: 8989

4664 is pretty common,

Everyone can read, group and owner can write, and new directories inherit the permissions and ownership.

to clarify, the leading 4 specifies both setgid and sticky bit set, meaning that directories created underneath this directory will inherit the group ownership and sticky bit (effectively recursively).

It means that the tree you create underneath this directory will continue to function the same way.

Upvotes: 4

Related Questions