2010-02-02, 03:52
watson540 Wrote:the checks for filesize are as follows:i dont understand your 2nd example..filesize is not a binary on my boxCode:[email protected] ~/Downloads $ echo "text">>/mnt/ntfs/arbitraryfile.ext && rm /mnt/ntfs/arbitraryfile.ext
[email protected] ~/Downloads $
$1= move filesize, $2 = movedir free space $3 = movedir name
depending on the check, like, originaldir and working dir, reasonable filesize values are set, 1k file size for originaldir 5M file size for workingdir.
Code:
checkpermissions () {
TMoveDirWritable=0
if [ ! -z $2 ] && [ ! -z "$1" ] && [ $1 -lt $2 ]; then
echo "Testing write permission on $3">$3/arbitraryfile.ext
if [ -f "$3/arbitraryfile.ext" -a -s "$3/arbitraryfile.ext" ]; then
rm -f "$3/arbitraryfile.ext"
test ! -f "$3/arbitraryfile.ext" && TMoveDirWritable=1 || TMoveDirWritable=0
else
TMoveDirWritable=0
echo "CHECK PERMISSIONS ON $MoveDir"
fi
elif [ -z "$2" ] || [ $1 -ge $2 ]; then
TMoveDirWritable=0
echo "UNUSABLE SPACE-CHECK:$3"
fi
}
you did change your configuration in the mythicalLibrarian.sh file correct? Did you add quotes?
certain folders will not allow the mythtv user to run scripts. /var/ for example. It's part of linux security. If you mount folders in /home/ you will always be fine.
hrm.. does your filesystem support the rm -f setting?
Code:
[email protected]:~$ rm --version
rm (GNU coreutils) 7.4