Windows File Permissions and Attributes

permissionswindows

I'm somewhat confused about the whole Windows file security scheme. I come from a unix background, so I don't fully understand the relationship between file permissions/security settings and the attributes; specifically read-only, that a file can have.

For example, if I log in as an administrator into my box and I have a file that allows full control for administrators, but has the read-only attribute set, that means I cannot write to that file? Is there any way besides removing the read-only attribute that I can write to files that I supposedly have full control over? If not, what's the advantage of having full control if you don't really have full control?

Best Answer

File permissions dictate what access you have to a file - just like it sounds. Full control lets you create, delete, append, change permissions, change attributes, etc.

Files and folders can have additional attributes, much like files on most *nix filesystems. "Hidden" comes to mind as an example of this on both platforms.

On Windows, some of the additional attributes include system, read-only, archive, encrypted, and compressed. When you have full control (or modify) you have the ability to change these attributes, but as you've discovered, a read-only file is read-only, even to someone with full control. While full control gives you the ability to change a file's attributes, it does not automatically override them, much like ls doesn't show the root user a hidden file by default on *nix.