Cron error

koby

Renowned Member
Jun 21, 2012
137
4
83
Natanya , Israel
Hello guys ,
I keep getting this error which I can not understand why ?
I am using Ver 6.3-5

Here is the error :
"
/etc/cron.daily/dpkg:
mv: cannot stat './/dpkg.status.5.gz': No such file or directory
mv: cannot stat './/dpkg.status.4.gz': No such file or directory
mv: cannot stat './/dpkg.status.3.gz': No such file or directory
mv: cannot stat './/dpkg.status.2.gz': No such file or directory
mv: cannot stat './/dpkg.status.1.gz': No such file or directory
mv: cannot stat 'dpkg.status': No such file or directory
mv: cannot stat './/dpkg.diversions.5.gz': No such file or directory
mv: cannot stat './/dpkg.diversions.4.gz': No such file or directory
mv: cannot stat './/dpkg.diversions.3.gz': No such file or directory
mv: cannot stat './/dpkg.diversions.2.gz': No such file or directory
mv: cannot stat './/dpkg.diversions.1.gz': No such file or directory
mv: cannot stat 'dpkg.diversions': No such file or directory
mv: cannot stat './/dpkg.statoverride.5.gz': No such file or directory
mv: cannot stat './/dpkg.statoverride.4.gz': No such file or directory
mv: cannot stat './/dpkg.statoverride.3.gz': No such file or directory
mv: cannot stat './/dpkg.statoverride.2.gz': No such file or directory
mv: cannot stat './/dpkg.statoverride.1.gz': No such file or directory
mv: cannot stat 'dpkg.statoverride': No such file or directory
"
Can someone please advice ,
Best Regards,
Koby Peleg Hen.
 
where do you get the error-messages?

could you please post the contents of /etc/cron.daily/dpkg on your system?
Hi ,
As for the first question ,==> I do get this to my mail.

For the second question ,

here is /etc/cron.daily/dpkg on your system...
"
#!/bin/sh

dbdir=/var/lib/dpkg

# Backup the 7 last versions of dpkg databases containing user data.
if cd /var/backups ; then
# We backup all relevant database files if any has changed, so that
# the rotation number always contains an internally consistent set.
dbchanged=no
dbfiles="arch status diversions statoverride"
for db in $dbfiles ; do
if ! cmp -s "dpkg.${db}.0" "$dbdir/$db"; then
dbchanged=yes
break;
fi
done
if [ "$dbchanged" = "yes" ] ; then
for db in $dbfiles ; do
[ -e "$dbdir/$db" ] || continue
cp -p "$dbdir/$db" "dpkg.$db"
savelog -c 7 "dpkg.$db" >/dev/null
done
fi

# The alternatives database is independent from the dpkg database.
dbalt=alternatives

# XXX: Ideally we'd use --warning=none instead of discarding stderr, but
# as of GNU tar 1.27.1, it does not seem to work reliably (see #749307).
if ! test -e ${dbalt}.tar.0 ||
! tar -df ${dbalt}.tar.0 -C $dbdir $dbalt >/dev/null 2>&1 ;
then
tar -cf ${dbalt}.tar -C $dbdir $dbalt >/dev/null 2>&1
savelog -c 7 ${dbalt}.tar >/dev/null
fi
fi
"
 
hmm - seems odd - the cron-script seems unchanged (if possible please use code-tags the next time - or even attach it for easier comparison)

any particular changes to mountpoints etc on your system?

what's the output of (in code tags):
Code:
ls -la /var/
ls -la /var/backups/
ls -la /var/lib/dpkg/
sh -x /etc/cron.daily/dpkg

the last one should run the cron-script with set -x - which should give an indication where the problem occurs
 
Hi, I have got the same problem and output of the script sh -x /etc/cron.daily/dpkg is:

+ dbdir=/var/lib/dpkg
+ cd /var/backups
+ dbchanged=no
+ dbfiles=arch status diversions statoverride
+ cmp -s dpkg.arch.0 /var/lib/dpkg/arch
+ dbchanged=yes
+ break
+ [ yes = yes ]
+ [ -e /var/lib/dpkg/arch ]
+ continue
+ [ -e /var/lib/dpkg/status ]
+ cp -p /var/lib/dpkg/status dpkg.status
cp: cannot create regular file 'dpkg.status': Permission denied
+ savelog -c 7 dpkg.status
touch: cannot touch 'dpkg.status': Permission denied
savelog: could not touch dpkg.status
+ [ -e /var/lib/dpkg/diversions ]
+ cp -p /var/lib/dpkg/diversions dpkg.diversions
cp: cannot create regular file 'dpkg.diversions': Permission denied
+ savelog -c 7 dpkg.diversions
touch: cannot touch 'dpkg.diversions': Permission denied
savelog: could not touch dpkg.diversions
+ [ -e /var/lib/dpkg/statoverride ]
+ cp -p /var/lib/dpkg/statoverride dpkg.statoverride
cp: cannot create regular file 'dpkg.statoverride': Permission denied
+ savelog -c 7 dpkg.statoverride
touch: cannot touch 'dpkg.statoverride': Permission denied
savelog: could not touch dpkg.statoverride
+ dbalt=alternatives
+ test -e alternatives.tar.0
+ tar -df alternatives.tar.0 -C /var/lib/dpkg alternatives
 
Hi, I have got the same problem and output of the script sh -x /etc/cron.daily/dpkg is:
you would need to run the script as root (the permission denied errors indicate that you run it as regular user)
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!