Re: A Directory/Subdirectories Disappeared - which logfile to look for this kind of information?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On 14 May 2010 16:59, Tony Schreiner <schreian@xxxxxx> wrote:
> please bottom post, more at the bottom ...
>
> On May 14, 2010, at 11:50 AM, Wang, Mary Y wrote:
>
>> Thanks for the info.  There are only three of us who have the "root"
>> access and I guess the date/time is more important to us.  We are
>> also concerned that there might be a script did the "rmdir"
>> unintentionally.

If you have scripts deleting/moving or otherwise playing around with
the filesystems you might want to double check they are null safe for
variables that end up filenames...

example:

#!/bin/bash
MYFILE=$1
scp ${MYFILE} me@backup:
rm -fr ./${MYFILE}

Very basic but illustrates the point.... if the bash argument (in this
case) was invalid or missed out somehow the result could be the
removal of the entire PWD. This only gets worse with absolute paths
(oops bye bye /) and more complicated setups... when quickly scripting
it is also something that often gets overlooked....

James
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos


[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux