Operating System - HP-UX
1820561 Members
2416 Online
109626 Solutions
New Discussion юеВ

Re: crontab owner and permission

 
SOLVED
Go to solution
Bernard M. dela Vega
Occasional Contributor

crontab owner and permission

Hello,

I have a HP-UX 11.11

I have two question regarding the file in the /var/spool/cron/crontabs/ directory.

1. Who should the owner be of the files because all of the files has root as the owner?

2. What should the permission be? The current permission for the files are r-- --- --- ?

I attached a file of the output.

I would appreciate your feedback/advises.

Regards.

10 REPLIES 10
Jon Mattatall
Esteemed Contributor
Solution

Re: crontab owner and permission

Relax, all is as it should be.

root is the owner of all the files in /var/spool/cron/crontabs, and r-------- is fine.

Users (if allowed) must use crontab -e to change the contents, and you can't edit the files directly. Read to owner is sufficient.
A little knowledge is dangerous - none is absolutely terrifying!!!
Jeff Schussele
Honored Contributor

Re: crontab owner and permission

Hi,

1) root SHOULD be the owner, BUT the group ownership should be the primary group of the user who "owns" the cron entry.

2) 400 or r-------- IS the proper permissions.

This works because /usr/bin/crontab is an SUID binary. The perms keep unauthorized users from manually editing the file.

HTH,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
James A. Donovan
Honored Contributor

Re: crontab owner and permission

Your configuration looks fine.

1. The owner of the file should be root, the group should be the primary group of the "owner" of the crontab.

2. The permissions on the files should all be 400, readable only by root.
Remember, wherever you go, there you are...
Paul Sperry
Honored Contributor

Re: crontab owner and permission

Your listing looks normal to me
Elena Leontieva
Esteemed Contributor

Re: crontab owner and permission

I believe your ownership and permissions are correct. Each user who is allowed to run cron jobs is accessing this file through 'crontab' command.
Elena.
Helen French
Honored Contributor

Re: crontab owner and permission

Your settings are correct:

1) Root will be the owner. But your user should be included in the "group" specified for the crontab file.

2) The permission (r------) is okay too since it's a security reason. The SUID and Group ID comes in picture when you actally access the file.
Life is a promise, fulfill it!
Hai Nguyen_1
Honored Contributor

Re: crontab owner and permission

What you have observed are correct settings. The permission of a cron is always r-- --- ---. The owner of a cron file is always root. The group is the one which the named file (the actual owner of the cron) belongs to.

Hai
Dario_1
Trusted Contributor

Re: crontab owner and permission

Hi!

Do not change anything. They are the way they are supposed to be.

Regards,

DR
Leandro Lucena
Occasional Contributor

Re: crontab owner and permission

Hello,

This is correct. r-- --- --- is the correct permition of this file and root MUST be the owner of this.

Regards, Leandro
Caesar_3
Esteemed Contributor

Re: crontab owner and permission

Hello!

You permitions and owner looks like mine
so it's Ok and should work!
Do you have problem with the cron ?
Check if it's running, you also have verbs
mode that will give you more information.
You can also check syslog

Caesar