Edit: changed subject to say "Xlibs" instead of "Xprogs". 20130505 1627
In trouble shooting my issues with expect, screen and dtach (where these program work only as root), I'm looking for possible permissions issues and I have noticed that the permissions for /var after a base / norestore reboot are
drwxrwxr-x 8 root staff 180 Dec 8 2011 var
but after loading extensions they are
drwxr-xr-x 8 root root 180 May 25 2009 var
So I wrote a little script ...
#!/bin/sh
# varck - check ownership / perms of /var for changes
#
echo "varck: Run this after booting with base norestore"
TCE_MNT=/mnt/sdb1
TCE_DIR=${TCE_MNT}/boot/core4.7.6/tce
echo -n " You have to manually mount ${TCE_MNT}. Hit enter when done."
read JUNK
if [ -d ${TCE_DIR} ] ; then {
rm /etc/sysconfig/tcedir
ln -s ${TCE_DIR} /etc/sysconfig/tcedir
ls -l /etc/sysconfig |grep tcedir
echo "`ls -l / |grep var` base / norestore"
echo "`ls -l / |grep var` base / norestore" >>${TCE_DIR}/varck.log
cd ${TCE_DIR}
cat onboot.lst |while read X ; do {
tce-load -i ${X} >/dev/null 2>&1
echo "`ls -l / |grep var` after loading ${X}"
echo "`ls -l / |grep var` after loading ${X}" >>${TCE_DIR}/varck.log
} done
} else {
echo "ERROR: ${TCE_DIR} not found"
exit 10
} fi
...to see who might be making the change and I got the following results:
drwxrwxr-x 8 root staff 180 Dec 8 2011 var base / norestore
drwxrwxr-x 8 root staff 180 Dec 8 2011 var after loading fltk-1.1.10.tcz
drwxr-xr-x 8 root root 180 May 25 2009 var after loading Xlibs.tcz
drwxr-xr-x 8 root root 180 May 25 2009 var after loading Xprogs.tcz
drwxr-xr-x 8 root root 180 May 25 2009 var after loading Xvesa.tcz
drwxr-xr-x 8 root root 180 May 25 2009 var after loading wbar.tcz
drwxr-xr-x 8 root root 180 May 25 2009 var after loading jwm.tcz
drwxr-xr-x 8 root root 180 May 25 2009 var after loading zile.tcz
drwxr-xr-x 8 root root 180 May 25 2009 var after loading xtrlock.tcz
drwxr-xr-x 8 root root 180 May 25 2009 var after loading tcl_tk.tcz
drwxr-xr-x 8 root root 180 May 25 2009 var after loading openssh.tcz
drwxr-xr-x 8 root root 180 May 25 2009 var after loading filesystems-3.0.21-tinycore.tcz
drwxr-xr-x 8 root root 180 May 25 2009 var after loading flnotify.tcz
drwxr-xr-x 8 root root 180 May 25 2009 var after loading nss.tcz
drwxr-xr-x 8 root root 180 May 25 2009 var after loading xpdf.tcz
drwxr-xr-x 8 root root 180 May 25 2009 var after loading flash11.tcz
drwxr-xr-x 8 root root 180 May 25 2009 var after loading man.tcz
drwxr-xr-x 8 root root 180 May 25 2009 var after loading man-pages.tcz
drwxr-xr-x 8 root root 180 May 25 2009 var after loading xautolock-2.2.tcz
drwxr-xr-x 8 root root 180 May 25 2009 var after loading expect.tcz
drwxr-xr-x 8 root root 180 May 25 2009 var after loading bzip2.tcz
drwxr-xr-x 8 root root 180 May 25 2009 var after loading expect.tcz
This seems to imply that loading Xlibs is changing the ownership, permissions and date of /var. I haven't yet checked to see if other files or directories are similarly affected.