Re: Can I change group and permissions on the messages file?



Bit Twister <BitTwister@xxxxxxxxxxxxxxxx> wrote in
news:slrnehe7cr.u2.BitTwister@xxxxxxxxxxxxxxx:

Do not run FCx myself but you could create a script in
/etc/cron.daily to check/change it to whatever you like.

#********* start of my_kludge **************

_var_fn=/var/log/messages
_priv=$(/bin/stat -c %a $_var_fn)

if [ $_priv -ne 640 ] ; then
/bin/chmod 640 $_var_fn
fi

#************** end my_kludge *********************

I just put your script in an executable text file and tried it out, no
good, it will not work.

[root@ohmster scripts]# /root/scripts/change_messages_perms
/root/scripts/change_messages_perms: line 4: /bin/stat: No such file or
directory
/root/scripts/change_messages_perms: line 6: [: -ne: unary operator
expected
[root@ohmster scripts]#

Well it looked pretty cool anyway.
--
~Ohmster
theohmster at comcast dot net
Put "messageforohmster" in message body
to pass my spam filter.
.



Relevant Pages

  • Re: Bit Twister: Is this the dhclient-exit-hooks you were talking about?
    ... hodge-podge of stuff I need without any real script testing in place. ... What bit twister has shown me is really the kind of stuff I need but ... configurable, especially with the webmin interface, but I will not be ... Put "messageforohmster" in message body ...
    (alt.os.linux)
  • Re: simple script to read and parse mailbox
    ... Sorry to bovver you again here's script. ... the plain text message body of an emails in the testwwws users mailbox. ... # 'r+' opens the file for both reading and writing. ...
    (comp.lang.python)
  • simple script to read and output Mailbox body to file.
    ... Sorry to bovver you again here's script. ... the plain text message body of an emails in the testwwws users mailbox. ... # 'r+' opens the file for both reading and writing. ...
    (comp.lang.python)
  • Re: Plain text file on web server, questions please...
    ... you can use the index string function to find htt in $line in above ... and use a while loop to run through them looking for something to do. ... If such a search and add/replace script could be employed on the FAQ, ... Put "messageforohmster" in message body ...
    (alt.os.linux)
  • Re: Using KNode 0.7.2, Wondering What Else is Out There
    ... feed message body to a script and then pipe the output to the ... I hate the idea of hyphenation, ... The Usenet Improvement Project: http://blinkynet.net/comp/uip5.html ...
    (news.software.readers)