File Permissions


To modify theme files, they must be writablethat is, their file permissions must be set to allow modification. Here's a quick overview of file permissions and how they apply to WordPress theme files, as well as instructions on how to change them.

Unix file permissions basics

All of the files and directories on a Unix operating system server have permissions settings. Permissions control who may work with a file and what kind of access they have.

There are three kinds of access:

  • Read (r) allows the user to view a file.

  • Write (w) allows the user to change a file.

  • Execute (x) allows the user to run a program or open a directory.

In addition, there are three types of users who work with files:

  • Owner

  • Group

  • Others

As shown in Table 1, a numeric permissions equivalent is associated with each type of access and each type of user. Adding the applicable values together determines the permissions setting for a file.

Table 1. File Permissions

User Type

Read

Write

Execute

Owner

400

200

100

Group

040

020

010

Others

004

002

001


For example, the circled values in Table 2 correspond to read and write permissions for owner, group, and others. Adding the values together (400+200+40+20+4+2) results in a permissions setting of 666. This is the appropriate setting for a WordPress theme file if you want to edit that file with WordPress's built-in Theme Editor.

Table 2. File Permissions for WordPress Theme Files

User Type

Read

Write

Execute

Owner

100

Group

010

Others

001


Tip

  • You can change permissions for a file or directory with FTP client software or with the file manager tools made available by your ISP.


To change a file's permissions with an FTP client

1.

Use your FTP client software to connect to the server and view the file for which you want to change permissions.

2.

Select the file's icon.

3.

Use the appropriate command to view permissions for the file. For example, in Cute FTP, the command is File > Properties, and in Fetch, the command is Remote > Get Info.

4.

A window that displays file information, including permissions, should appear (Figures 15a and 15b). Toggle check boxes or enter a Unix equivalent value to set the permissions as desired for the file.

Figure 15a. In this example, we're using CuteFTP on Windows to change the permissions of a theme file.


Figure 15b. Here's Fetch on a Macintosh changing the permissions of a theme file.


5.

Click OK (Figure 15a) or Apply (Figure 15b) to save your settings.

Tip

  • How you connect to your server varies depending on your FTP client software. FTP software is covered in more detail in Appendix B.


To change file permissions with a file manager

1.

Use your Web browser to visit the online Control Panel for your Web site.

2.

Click the link for the File Manager (Figure 16).

Figure 16. Your ISP should offer a control panel for accessing Web site features. Here's the control panel for HostMe.co.nz, which is Miraz's ISP. (Maria's ISP, GoDaddy.com, does not offer a Web interface for changing file permissions.)


3.

Navigate to the file whose permissions you need to change. You can click on a folder icon to open it.

4.

Click the name of the file you want to change to view its properties (Figure 17).

Figure 17. In this example, the permissions for each file appears in the list beside its name. Click the name of the file you want to change to view its properties.


5.

Click Change Permissions (Figure 18).

Figure 18. Click Change Permissions.


6.

Set permissions as desired.

7.

Click Change to activate the new permissions (Figure 19).

Figure 19. After setting permissions as desired, click Change.


Tips

  • Your file manager may show permissions as a set of numbers, for example, 666, or it may show check boxes for what the Owner, Group, and Others may do. Figure 19 shows both sets of information, although it uses different terminology for the permission categories.

  • Each ISP's file manager is different. If you have trouble using your ISP's file manager, contact your ISP for help.





WordPress 2. Visual QuickStart Guide
WordPress 2
ISBN: 0321450191
EAN: 2147483647
Year: 2004
Pages: 142

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net