9front - general discussion about 9front
 help / color / mirror / Atom feed
* [9front] cron job
@ 2021-09-06  8:05 有澤 健治
  0 siblings, 0 replies; only message in thread
From: 有澤 健治 @ 2021-09-06  8:05 UTC (permalink / raw)
  To: 9front

[-- Attachment #1: Type: text/plain, Size: 1077 bytes --]

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 host owner, 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 host owner of "hebe".
Is this reasonable ?

additional info:
hebe# ps | grep cron
arisawa         366    0:00   0:00      128K Sleep    cron
hebe#

Kenji Arisawa


[-- Attachment #2: Type: text/html, Size: 2042 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-09-06  8:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-06  8:05 [9front] cron job 有澤 健治

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).