in reply to maintaining owner id

Since the user is the owner of the folder, can't they just
system("chown YOU /path1/path2/theDir");
after the folder is created.

Replies are listed 'Best First'.
Re: Re: maintaining owner id
by bobn (Chaplain) on Aug 08, 2003 at 21:02 UTC

    chown typically doesn't work if you are not root. Otherwise, you could make something setuid, then chown it to some other user's ID and create all kinds of mischief.

    --Bob Niederman, http://bob-n.com
Re: Re: maintaining owner id
by Anonymous Monk on Aug 08, 2003 at 20:54 UTC
    I try to avoid calling the system commands. Beside, if I want to expand my script to create other folders or files, I have to chown those also. How about setting those built-in variables like $< and $> ? I'm playing with them but have no luck yet..