Cron permission denied?

NVroom

New Member
Jun 15, 2016
10
0
1
26
Hi, Just did a fresh install of proxmox and now every night I am being emailed this error:


/etc/cron.daily/man-db:
fopen: Permission denied
run-parts: /etc/cron.daily/man-db exited with return code 2


How do you fix this?
 
I removed --chuid man from /etc/cron.daily/man-db as on my sysem the user man has the /usr/sbin/nologin shell. Works now.
 
Sorry I'm confused what you mean by this.

I removed --chuid man from /etc/cron.daily/man-db as on my sysem the user man has the /usr/sbin/nologin shell. Works now.

I just wanted to register to say I have the same issue. Clean install from ovh rec. this email this am.

Do we know why the user is being changed to man and not working? I see there is a bug that was fixed last year.

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=797019

From: Colin Watson <cjwatson@debian.org>
To: adelugames <adelugames@gmail.com>
Cc: 797019@bugs.debian.org
Subject: Re: Bug#797019: man-db: cron.daily fails to run man-db due to --chuid flag
Date: Sat, 29 Aug 2015 13:15:37 +0100
Control: tag 797019 fixed-upstream

On Fri, Aug 28, 2015 at 07:34:35AM -0400, adelugames wrote:
> The output is attached

Thanks. Fixed upstream for 2.7.3
(http://git.savannah.gnu.org/cgit/man-db.git/commit/?id=3b99549941c9a8104045ee09af91611346b5a0f7;
I'll also shortly look into why this happened in the first place). In
the meantime, you can make this go away for your system by running these
commands:

sudo chown man /var/cache/man/*/CACHEDIR.TAG /var/cache/man/*/index.db
sudo chmod 644 /var/cache/man/*/CACHEDIR.TAG /var/cache/man/*/index.db

--
Colin Watson [cjwatson@debian.org]
 
Last edited:
Hello, i think i know the problem

if you have a server on Ovh, and mount the NFS share that OVH give you, you will have this problem since on FTP/NFS in ovh you are not allowed to change UID.
 
Hello, i think i know the problem

if you have a server on Ovh, and mount the NFS share that OVH give you, you will have this problem since on FTP/NFS in ovh you are not allowed to change UID.

Hello, for me, no, I do not have any NFS shares. I have not solved the error. I am hoping a dev will reply.
 
if you used the OVH template/installer, please report this issue to them!
 
For future OVH users, they have fixed the error. Thanks Fabian.

I have excellent news, thanks to the information you provide us we confirmed
the issue with the distribution you mentioned. Our specialist have replace the
available template for the server in which the issue has been corrected. Again
thank you for escalating this issue to us.

But, the only solution they offered us is to reinstall from the template to fix the error.

If you don’t have any Vm’s created on your proxmox server, may I suggets you
to go ahead and re-install the OS with our template. If the server has VM’s
created, then may I suggest to first backup your VM’s then re-install the OS
with our template.

Devs/anyone, could it possibly be a less sledgehammer solution? I am not really looking forward to reinstalling my system.

Code:
/etc/cron.daily/man-db:
fopen: Permission denied
run-parts: /etc/cron.daily/man-db exited with return code 2

Thank you for your help.
 
I will install the new image in the coming days on a node of mine and compare permissions.
About images, there is a problem with the Proxmox Ubuntu 16.04 template, the permissions on /var/log/syslog are broken and thus nothing is being written there... Maybe I should report this :p
 
I had a bit of time to look into the error. Unless there are some other issues I am not aware of, it seems that all that was needed is as mentioned in the bug report by Colin at debian

From: Colin Watson <cjwatson@debian.org>

Thanks. Fixed upstream for 2.7.3
(http://git.savannah.gnu.org/cgit/man-db.git/commit/?id=3b99549941c9a8104045ee09af91611346b5a0f7;

In the meantime, you can make this go away for your system by running these
commands:

sudo chown man /var/cache/man/*/CACHEDIR.TAG /var/cache/man/*/index.db
sudo chmod 644 /var/cache/man/*/CACHEDIR.TAG /var/cache/man/*/index.db
--
Colin Watson [cjwatson@debian.org]



A clean install of proxmox 4.4 in a virtual machine showed these directories being owned my man and group root.

The OVH install had the directories owned by proxmox root.

Rather than reinstall (which seemed kind of extreme unless OVH knows of some other problems with the template) I did a

Code:
chown -R man:root /var/cache/man/

then ran

Code:
run-parts /etc/cron.daily/

I have not seen any errors or received any error emails...yet.

for what it is worth, Colin states that

and the version I have is

Code:
man-db:
  Installed: 2.7.0.2-5
  Candidate: 2.7.0.2-5
  Version table:
*** 2.7.0.2-5 0
        500 http://debian.bhs.mirrors.ovh.net/debian/ jessie/main amd64 Packages
        100 /var/lib/dpkg/status

I wonder if the fix has been backported...

If anyone would like to chime in to verify or comment on this, it would be appreciated.

Best
 
Last edited:
hi pkcl, I installed the new OVH image and can confirm that the chmod command you reported should do the trick to fix the problem
 

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!