If you are new to web hosting, one topic that may be a bit of a challenge for you is web server file permissions. Anything you upload to your site will have a set of permissions associated with it. In the examples that follow, we will focus on Linux/Unix file permissions since the web server you use will most likely run on that type of operating system. Generally speaking, however, the same concepts would apply to any OS, although the methods and permission types may vary.
Ownership tells the file system who can access, edit and/or run a file. On Unix-like file systems, a file will have an owner and group associated with it. For example, if leonard, who belongs to a group called nerds, owns a directory called penny, the ownership might look like this:
drwx------ 2 leonard nerds 4096 Mar 19 2012 penny
Depending on the permissions associated with it, leonard and possibly the nerds as well will have access to penny.
With Apache HTTP Server, files may be owned by the user or the web server (sometimes called httpd, apache, www or even nobody). Some server side scripts may require one or the other.
Using the above example, the first letters “drwx” indicate the permissions for penny. First of all, the “d” indicates that it is a directory. The “r”, “w” and “x” mean that leonard can read, write and execute penny. The dashes after it mean that neither the nerds nor anyone else in the world have access to it.
If the file instead had drwxrwxr-x, it would mean that leonard and all the nerds can read, write and execute, and anyone in the world can read and execute but not write. These three permission holders: Owner, Group and World form the basis of all Linux and Unix file permissions.
For more information about permissions and how to use them with your web server, you can view this tutorial at Linux.com.