• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

The following message appears when attempting to edit a topic:

TWiki detected an internal error - please check your TWiki logs and webserver logs for more information.

RCS: failed to create path: File exists

The following lines appeared in /var/log/audit/audit.log:

type=AVC msg=audit(1137739459.945:9317662): avc:  denied  { getattr } for  pid=21461 comm="edit" name=var dev=dm-0 ino=5003713 scontext=root:system_r:httpd_sys_script_t tcontext=system_u:object_r:var_t tclass=dir
type=SYSCALL msg=audit(1137739459.945:9317662): arch=40000003 syscall=195 success=no exit=-13 a0=93598a0 a1=917d0c8 a2=568ff4 a3=93598a0 items=1 pid=21461 auid=4294967295 uid=48 gid=48 euid=48 suid=48 fsuid=48 egid=48 sgid=48 fsgid=48 comm="edit" exe="/usr/bin/perl"
type=AVC_PATH msg=audit(1137739459.945:9317662):  path="/var"
type=PATH msg=audit(1137739459.945:9317662): item=0 name="/var" inode=5003713 dev=fd:00 mode=040755 ouid=0 ogid=0 rdev=00:00

Problem tracked to sub _mkPathTo in lib/Store/RcsFile.pm.

Attempt to stat first directory in path using -e $path (in this case, /var) is rejected by SELinux so directory appears not to exist. _mkPathTo then attempts to create the directory and reports failure.

Could change SELinux permissions, but better if Dakar works out of the box.

This code works:

sub _mkPathTo {
    use File::Path;
    use File::Basename;

    my $file = shift;

    my $path = dirname($file);
    eval { mkpath($path, 0, $TWiki::cfg{RCS}{dirPermission}) };
    if ($@) {
       throw Error::Simple("RCS: failed to create ${path}: $!");
    }
}

Thanks John

SVN 8407

CC

ItemTemplate
Summary Error editing topic because of clash with SELinux default Apache permissions
ReportedBy TWiki:Main.JohnMurphy
Codebase

SVN Range 4.0.0-beta6
AppliesTo Engine
Component

Priority Normal
CurrentState Closed
WaitingFor

Checkins 8407
Edit | Attach | Watch | Print version | History: r5 < r4 < r3 < r2 < r1 | Backlinks | Raw View |  Raw edit | More topic actions
Topic revision: r5 - 2006-01-21 - CrawfordCurrie
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2023 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback