/usr/lib/interchange/standard/config/makedirs is in interchange-cat-standard 5.7.7-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 | #!/bin/sh
PERMTYPE=`echo __MVC_PERMTYPE__ | sed -e 's/\(.\).*/\1/' | tr a-z A-Z`
if [ "x`whoami`" = xroot ]
then
if test "x$PERMTYPE" = x -o "x$PERMTYPE" = xM
then
CATUSER=__MVC_CATUSER__
CATGROUP=__MVC_CATGROUP__
elif test "x$PERMTYPE" = xG
then
CATUSER=__MVC_INTERCHANGEUSER__
CATGROUP=__MVC_CATGROUP__
else
CATUSER=__MVC_INTERCHANGEUSER__
CATGROUP=__MVC_INTERCHANGEGROUP__
fi
fi
if test "x$PERMTYPE" = x -o "x$PERMTYPE" = xM -o "x$PERMTYPE" = xG
then
DMODE=2770
FMODE=660
else
DMODE=700
FMODE=600
fi
# Link the image directory always
ln -s __MVC_IMAGEDIR__ __MVC_RELOCATE____MVC_CATROOT__
# Make log directories to store logs.
if test -n '__MVC_LOGDIR__'
then
LOGDIR='__MVC_LOGDIR__'
mkdir -p __MVC_RELOCATE__$LOGDIR/logs
mkdir -p __MVC_RELOCATE__$LOGDIR/orders
touch __MVC_RELOCATE__$LOGDIR/error.log
ln -s $LOGDIR/error.log __MVC_RELOCATE____MVC_CATROOT__
ln -s $LOGDIR/logs __MVC_RELOCATE____MVC_CATROOT__
ln -s $LOGDIR/orders __MVC_RELOCATE____MVC_CATROOT__
chmod $DMODE __MVC_RELOCATE__$LOGDIR/logs
chmod $DMODE __MVC_RELOCATE__$LOGDIR/orders
touch __MVC_RELOCATE__$LOGDIR/error.log
if test -n "$CATUSER"
then
[ -n "$CATUSER" ] && chown $CATUSER __MVC_RELOCATE__$LOGDIR/error.log
[ -n "$CATGROUP" ] && chgrp $CATGROUP __MVC_RELOCATE__$LOGDIR/error.log
fi
else
LOGDIR='__MVC_CATROOT__'
mkdir -p __MVC_RELOCATE__$LOGDIR/orders
mkdir -p __MVC_RELOCATE__$LOGDIR/logs
chmod $DMODE __MVC_RELOCATE__$LOGDIR/logs
chmod $DMODE __MVC_RELOCATE__$LOGDIR/orders
touch __MVC_RELOCATE__$LOGDIR/error.log
if test -n "$CATUSER"
then
[ -n "$CATUSER" ] && chown $CATUSER __MVC_RELOCATE__$LOGDIR/error.log
[ -n "$CATGROUP" ] && chgrp $CATGROUP __MVC_RELOCATE__$LOGDIR/error.log
fi
fi
chmod $FMODE __MVC_RELOCATE__$LOGDIR/error.log
chmod $FMODE __MVC_RELOCATE____MVC_CATROOT__/catalog.cfg
# Make cache directories to store tmps.
if test -n '__MVC_CACHEDIR__'
then
CACHEDIR='__MVC_CACHEDIR__'
mkdir -p __MVC_RELOCATE__$CACHEDIR/session
ln -s $CACHEDIR/session __MVC_RELOCATE____MVC_CATROOT__
mkdir -p __MVC_RELOCATE__$CACHEDIR/tmp
ln -s $CACHEDIR/tmp __MVC_RELOCATE____MVC_CATROOT__
else
CACHEDIR='__MVC_CATROOT__'
mkdir -p __MVC_RELOCATE__$CACHEDIR/session
mkdir -p __MVC_RELOCATE__$CACHEDIR/tmp
chmod $DMODE __MVC_RELOCATE__$CACHEDIR/session
chmod $DMODE __MVC_RELOCATE__$CACHEDIR/tmp
fi
# Fix directory ownership if running as root
if test -n "$CATUSER"
then
for i in $LOGDIR/logs $LOGDIR/orders $CACHEDIR/session $CACHEDIR/tmp
do
[ -n "$CATUSER" ] && chown $CATUSER __MVC_RELOCATE__$i
[ -n "$CATGROUP" ] && chgrp $CATGROUP __MVC_RELOCATE__$i
done
fi
|