-2

I have a php form that functions nicely with chmod 0007 despite the audible gasps coming from stackoverflow's direction. How to chmod 0007 a lot of directories with php?

Isn't the least permission the best?

What is wrong with 0007?

What permission would you suggest for a form that writes using js/php scripts to .json files that are read and written from a pretty standard html page?

WerewolF
  • 39
  • 7

1 Answers1

1

If you set 0007 as permission, it means that neither the owner or the group will be able to access the file/folder, while everyone else can. That's the opposite of what you want.

When using chmod in PHP, the permissions are (from left to right):

  • First zero = defining the value as an octal value.
  • Second number = the owners permission.
  • Third number = The groups permission.
  • Fourth number = Everyone else's permission.

You can read up on that function by reading the manual on PHP.net:

Funk Forty Niner
  • 74,450
  • 15
  • 68
  • 141
M. Eriksson
  • 13,450
  • 4
  • 29
  • 40