Item12353: Unable to save configuration when lib directory not writable
Priority: Urgent
Current State: Closed
Released In: 1.1.7
Target Release: patch
Applies To: Engine
Component: Configure
Branches: Release01x01 trunk
This mainly impacts users of the Debian and RPM style packages.
The
!LocalSite.cfg
is installed in the
/var/lib/foswiki/lib/
directory. This directory is not writable by the CGI user, so the create for a backup fails:
Unable to open /var/lib/foswiki/lib/LocalSite.cfg.1 for write: Permission denied
See
Support.Question1236
The simple fix is to set
$Foswiki::cfg{MaxLSCBackups} = 0;
but the default config file doesn't have this setting, so the user has to add another line to the config.
- Configure should not die if it can't create a backup, just create a warning.
- Add a
!LSCBackupDirectory
parameter.
And the packages should either set LSCBackupDirectory to a writable location, or set MaxLSCBackuips to 0.
--
GeorgeClark - 17 Jan 2013
Different fix. Added a Checker that tests that a backup can be created. And relocate
{MaxLSCBackups}
into the "General Path Settings" tab so that it will run during an "initial configuration" as well as when modifying an existing configuration.
Sven, If you could poke at this a bit to see if there are any holes.
- Upgrade to 1.1.7 with a write protected lib should be okay. The initial run of configure disables backups.
- Debian / RPM should be fine as well, as they follow the same path. An existing LSC with write protected lib.
- A new tarball install where user "touches LSC" and write protects lib will also be okay.
About the only path I've found is to run configure with lib writable, then write protect lib and attempt a save.
--
GeorgeClark - 17 Jan 2013