Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #208912 > unrolled thread

nother problem I can't access my crontab, no perms

Started byGene Heskett <gheskett@shentel.net>
First post2019-05-20 18:00 +0200
Last post2019-05-20 21:00 +0200
Articles 5 — 2 participants

Back to article view | Back to linux.debian.user


Contents

  nother problem I can't access my crontab, no perms Gene Heskett <gheskett@shentel.net> - 2019-05-20 18:00 +0200
    Re: nother problem I can't access my crontab, no perms Gene Heskett <gheskett@shentel.net> - 2019-05-20 19:10 +0200
      Re: nother problem I can't access my crontab, no perms Étienne Mollier <etienne.mollier@mailoo.org> - 2019-05-20 20:30 +0200
        Re: nother problem I can't access my crontab, no perms Gene Heskett <gheskett@shentel.net> - 2019-05-20 20:50 +0200
          Re: nother problem I can't access my crontab, no perms Étienne Mollier <etienne.mollier@mailoo.org> - 2019-05-20 21:00 +0200

#208912 — nother problem I can't access my crontab, no perms

FromGene Heskett <gheskett@shentel.net>
Date2019-05-20 18:00 +0200
Subjectnother problem I can't access my crontab, no perms
Message-ID<xZSRI-2oR-3@gated-at.bofh.it>
Gut an ls -lR of /var/spool shows they are an exact copy of the wheezy 
files. With mine own by me.

What did I screw up now. I had noticed my kmail spam folder was filling 
up because my cron scripts aren't running as scheduled.  Otherwise I 
haven't touched it since installing stretch.

Any clues? Making me a member of the group shown made no diff, and it 
worked a treat under wheezy.
 
Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>

[toc] | [next] | [standalone]


#208916

FromGene Heskett <gheskett@shentel.net>
Date2019-05-20 19:10 +0200
Message-ID<xZTXr-3hO-7@gated-at.bofh.it>
In reply to#208912
On Monday 20 May 2019 11:58:45 am Gene Heskett wrote:

> Gut an ls -lR of /var/spool shows they are an exact copy of the wheezy
> files. With mine own by me.
>
> What did I screw up now. I had noticed my kmail spam folder was
> filling up because my cron scripts aren't running as scheduled. 
> Otherwise I haven't touched it since installing stretch.
>
> Any clues? Making me a member of the group shown made no diff, and it
> worked a treat under wheezy.
>
> Cheers, Gene Heskett
An ls -laR of /var/spool/cron:
ene@coyote:/var/spool/cron$ sudo  ls -laR
.:
total 20
drwxr-xr-x  5 root   root             4096 Feb  3  2015 .
drwxr-xr-x 10 root   root             4096 May 10 02:27 ..
drwxrwx--T  2 daemon daemon           4096 Feb  3  2015 atjobs
drwxrwx--T  2 daemon daemon           4096 Oct  3  2014 atspool
drwx-wx--T  2 root   systemd-timesync 4096 Mar 31 09:15 crontabs

./atjobs:
total 12
drwxrwx--T 2 daemon daemon 4096 Feb  3  2015 .
drwxr-xr-x 5 root   root   4096 Feb  3  2015 ..
-rw------- 1 daemon daemon    2 Nov  5  2014 .SEQ

./atspool:
total 8
drwxrwx--T 2 daemon daemon 4096 Oct  3  2014 .
drwxr-xr-x 5 root   root   4096 Feb  3  2015 ..

./crontabs:
total 24
drwx-wx--T 2 root     systemd-timesync 4096 Mar 31 09:15 .
drwxr-xr-x 5 root     root             4096 Feb  3  2015 ..
-rw------- 1 amanda   systemd-timesync  281 Nov 16  2018 amanda
-rw------- 1 gene     systemd-timesync 1430 Aug  2  2018 gene
-rw------- 1 root     systemd-timesync  662 Mar 31 09:15 root
-rw------- 1 www-data systemd-timesync 1117 Jul 22  2017 www-data

Looks good to me ????, but strace says I can't open the file "gene"


Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>

[toc] | [prev] | [next] | [standalone]


#208920

FromÉtienne Mollier <etienne.mollier@mailoo.org>
Date2019-05-20 20:30 +0200
Message-ID<xZVcR-40a-1@gated-at.bofh.it>
In reply to#208916
Good Day Gene,

On coyote, /var/spool/cron contained:
> drwx-wx--T  2 root   systemd-timesync 4096 Mar 31 09:15 crontabs
         ^^^
You can't go through this "crontab" directory if you are not
root, or a member of the group systemd-timesync.  That includes
that you can't read any file below, even if it is attributed to
you.

I would tend to believe that execution of "crontab" related
commands will benefit from the proper UIDs when operating.  On
my machine, at the same working directory, I have:

	$ sudo ls -lR
	.:
	total 0
	drwx-wx--T 2 root crontab 21 Feb 28 22:49 crontabs
	
	./crontabs:
	total 4
	-rw------- 1 user crontab 381 Feb 28 22:49 user

It would seem that your restore attempt conserved UIDs, but
crontab's former UID has become systemd-timesyncd one.  Perhaps
a well placed `chgrp -R crontab crontabs/` will do?

Kind Regards,
-- 
Étienne Mollier <etienne.mollier@mailoo.org>

[toc] | [prev] | [next] | [standalone]


#208923

FromGene Heskett <gheskett@shentel.net>
Date2019-05-20 20:50 +0200
Message-ID<xZVwe-477-7@gated-at.bofh.it>
In reply to#208920
On Monday 20 May 2019 02:21:20 pm Étienne Mollier wrote:

> Good Day Gene,
>
> On coyote, /var/spool/cron contained:
> > drwx-wx--T  2 root   systemd-timesync 4096 Mar 31 09:15 crontabs
>
>          ^^^
> You can't go through this "crontab" directory if you are not
> root, or a member of the group systemd-timesync.  That includes
> that you can't read any file below, even if it is attributed to
> you.
>
> I would tend to believe that execution of "crontab" related
> commands will benefit from the proper UIDs when operating.  On
> my machine, at the same working directory, I have:
>
> 	$ sudo ls -lR
> 	.:
> 	total 0
> 	drwx-wx--T 2 root crontab 21 Feb 28 22:49 crontabs
>
> 	./crontabs:
> 	total 4
> 	-rw------- 1 user crontab 381 Feb 28 22:49 user
>
> It would seem that your restore attempt conserved UIDs, but
> crontab's former UID has become systemd-timesyncd one.  Perhaps
> a well placed `chgrp -R crontab crontabs/` will do?
>
> Kind Regards,

Absolutely spot on,  Étienne Mollier, thank you very much.  Now cron has 
about 2 weeks work to catch up on. :)

Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>

[toc] | [prev] | [next] | [standalone]


#208924

FromÉtienne Mollier <etienne.mollier@mailoo.org>
Date2019-05-20 21:00 +0200
Message-ID<xZVFT-4aH-1@gated-at.bofh.it>
In reply to#208923
On 5/20/19 8:40 PM, Gene Heskett wrote:
>> I would tend to believe that execution of "crontab" related
>> commands will benefit from the proper UIDs when operating.  On
>> my machine, at the same working directory, I have:
>>
>> 	$ sudo ls -lR
>> 	.:
>> 	total 0
>> 	drwx-wx--T 2 root crontab 21 Feb 28 22:49 crontabs
>>
>> 	./crontabs:
>> 	total 4
>> 	-rw------- 1 user crontab 381 Feb 28 22:49 user
>>
>> It would seem that your restore attempt conserved UIDs, but
>> crontab's former UID has become systemd-timesyncd one.  Perhaps
>> a well placed `chgrp -R crontab crontabs/` will do?

Whoopsie, for the sake of precision, I mostly meant GID (Group
Identifier) instead of UID (User Identifier).

> Absolutely spot on,  Étienne Mollier, thank you very much.  Now cron has 
> about 2 weeks work to catch up on. :)

Glad to read that  :)
-- 
Étienne Mollier <etienne.mollier@mailoo.org>

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.user


csiph-web