Coppermine Photo Gallery v1.5.x: Documentation and Manual

Inhoudstafel
No translation available

Setting permissions

Any PHP script that is supposed to be run on a webserver needs read and execute permissions on the server. Subsequently, all Coppermine-files need this permission.
Additionally, Coppermine needs write access to a number of files and folders on the webserver in order to accomplish the following:

By default, files and folders on a webserver are usually not writable, so you will probably have to change permissions before installation, for the reasons mentioned above. It's really mandatory that you set/change (CHMOD) permissions - or you will run into issues sooner or later.

To be able to set permissions correctly, you have to understand how they work: there are read, write and execute permissions (abbreviated with rwx) for each folder and file. Permissions on a parent folder can propagate to a child folder or the files within it, but it's possible to tweak your setup so that unwanted permissions will not propagate to child folders and resident files.

If you can't figure how to set permissions properly, ask your webhost for support. It doesn't make sense to ask for support on this aspect on the coppermine support board - we can't tell you what level of permissions needs to be applied on your particular webserver. Only your webhost can answer that question.

Permissions on different webserver types

There are differences between the different operating systems that are used as webservers. As a result, there are a number of different approaches. As coppermine is designed to run on many different setups, we've included some basic instructions. Those who know their way around may find these instructions somewhat generalized and lacking in details.

Note: it is not your local, client computer that matters, permission-wise, but, rather, the operating system used by your webserver. If you're not sure what OS your server is running on, try the CHMOD instructions first - most webservers run a version of Unix/Linux.

Therefore, here's a summary how permissions work on some webserver setups:

Apache on Unix/Linux (CHMOD)

Apache on Windows

You have to understand that there is no such thing as CHMOD on Windows operating systems - this command is available on Unix/Linux only, even if your FTP application displays a CHMOD option. If you try to apply CHMOD on Windows, the command will simply be ignored and do nothing. However, there are permissions on Windows as well.

The apache webserver service runs under a particular user - if you have full access to the server, check the services control to find out which one it is. If you can't do this, ask your webhost.

As a temporary workaround, set permissions on folder and file level as suggested in the section IIS on Windows, but not for the IUSR (which only exists on IIS), but for "everyone". However, allowing "everyone" to have read, write and execute permissions might be a security risk and is not recommended at all.

IIS on Windows

Pre-requisites: you will need full admin privileges over your server to execute this process. If you do not run the webserver yourself, your webhost has probably set up a web-based interface to let you change permissions. If you're not sure, contact your webhost.

The dialogs may differ slightly depending on the Windows version you have:

You have to understand that there is no such thing as CHMOD on Windows operating systems - this command is available on Unix/Linux only, even if your FTP application displays a CHMOD option. If you try to apply CHMOD on Windows, the command will simply be ignored and do nothing. However, there are permissions on Windows as well.

Asking for support on permissions issues

Most users who come from a Windows-background (or who have no idea about how permissions work at all) frequently ask on the Coppermine support board "Why does this have to be so complicated? Why don't you just create a script that handles all those complicated permission issues for me?". The answer is pretty straightforward: because we can't.

Coppermine has been built to work on a number of platforms and operating systems. The permissions that you need to set are part of how the operating system of your webserver works - they are not related to Coppermine in itself. A script can't assign permissions to itself if it doesn't have the privilege to do so.

Think of it as if it was the structure of an army: a soldier who is low in rank can not promote himself to be a general; only officers who actually have higher privileges can promote regular soldiers to a higher rank. They wouldn't make them a general in the first place though, but just give them the rank they need to do their job (i.e. they would promote a private to corporal).

As the setup of webservers differs, we can't give you a simple, straightforward instruction like "CHMOD everything to 755 and you'll be done". Although this may be the case for many on shared webhosting, it might not apply to you. On some server setups, it might not be enough. On others, it might be a security risk. Yet on another machine, it may not apply at all because there is no such command.

Supporters are reluctant to answer the same questions on permissions over and over gain, as they are not related to Coppermine in the first place. If you ask a permissions-related question on the Coppermine support board that clearly shows that you haven't read the documentation (at least the part that covers permissions), then you will probably get a harsh answer, or no answer at all. Please think twice, read the permissions section carefully. There's little others could do to help you on this. If you're really stuck, you better ask your webhost for support.

Permissions on folder level

As suggested above, Coppermine needs different levels of permissions on some of it's subfolders. All folders and files within the coppermine folder need to be readable and usually need execution permissions as well.

Additionally, write permissions are needed for: