When it comes to any server or network connected to the internet, security from malicious files and hack attempts is a big concern for any administrator. Linux provides its own firewall from the early releases itself. The current iptables firewall maintained by the netfilter team is advancing to more powerful security and network management tool [...]
Archive for March, 2008
How to keep files safe from accidental overwriting?
Published March 6th, 2008 in Script, Security, Shell and Shell scripting. 0 CommentsThis happens many times. You accidentally use redirecting output using > operator.or example you type a command:
ls -l *.c > output.txt
If file output.txt exists and is a regular file it will be overwritten. Just imagine as root user, typing somecommand > /etc/passwd instead of somecommand < /etc/passwd. Or you used > when they meant [...]
You need to use chattr command, which changes the file attributes on a Linux second extended file system. The chattr command supports various attributes. A file with the i attribute cannot be modified: it cannot be deleted or renamed, no link can be created to this file and no data can be written to the [...]
Recent Comments