No doubt I'm missing something obvious here, but look at this listing:
Code:
-rwxr-xr-x 1 matt matt 35 Nov 26 11:58 data*
-rwxr-xr-x 1 matt matt 16062 Nov 26 11:59 q1*
-rwxr-xr-x 1 matt matt 1192 Nov 26 11:59 q1.cpp*
-rwxr-xr-x 1 matt matt 1192 Nov 26 11:58 q1.cpp~*
[matt@hf-hall-stud-233-233-208 coursework]$
Now look at this one
Code:
-rw-r--r-- 1 matt matt 35 Nov 26 12:06 data
-rwxr-xr-x 1 matt matt 16062 Nov 26 11:59 q1*
-rwxr-xr-x 1 matt matt 1192 Nov 26 11:59 q1.cpp*
-rwxr-xr-x 1 matt matt 1192 Nov 26 11:58 q1.cpp~*
[matt@hf-hall-stud-233-233-208 coursework]$
You'll see 'data' is no longer executable - because it was deleted and rewritten by the program.
Why does everything copied off a FAT format floppy (like the above) get set executable? I can see the basic idea (ie. theres no way of telling if it's executable or not, so it assumes everything is for ease of use) but isn't that a bit of a security flaw having EVERYTHING executable by EVERYONE as default?
Ta.