What is `-p` used for `cron`?
Clash Royale CLAN TAG#URR8PPP
up vote
2
down vote
favorite
In cron's manpage (cronie)
-p Allows Cron to accept any user set crontables.
I learned that cron
daemon will implicitly search for and run the cron jobs defined in /etc/crontab
, /etc/cron.d/*
and /var/spool/cron/cronstabs/*
.
What is -p
used for?
Is it to explicitly tell cron
to search for and run the cron jobs defined in a crontab file which is stored in some place other than those mentioned above?
Or is it to copy a crontab file stored in some place other than those mentioned above to one of the places mentioned above?
Does the cron on Debian or its derivatives have -p
option? I don't find -p
on the manpage of cron
on Ubuntu.
Thanks.
cron
add a comment |Â
up vote
2
down vote
favorite
In cron's manpage (cronie)
-p Allows Cron to accept any user set crontables.
I learned that cron
daemon will implicitly search for and run the cron jobs defined in /etc/crontab
, /etc/cron.d/*
and /var/spool/cron/cronstabs/*
.
What is -p
used for?
Is it to explicitly tell cron
to search for and run the cron jobs defined in a crontab file which is stored in some place other than those mentioned above?
Or is it to copy a crontab file stored in some place other than those mentioned above to one of the places mentioned above?
Does the cron on Debian or its derivatives have -p
option? I don't find -p
on the manpage of cron
on Ubuntu.
Thanks.
cron
add a comment |Â
up vote
2
down vote
favorite
up vote
2
down vote
favorite
In cron's manpage (cronie)
-p Allows Cron to accept any user set crontables.
I learned that cron
daemon will implicitly search for and run the cron jobs defined in /etc/crontab
, /etc/cron.d/*
and /var/spool/cron/cronstabs/*
.
What is -p
used for?
Is it to explicitly tell cron
to search for and run the cron jobs defined in a crontab file which is stored in some place other than those mentioned above?
Or is it to copy a crontab file stored in some place other than those mentioned above to one of the places mentioned above?
Does the cron on Debian or its derivatives have -p
option? I don't find -p
on the manpage of cron
on Ubuntu.
Thanks.
cron
In cron's manpage (cronie)
-p Allows Cron to accept any user set crontables.
I learned that cron
daemon will implicitly search for and run the cron jobs defined in /etc/crontab
, /etc/cron.d/*
and /var/spool/cron/cronstabs/*
.
What is -p
used for?
Is it to explicitly tell cron
to search for and run the cron jobs defined in a crontab file which is stored in some place other than those mentioned above?
Or is it to copy a crontab file stored in some place other than those mentioned above to one of the places mentioned above?
Does the cron on Debian or its derivatives have -p
option? I don't find -p
on the manpage of cron
on Ubuntu.
Thanks.
cron
cron
edited 3 hours ago
asked 3 hours ago
Tim
24.5k69239426
24.5k69239426
add a comment |Â
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
3
down vote
The CAVEATS
section of the cronie's cron(8)
man page says (emphasis mine):
All crontab files have to be regular files or symlinks to regular
files, they must not be executable or writable for anyone else but
the owner. This requirement can be overridden by using the -p option
on the crond command line.
So it is in fact documented on the man page, although not in the most obvious location.
Thanks. Can the file argument to -p be anywhere in any filesystem, or must it be in either`/etc/cron.d/ or /varspool/cron/crontabs/?
â Tim
2 hours ago
1
The-p
option takes no "file argument" and has no effect as to where thecron
daemon looks for crontab files; it just switches the ownership/permission/filetype checks off. Thecron
daemon will still look for crontabs in three places: the file/etc/crontab
, any files in directory/etc/cron.d/
, and any files in directory/var/spool/cron/
. These locations can apparently only be changed by modifying thecron
source code.
â telcoM
2 hours ago
add a comment |Â
up vote
2
down vote
Good question. It doesn't appear to be documented within the man page. Looking at the source, we see -p
sets PermitAnyCrontab, see https://github.com/cronie-crond/cronie/blob/master/src/cron.c#L703
case 'p':
PermitAnyCrontab = 1;
Which in turn gets used https://github.com/cronie-crond/cronie/blob/40b7164227a17058afb4f3d837ebb3263943e2e6/src/database.c#L89
Makes cron
less fussy about the crontab file's state (can be a non-regular file, can have a different owner, can have a mode that's not 400, can have a link count other than 1).
if (PermitAnyCrontab == 0)
While it's clearly present within cronie, such a feature is not present in Vixie Cron (https://github.com/svagner/vixie-cron)
Thanks. Can such a crontab file specified by -p be stored anywhere? Must it be user-specific crontab file, not system crontab file?
â Tim
3 hours ago
It can be a symlink to elsewhere. All it does is bypass a safeguards / checks really. Note it's crond itself, not crontab.
â steve
3 hours ago
Do you mean the file argument to -p must still be in either`/etc/cron.d/ or /varspool/cron/crontabs/, not anywhere in any filesystem?
â Tim
3 hours ago
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
3
down vote
The CAVEATS
section of the cronie's cron(8)
man page says (emphasis mine):
All crontab files have to be regular files or symlinks to regular
files, they must not be executable or writable for anyone else but
the owner. This requirement can be overridden by using the -p option
on the crond command line.
So it is in fact documented on the man page, although not in the most obvious location.
Thanks. Can the file argument to -p be anywhere in any filesystem, or must it be in either`/etc/cron.d/ or /varspool/cron/crontabs/?
â Tim
2 hours ago
1
The-p
option takes no "file argument" and has no effect as to where thecron
daemon looks for crontab files; it just switches the ownership/permission/filetype checks off. Thecron
daemon will still look for crontabs in three places: the file/etc/crontab
, any files in directory/etc/cron.d/
, and any files in directory/var/spool/cron/
. These locations can apparently only be changed by modifying thecron
source code.
â telcoM
2 hours ago
add a comment |Â
up vote
3
down vote
The CAVEATS
section of the cronie's cron(8)
man page says (emphasis mine):
All crontab files have to be regular files or symlinks to regular
files, they must not be executable or writable for anyone else but
the owner. This requirement can be overridden by using the -p option
on the crond command line.
So it is in fact documented on the man page, although not in the most obvious location.
Thanks. Can the file argument to -p be anywhere in any filesystem, or must it be in either`/etc/cron.d/ or /varspool/cron/crontabs/?
â Tim
2 hours ago
1
The-p
option takes no "file argument" and has no effect as to where thecron
daemon looks for crontab files; it just switches the ownership/permission/filetype checks off. Thecron
daemon will still look for crontabs in three places: the file/etc/crontab
, any files in directory/etc/cron.d/
, and any files in directory/var/spool/cron/
. These locations can apparently only be changed by modifying thecron
source code.
â telcoM
2 hours ago
add a comment |Â
up vote
3
down vote
up vote
3
down vote
The CAVEATS
section of the cronie's cron(8)
man page says (emphasis mine):
All crontab files have to be regular files or symlinks to regular
files, they must not be executable or writable for anyone else but
the owner. This requirement can be overridden by using the -p option
on the crond command line.
So it is in fact documented on the man page, although not in the most obvious location.
The CAVEATS
section of the cronie's cron(8)
man page says (emphasis mine):
All crontab files have to be regular files or symlinks to regular
files, they must not be executable or writable for anyone else but
the owner. This requirement can be overridden by using the -p option
on the crond command line.
So it is in fact documented on the man page, although not in the most obvious location.
answered 3 hours ago
telcoM
13.6k11742
13.6k11742
Thanks. Can the file argument to -p be anywhere in any filesystem, or must it be in either`/etc/cron.d/ or /varspool/cron/crontabs/?
â Tim
2 hours ago
1
The-p
option takes no "file argument" and has no effect as to where thecron
daemon looks for crontab files; it just switches the ownership/permission/filetype checks off. Thecron
daemon will still look for crontabs in three places: the file/etc/crontab
, any files in directory/etc/cron.d/
, and any files in directory/var/spool/cron/
. These locations can apparently only be changed by modifying thecron
source code.
â telcoM
2 hours ago
add a comment |Â
Thanks. Can the file argument to -p be anywhere in any filesystem, or must it be in either`/etc/cron.d/ or /varspool/cron/crontabs/?
â Tim
2 hours ago
1
The-p
option takes no "file argument" and has no effect as to where thecron
daemon looks for crontab files; it just switches the ownership/permission/filetype checks off. Thecron
daemon will still look for crontabs in three places: the file/etc/crontab
, any files in directory/etc/cron.d/
, and any files in directory/var/spool/cron/
. These locations can apparently only be changed by modifying thecron
source code.
â telcoM
2 hours ago
Thanks. Can the file argument to -p be anywhere in any filesystem, or must it be in either`/etc/cron.d/ or /varspool/cron/crontabs/?
â Tim
2 hours ago
Thanks. Can the file argument to -p be anywhere in any filesystem, or must it be in either`/etc/cron.d/ or /varspool/cron/crontabs/?
â Tim
2 hours ago
1
1
The
-p
option takes no "file argument" and has no effect as to where the cron
daemon looks for crontab files; it just switches the ownership/permission/filetype checks off. The cron
daemon will still look for crontabs in three places: the file /etc/crontab
, any files in directory /etc/cron.d/
, and any files in directory /var/spool/cron/
. These locations can apparently only be changed by modifying the cron
source code.â telcoM
2 hours ago
The
-p
option takes no "file argument" and has no effect as to where the cron
daemon looks for crontab files; it just switches the ownership/permission/filetype checks off. The cron
daemon will still look for crontabs in three places: the file /etc/crontab
, any files in directory /etc/cron.d/
, and any files in directory /var/spool/cron/
. These locations can apparently only be changed by modifying the cron
source code.â telcoM
2 hours ago
add a comment |Â
up vote
2
down vote
Good question. It doesn't appear to be documented within the man page. Looking at the source, we see -p
sets PermitAnyCrontab, see https://github.com/cronie-crond/cronie/blob/master/src/cron.c#L703
case 'p':
PermitAnyCrontab = 1;
Which in turn gets used https://github.com/cronie-crond/cronie/blob/40b7164227a17058afb4f3d837ebb3263943e2e6/src/database.c#L89
Makes cron
less fussy about the crontab file's state (can be a non-regular file, can have a different owner, can have a mode that's not 400, can have a link count other than 1).
if (PermitAnyCrontab == 0)
While it's clearly present within cronie, such a feature is not present in Vixie Cron (https://github.com/svagner/vixie-cron)
Thanks. Can such a crontab file specified by -p be stored anywhere? Must it be user-specific crontab file, not system crontab file?
â Tim
3 hours ago
It can be a symlink to elsewhere. All it does is bypass a safeguards / checks really. Note it's crond itself, not crontab.
â steve
3 hours ago
Do you mean the file argument to -p must still be in either`/etc/cron.d/ or /varspool/cron/crontabs/, not anywhere in any filesystem?
â Tim
3 hours ago
add a comment |Â
up vote
2
down vote
Good question. It doesn't appear to be documented within the man page. Looking at the source, we see -p
sets PermitAnyCrontab, see https://github.com/cronie-crond/cronie/blob/master/src/cron.c#L703
case 'p':
PermitAnyCrontab = 1;
Which in turn gets used https://github.com/cronie-crond/cronie/blob/40b7164227a17058afb4f3d837ebb3263943e2e6/src/database.c#L89
Makes cron
less fussy about the crontab file's state (can be a non-regular file, can have a different owner, can have a mode that's not 400, can have a link count other than 1).
if (PermitAnyCrontab == 0)
While it's clearly present within cronie, such a feature is not present in Vixie Cron (https://github.com/svagner/vixie-cron)
Thanks. Can such a crontab file specified by -p be stored anywhere? Must it be user-specific crontab file, not system crontab file?
â Tim
3 hours ago
It can be a symlink to elsewhere. All it does is bypass a safeguards / checks really. Note it's crond itself, not crontab.
â steve
3 hours ago
Do you mean the file argument to -p must still be in either`/etc/cron.d/ or /varspool/cron/crontabs/, not anywhere in any filesystem?
â Tim
3 hours ago
add a comment |Â
up vote
2
down vote
up vote
2
down vote
Good question. It doesn't appear to be documented within the man page. Looking at the source, we see -p
sets PermitAnyCrontab, see https://github.com/cronie-crond/cronie/blob/master/src/cron.c#L703
case 'p':
PermitAnyCrontab = 1;
Which in turn gets used https://github.com/cronie-crond/cronie/blob/40b7164227a17058afb4f3d837ebb3263943e2e6/src/database.c#L89
Makes cron
less fussy about the crontab file's state (can be a non-regular file, can have a different owner, can have a mode that's not 400, can have a link count other than 1).
if (PermitAnyCrontab == 0)
While it's clearly present within cronie, such a feature is not present in Vixie Cron (https://github.com/svagner/vixie-cron)
Good question. It doesn't appear to be documented within the man page. Looking at the source, we see -p
sets PermitAnyCrontab, see https://github.com/cronie-crond/cronie/blob/master/src/cron.c#L703
case 'p':
PermitAnyCrontab = 1;
Which in turn gets used https://github.com/cronie-crond/cronie/blob/40b7164227a17058afb4f3d837ebb3263943e2e6/src/database.c#L89
Makes cron
less fussy about the crontab file's state (can be a non-regular file, can have a different owner, can have a mode that's not 400, can have a link count other than 1).
if (PermitAnyCrontab == 0)
While it's clearly present within cronie, such a feature is not present in Vixie Cron (https://github.com/svagner/vixie-cron)
edited 3 hours ago
answered 3 hours ago
steve
13.3k22251
13.3k22251
Thanks. Can such a crontab file specified by -p be stored anywhere? Must it be user-specific crontab file, not system crontab file?
â Tim
3 hours ago
It can be a symlink to elsewhere. All it does is bypass a safeguards / checks really. Note it's crond itself, not crontab.
â steve
3 hours ago
Do you mean the file argument to -p must still be in either`/etc/cron.d/ or /varspool/cron/crontabs/, not anywhere in any filesystem?
â Tim
3 hours ago
add a comment |Â
Thanks. Can such a crontab file specified by -p be stored anywhere? Must it be user-specific crontab file, not system crontab file?
â Tim
3 hours ago
It can be a symlink to elsewhere. All it does is bypass a safeguards / checks really. Note it's crond itself, not crontab.
â steve
3 hours ago
Do you mean the file argument to -p must still be in either`/etc/cron.d/ or /varspool/cron/crontabs/, not anywhere in any filesystem?
â Tim
3 hours ago
Thanks. Can such a crontab file specified by -p be stored anywhere? Must it be user-specific crontab file, not system crontab file?
â Tim
3 hours ago
Thanks. Can such a crontab file specified by -p be stored anywhere? Must it be user-specific crontab file, not system crontab file?
â Tim
3 hours ago
It can be a symlink to elsewhere. All it does is bypass a safeguards / checks really. Note it's crond itself, not crontab.
â steve
3 hours ago
It can be a symlink to elsewhere. All it does is bypass a safeguards / checks really. Note it's crond itself, not crontab.
â steve
3 hours ago
Do you mean the file argument to -p must still be in either`/etc/cron.d/ or /varspool/cron/crontabs/, not anywhere in any filesystem?
â Tim
3 hours ago
Do you mean the file argument to -p must still be in either`/etc/cron.d/ or /varspool/cron/crontabs/, not anywhere in any filesystem?
â Tim
3 hours ago
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f479254%2fwhat-is-p-used-for-cron%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password