Next Previous Contents

19.1   Permission change for WWW files with server-side includes

Our latest installation of Apache requires any files with server-side includes (statements of the form \<!--# . . . )have the executable bit set.

At present there are two ways to get your server-side-include (SSI) lines to work again.   One is by making an entry in a .htaccess file in your public_html directory.   Another is by chaning file permissions on each file containing an SSI.

  HTACCESS file method

To use the .htaccess approach just add the following line to your .htaccess file.

AddOutputFilter INCLUDES .html

  File permission method

As there is a drawback to just setting the executable bit on all web page files (Apache would need to log each) only those files with server-side includes should have the executable bit set.

Joel suggests using the following code snippet to change the permissions on the appropriate files.

cd /u/<acctname>/public_html
for file in `grep -rl "<\!\-\-\#" .` do
  chmod +x $file

  More information on SSI and HTML

For more on SSI and other HTML features see Web features: the major parts of HTML.

Next Previous Contents