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



On 2006-09-25, Bit Twister wrote:
On Sun, 24 Sep 2006 21:44:48 -0400, Chris F.A. Johnson wrote:

Do NOT use the full path to a system executable (use stat rather
than /bin/stat; the same for chmod). Such files will be in your
PATH (unless you've screwed it up), but not all systems have them
in the same place; stat is not a standard command, so FC3 could
place it somewhere else.

How true. But, then the script would/should have something
like

#!/bin/bash or /bin/sh

Not necessary.

PATH=/s/s/s:/s/s//ss:/fasfaf
export PATH

Not necessary; the PATH should already be set.

code here


I did check that /bin/stat was on FC5 but like you said, was not a
standard command.

Some security suggestions are to use full path on commands to help
prevent script in the middle of path problems. :)
http://searchopensource.techtarget.com/tip/0,289483,sid39_gci1216976,00.html

That page has generally good advice, but any danger from not using
full paths probably means your system is already insecure, and
that little precaution is not going to do much to help the
situation.

There should be no untrusted directories in your PATH. If there
are, remove them. If the standard system directories, /bin,
/usr/bin, etc., cannot be trusted you have much bigger problems.

Downside is a maintenance headache.


--
Chris F.A. Johnson, author | <http://cfaj.freeshell.org>
Shell Scripting Recipes: | My code in this post, if any,
A Problem-Solution Approach | is released under the
2005, Apress | GNU General Public Licence
.



Relevant Pages