O'Reilly logo

Pro PHP Security: From Application Security Principles to the Implementation of XSS Defenses, Second Edition by Thomas Myer, Michael Southwell, Chris Snyder

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

An Introduction to Unix Permissions

To understand how we can control filesystem permissions, we'll need first to review exactly what permissions are, and how they are set. Documentation of this subject from a Linux perspective is available at http://www.faqs.org/docs/linux_intro/sect_03_04.html. Our discussion here is not intended to be a Unix or Linux tutorial; we focus exclusively on the subject of permissions, and leave it to you to fill in any gaps.

Let's imagine a sample user timb, whose Unix-style directory listing (displayed with the command ls -l) might look like this:

drwxr-xr-x  2 timb  www   68 20 Nov 15:04 images -rw-r--r--  1 timb  www  545 20 Nov 15:04 index.php lrwxrwxrwx  1 timb  www    4  9 Nov 22:57 lib -> /usr/lib/php -rw-r--r--  1 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required