in reply to weird kids process, why ?

Perhaps I'm missing something, but shouldn't you chown/chmod $target_usr_maildir instead?

FWIW, if you use this script more than once you really should check the results from backticks and system calls like 'stat'. Since recursive chowning is a pretty big hammer, you should probably make extra sure the values you are passing to it are computed properly.

Replies are listed 'Best First'.
Re^2: weird kids process, why ?
by Qiang (Friar) on Jan 12, 2005 at 04:39 UTC
    I finally look carefully at my code after I was being told second time about this.. I am shocked that I made this stupid mistake.

    sorry wasting everyone time. It was my prejudgement that forking caused this.

Re^2: weird kids process, why ?
by Qiang (Friar) on Jan 11, 2005 at 05:32 UTC
    because $target_usr_maildir is under $target_topdir, and $target_topdir is the user home dir.
    It should be set with the user ownership all the way down by doing
    /bin/chown -R $uid:$gid $target_topdir