>_ IzzyLab

Topic breakdown

Access to a file in Linux is determined by the owner/group pair plus the mode bits; if a directory belongs to a different user, a service running under its own account gets Permission denied on writes, even when the mode looks reasonable. This is fixed not with chmod (which twiddles the bits) but by changing the owner with chown, which can set user and group at once via a colon. Do it recursively — otherwise you'll change the owner of the directory itself, but the old nested files will stay under the previous owner, and you'll get a mixed access picture.

What's checked

  1. Directory belongs to www-data
  2. www-data can write
  3. Nested files also belong to www-data

What it looks like