[K12OSN] chown script help needed (word of caution)

Les Mikesell les at futuresource.com
Mon Sep 5 03:58:28 UTC 2005


On Sun, 2005-09-04 at 22:27, John Baillie wrote:

> Mostly true but
> 
> mkdir "bad /"
> 
> will create it, not to mention the webmin bulk user script.

# mkdir "bad /"
# ls -l
total 4
drwxr-xr-x  2 root root 4096 Sep  4 22:34 bad

No / in the name, just a trailing space.  There are ways
to get a / displayed at the end of a directory and subsequent
manipulations on a shell command line will result in
breaking at the space.  Spaces and newlines are both
allowed in filenames and both can cause trouble with
shell scripts.

-- 
  Les Mikesell
   les at futuresource.com





More information about the K12OSN mailing list