Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I installed osCommerce using these instructions. During the initial run, I was asked to point at the MySQL database it should use and set up admin accounts. But to save the settings, it needed to modify an existing file:

The webserver was not able to write the installation parameters to its configuration file due to file permission problems.

Please verify the file permissions of the configuration file and try again by clicking on the Retry button below.

The configuration file is located at:


What permission setting do I need to enable the web application to write, on what files, and how?

NB I can edit the file in question and save the settings manually, but to avoid issues in the future, I want to know how to let the web application run as it should.

share|improve this question
up vote 4 down vote accepted

The webserver runs as the user www-data.

To let it modify a file, just change the owner of that file to www-data, like so:

chown www-data /var/www/oscommerce/osCommerce/OM/Config/settings.ini

For security purposes I would recommended chowning as few things as possible - in fact afterwards, when it's done, you could even chown it back to the original owner so that the webserver can't write to it again.

ls -l will show you the current owner of a file, ie:

ls -l /var/www/oscommerce/osCommerce/OM/Config/settings.ini
-rw-r--r-- 1 root root 200 2011-11-15 17:17 /var/www/oscommerce/osCommerce/OM/Config/settings.ini

Here the owner is root (the second root is the group-owner of the file).

There are other ways to grant the webserver write-access, such as setting the file world-writeable, but this has other inherent dangers (ANYONE could change your config) and I wouldn't recommend that.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.