Book Image

Joomla! 1.5: Beginner's Guide

By : Eric Tiggeler
Book Image

Joomla! 1.5: Beginner's Guide

By: Eric Tiggeler

Overview of this book

Joomla! is one of the most popular open-source Content Management Systems, actively developed and supported by a world-wide user community. Although it's a fun and feature-rich tool, it can be challenging to get beyond the basics and build a site that meets your needs perfectly. Using this book you can create dynamic, interactive web sites that perfectly fit your needs.This practical guide gives you a head start in using Joomla! 1.5, helping you to create professional and good-looking web sites, whether you want to create a full-featured company or club web site or build a personal blog site.The Joomla! 1.5 Beginner's Guide helps beginners to get started quickly and to get beyond the basics to take full advantage of Joomla!'s powerful features. Real-life examples and tutorials will spark your imagination and show you what kind of professional, contemporary, feature-rich web sites any developer can achieve with Joomla!. It gives you a head start and explains what's good and useful about Joomla! features and what's not. The focus is on clear instructions and easy-to-understand tutorials, with minimum of jargon. This book provides clear definitions, thoroughly covering the concepts behind the software and creating a coherent picture of how the software works. This book is not about what Joomla! can do—it's about what you can do using Joomla!.
Table of Contents (19 chapters)
Joomla! 1.5
Credits
About the Author
About the Reviewers
Preface
Free Chapter
1
Introduction: A New and Easy Way to Build Websites

Tip 4: Protect files and directories


Obviously, you don't want everybody to be able to access the Joomla! files and folders on the web server. You can protect files and folders by setting access permissions using the CHMOD (Change Mode) command. Basically, CHMOD settings tell the web server who has access to a file or folder, who is allowed to read it, write it, or to execute a file (run it as a program).

Once your Joomla! site is set up and everything works OK, you can use CHMOD to change permissions. You don't use Joomla! to change CHMOD settings; these are set with FTP software (for more information on FTP programs, see Chapter 2 on installing Joomla!).

This is how it works:

  1. 1. In your FTP program, right-click on the name of the file or directory you want to protect.

  2. 2. In the right-click menu select Properties.

  3. 3. You'll be presented with a pop-up screen. Here, you can check permissions and change them by selecting the appropriate options as shown in the following screenshot:

    As you can see, it's possible to set permissions for the file owner (that's you), for group members (that's likely to be only you too), and for the public (everyone else). This last one is the tricky part; you should be very careful and restrict public permissions as much as possible.

    When changing the permission settings, the file permissions number (the value in the Manual: box in the previous screenshot) will change accordingly. Every combination of settings has its particular number. In the above example, the permissions are set to 644 (the leading 0 is ignored).

  4. 4. Click on OK to execute the CHMOD command and set file permissions.

Choosing file permissions

What files should you protect and what CHMOD settings should you choose? Here are a few pointers:

  1. 1. By default, permissions for files are set to 644. That's a safe value:

    • When your need to change the file contents, temporarily change permissions to 775:

    • Once you're done, go back to 644. Configuration files (such as configuration.php in the Joomla! root directory) are especially vulnerable as they contain username and password details. Make sure that the CHMOD value of configuration.php is set to 644.

  2. 2. For directories a safe setting is 750 (which doesn't allow any public access):

    • However, some extensions may need access to certain directories; the 750 setting might result in error messages. In this case, set permissions to 755:

    • Never leave permissions for a file or directory set to 777; this allows everybody to write data to it:

    Note

    You can also block direct access to critical directories using a .htaccess file. This is a special file containing instructions for the web server—among other things, it tells the web server who's allowed access to the directory contents. You can add a .htaccess file to any folder on the server using specific instructions. This is another way to instruct the web server to restrict access. See the Joomla! security documentation on www.joomla.org for instructions.