Fog Creek Software
Discussion Board




Excutable bit always set on Windows files

Why, oh why, does windows seem to always set the executable bit on files that are not a Windows executable nor batch (.bat) type file?

I know I'm being anal about this, but what would be the detriment to doing thing properly?

Its like you can tune a piano... but you cannot tune a fish.

Same difference.

hoser
Thursday, August 12, 2004

Umm, windows doesn't HAVE an executable bit. It's all done via file extension.

Are you looking at the Windows drive from a unix box, maybe (samba share)? If so, you need to look at the docs on your unix box to see how to control this behavior.

If not, umm, more information please?

Chris Tavares
Thursday, August 12, 2004

Well, when I look at permissions from the "EXPLORER.EXE" file, there are fields:

Full Control
Modify
Read & Execute
Read
Write

Read & Execute is always set by default.

Also, since we're on the topic, how is Modify different that Write.  I guess Write must mean that you can create the file as well as modify it?  But wouldn't that necessarily be a directory permission?

What does Full Control imply beyond Read/Write/Execute?

Thanks,

hoser
Thursday, August 12, 2004

Just FYI,

When using a Samba share, the situation is easily corrected by using the option:

-o fmask=0666

Which supresses the executable bit.  And since any possible executable would like be a windows executable, and you're mounting onto a Unix box, this would be a good thing to do.

But, I'm not doing that...  Its a windows only environment I'm dealing with.

hoser
Thursday, August 12, 2004

It appears you are viewing the sharing permissions, and not the file attributes the first reply mentioned.  I'm not clear as to whether you're setting the permissions for network shares or IIS.

I believe the difference between modify and write is whether you can create new files, or just change existing ones.

Full control is just a fast way to set them all.

As to why the defaults are the way they are, that is best left to the philosophers (although someone may try to start a flame war about it too).

Walt
Thursday, August 12, 2004

<What does Full Control imply beyond Read/Write/Execute?>

The right to change permissions.

John
Thursday, August 12, 2004

Q: How is Modify different that Write?
A: It allows you to delete the file.  Note this isn't the only way to get delete permission on a file, full control or delete subfolders and files on the directory holding the file also grants this permission.

Q: What does Full Control imply beyond Read/Write/Execute?
A: As John said change permission. But also the right to take ownership and delete the file/folder.

Anonymous
Thursday, August 12, 2004

Contrary to Walt, it seems you are talking about the Access Control entries (Security tab under Properties), not the sharing permissions.

These are usually inherited from the containing directory. So you can change the default by finding the appropriate parent directory, open the Properties dialog, select the Security tab, click "Advanced..." and setting some new defaults.

Note this involves setting and clearing some check boxes and understanding some cryptic help dialogs, which just made my eyes glaze over.

Nonetheless, I believe you can do what you want by this means.

(PS: The above is for Windows 2000. The user interface might be a bit different for XP.)

Ian
Thursday, August 12, 2004

Executable as in launchable?  Meaning click on a word doc and it launches word, right?

Obviously only exes (and old com files) are truely executable; the rest is all content that the platform knows an executable can eat.

i like i
Friday, August 13, 2004

*  Recent Topics

*  Fog Creek Home