[Cialug] Can someone translate for me?

Nicolai nicolai-cialug at chocolatine.org
Tue May 3 11:45:16 CDT 2011


On Tue, May 03, 2011 at 08:15:15AM -0500, Rob Miller wrote:
> 1.  chmod 777

Not only is that a bad idea as others have said, but even 700 is
normally unnecessary.

Executable files (binaries & scripts) don't need to be readable.  Try
this yourself -- cp /bin/ls to /usr/local/bin and chmod 0111
/usr/local/bin/ls.  Do /usr/local/bin/ls ~ to list your home directory
contents... it works.

You can do this with a simple shell script as well.  They don't even
need to be readable [1].

Once you learn the octal numbers in file permissions, it's a lot faster
and more reliable than doing ie chmod go-w.

man chmod

Nicolai
1. Unless the partition is mounted noexec and you call the shell script
like /bin/sh script.sh.  And it doesn't hurt to make scripts readable
anyway.


More information about the Cialug mailing list