* [9fans] cron job
@ 2021-09-05 7:52 有澤 健治
2021-09-05 11:20 ` [9fans] " 有澤 健治
0 siblings, 1 reply; 2+ messages in thread
From: 有澤 健治 @ 2021-09-05 7:52 UTC (permalink / raw)
To: 9fans
Hello all,
I noticed what I donn't understand.
Let alice be a user of a system hebe,
and try an experiment on cron job.
STEP 1.
make /usr/alice/tmp/T that looks like:
hebe# ls -dl /usr/alice/tmp/T
d-rwxrwxrwx M 24 alice alice 0 Sep 3 01:00 /usr/alice/tmp/T
hebe#
STEP 2.
make a rc script /usr/alice/bin/rc/touchtest:
#!/bin/rc
rfork e
d=/usr/alice/tmp/T
t=`{date -n}
touch $d/$t
STEP 3.
make a cron job for alice on /cron/alice/cron such that:
0,10,20,30,40,50 * * * * local /usr/alice/bin/rc/touchtest
STEP 4.
observe files in /usr/alice/tmp/T
and you can confirm, owner of created files is hostowner, not alice.
my case:
hebe% cd /usr/alice/tmp
hebe% ls -l T
--rw-rw-rw- M 195329 arisawa alice 0 Sep 3 00:40 T/1630597201
--rw-rw-rw- M 195329 arisawa alice 0 Sep 3 00:50 T/1630597801
--rw-rw-rw- M 195329 arisawa alice 0 Sep 3 01:00 T/1630598401
hebe%
where "arisawa" is the hostowner of "hebe".
Is this reasonable ?
additional info:
hebe# ps | grep cron
arisawa 366 0:00 0:00 128K Sleep cron
hebe#
Kenji Arisawa
------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/Ta5081ae14eab6746-M34fbc30045c26c5432a036f6
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription
^ permalink raw reply [flat|nested] 2+ messages in thread
* [9fans] Re: cron job
2021-09-05 7:52 [9fans] cron job 有澤 健治
@ 2021-09-05 11:20 ` 有澤 健治
0 siblings, 0 replies; 2+ messages in thread
From: 有澤 健治 @ 2021-09-05 11:20 UTC (permalink / raw)
To: 9fans
Sorry the following mail should be sent to 9front mailing list.
On 2021/09/05 16:52, 有澤 健治 wrote:
> Hello all,
>
> I noticed what I donn't understand.
>
> Let alice be a user of a system hebe,
> and try an experiment on cron job.
>
> STEP 1.
> make /usr/alice/tmp/T that looks like:
> hebe# ls -dl /usr/alice/tmp/T
> d-rwxrwxrwx M 24 alice alice 0 Sep 3 01:00 /usr/alice/tmp/T
> hebe#
>
> STEP 2.
> make a rc script /usr/alice/bin/rc/touchtest:
> #!/bin/rc
> rfork e
> d=/usr/alice/tmp/T
> t=`{date -n}
> touch $d/$t
>
> STEP 3.
> make a cron job for alice on /cron/alice/cron such that:
> 0,10,20,30,40,50 * * * * local /usr/alice/bin/rc/touchtest
>
> STEP 4.
> observe files in /usr/alice/tmp/T
> and you can confirm, owner of created files is hostowner, not alice.
> my case:
> hebe% cd /usr/alice/tmp
> hebe% ls -l T
> --rw-rw-rw- M 195329 arisawa alice 0 Sep 3 00:40 T/1630597201
> --rw-rw-rw- M 195329 arisawa alice 0 Sep 3 00:50 T/1630597801
> --rw-rw-rw- M 195329 arisawa alice 0 Sep 3 01:00 T/1630598401
> hebe%
>
> where "arisawa" is the hostowner of "hebe".
> Is this reasonable ?
>
> additional info:
> hebe# ps | grep cron
> arisawa 366 0:00 0:00 128K Sleep cron
> hebe#
>
> Kenji Arisawa
>
------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/Ta5081ae14eab6746-M7b04b77948894569191ec39c
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-09-05 11:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-05 7:52 [9fans] cron job 有澤 健治
2021-09-05 11:20 ` [9fans] " 有澤 健治
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).