Interspire Product Knowledge Base

Would you like to...

Print this page Print this page

Email this page Email this page

Post a comment Post a comment

Subscribe me

Add to favorites Add to favorites

Remove Highlighting Remove Highlighting

Edit this Article

Export to PDF

User Opinions (0 votes)

No users have voted.

How would you rate this answer?



Thank you for rating this answer.

Working around PHP safe_mode restrictions

During the install process, IWP will prompt you to make some directories writeable. This is sufficient for most sites, but if your hosting service is running with safe_mode enabled you will need to perform some extra steps to make directories writeable under safe_mode restrictions.

Note 1: These instructions only apply to UNIX-like operating systems. Do not attempt to follow these instructions if your hosting service is on a Windows platform.

Note 2: These instructions assume a fresh, ready-to-install copy of Website Publisher. If you have already attempted to install, some directories may already exist with the incorrect permissions and you may need to start again.

Note 3: These instructions will only work if your web host is running safe_mode with the safe_mode_gid flag set. This relaxes the safe_mode checks enough for us to work around. If this flag is not set, these instructions will unfortunately not work.

The folders checked during the install process are:

/cache/
/configs/
/files/
/images/
/language/
/modules/
/templates/
/tmp/

The problem that safe_mode introduces is that it will prevent our PHP scripts from accessing files or directories that are not owned by your user, even if they are writeable. This is the case when our PHP scripts create a directory for you - they will inherit the user id and group id of the web server user, rather than your user.

The trick with safe_mode enabled is that in addition to making these directories writeable, you need to add a 'setgid' bit. This will tell the operating system to, when a file or directory is created underneath them, automatically inherit your group id - thus letting letting safe_mode access them.

There are two ways of setting this bit on your directories.

1. FTP

To do this via FTP, you will need an FTP client that allows you to set permissions on files using a 'Numeric value' or similar. We highly recommend the FileZilla software for this (this software is free to use for anyone).

Using your FTP client, log in to your FTP service and navigate to your Website Publisher installation directory.

Select all of the directories mentioned above and edit their permissions (in FileZilla, this is done by right-clicking on them after selecting them and clicking 'File permissions...').

In the 'Numeric value' entry, place the following value:

02775

Click 'OK', or 'Apply' - whichever is shown in your FTP client to apply the changes.

If your FTP client does not allow you to enter 5 digits for permissions you will need to obtain one that does. As stated above, we highly recommend the FileZilla software.

Once this is done, open your installation wizard. If the wizard still warns you that it can not write to the directories, you will need to expand the permissions furthermore. Repeat the steps above, but instead of 02775, use the permission value:

02777

Open your installation wizard and at this point there should be no more permission warnings. Proceed with the installation.

2. SSH

If your hosting service offers SSH access you may apply these permissions easily with one command. To correct the permissions on the directories mentioned above, enter the following command from your Website Publisher installation location:

chmod g+ws cache configs files images language modules templates tmp

This will add Write permissions, and Setgid flags to the Group for all the listed directories.

Open your installation wizard. If the wizard still warns you that it can not write to the directories, you will need to expand the permissions furthermore, like so:

chmod o+w cache configs files images language modules templates tmp

This will add Write permissions to Other for all listed directories.

Open your installation wizard and at this point there should be no more permission warnings. Proceed with the installation.

Related Articles

No related articles were found.

Attachments

No attachments were found.

Powered by Interspire Knowledge Manager - World's #1 Best Selling FAQ and Knowledge Base Software