You are here: Foswiki>Tasks Web>Item12353 (01 Feb 2013, GeorgeClark)Edit Attach

Item12353: Unable to save configuration when lib directory not writable

pencil
Priority: Urgent
Current State: Closed
Released In: 1.1.7
Target Release: patch
Applies To: Engine
Component: Configure
Branches: Release01x01 trunk
Reported By: GeorgeClark
Waiting For:
Last Change By: GeorgeClark
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

ItemTemplate edit

Summary Unable to save configuration when lib directory not writable
ReportedBy GeorgeClark
Codebase 1.1.6, trunk
SVN Range
AppliesTo Engine
Component Configure
Priority Urgent
CurrentState Closed
WaitingFor
Checkins distro:d8ac3069948d distro:b6453b1015ad
TargetRelease patch
ReleasedIn 1.1.7
CheckinsOnBranches Release01x01 trunk
trunkCheckins distro:b6453b1015ad
Release01x01Checkins distro:d8ac3069948d
Topic revision: r6 - 01 Feb 2013, GeorgeClark - This page was cached on 01 Jul 2016 - 11:54.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License