Skip to content

Instantly share code, notes, and snippets.

View kxgio's full-sized avatar
💭
sudo rm -rf /mylife

KANGXI APPS kxgio

💭
sudo rm -rf /mylife
  • Freeloser inc.
  • Taipei City, Taiwan
View GitHub Profile
@kxgio
kxgio / Solving the web file permissions problem once and for all.md
Last active November 18, 2024 20:07
Solving the web file permissions problem once and for all

source url: http://blog.netgusto.com/solving-web-file-permissions-problem-once-and-for-all/

If like us you develop Web applications and deploy them on Linux servers (development or production environments), you might have wondered how to handle file permissions on the application files in a simple and fool-proof way.

Some facts

Developers operating on the server require specific file permissions on the application files to be able to read and write them (for obvious reasons).

The web server (Apache, nginx, Lighttpd, etc.) also requires specific file permissions on the application files to be able to read them, and for some files (but not all files), to be able to write them (like for instance, when uploading a file, or creating a thumbnail, etc.)