Bill Platt wrote:
>
> Hello Everyone,
>
> I am sure that my pure ignorance is starting to show. Visual
> Basic I do decent with. At times, I feel like I am really
> starting to pick up on this perl stuff, then at other times,
> like right now, I feel like someone needs to blow in my ear
> to give me a refill.
>
> I am stuck on chmod inside a script now. I have seen several
> references telling me to do it:
>
> chmod (0644, "/etc/aliases");
>
> OR
>
> chmod 0644, "/etc/aliases";
Either should work. Why aren't you checking the error status ?
chmod 0644, "/etc/aliases" or die "chmod /etc/aliases error: $!\n";
Maybe a permissions problem ?
> I have tried both and several variations thereof. But, I am
> still having problems. I am writing to the /var/aliases file
> and if I have permissions set to 666, I can write to it from
> the script. But, for the autoreply.pl to access it and for
> the newaliases command to access it, it needs to be set at
> 644.
>
> So, I thought, cool. I will just chmod in the script to
> satisfy both requirements, but I cannot get the chmod to
> run from within the script at all.
>
> I am on Perl 5 if that is of any consequence.
>
> Thank you for any aid you might offer.
>
> P.S. I read the security faq. Thanks for pointing that out.
--
,-/- __ _ _ $Bill Luebkert ICQ=14439852
(_/ / ) // // DBE Collectibles Mailto:[EMAIL PROTECTED]
/ ) /--< o // // http://dbecoll.webjump.com/ (Free site for Perl)
-/-' /___/_<_</_</_ Castle of Medieval Myth & Magic http://www.todbe.com/
_______________________________________________
Perl-Unix-Users mailing list. To unsubscribe go to
http://listserv.ActiveState.com/mailman/subscribe/perl-unix-users