PDA

View Full Version : Changing Permissions on NTFS Partitions.


Paul Komski
10-22-2002, 10:02 PM
There have been a number of unresolved posts recently relating to the inability to access files/folders, delete them, change attributes, etc. on NTFS (in both W2K & WinXP). Many Peeps will know this stuff anyway, but I have done a bit of homework and some experimenting in W2K and thought it might be of value to post a little summary, particularly since more and more "ordinary" users are now using NTFS with WinXP and since "ownership" and "advanced attributes" were not fully addressed in those posts.

The particular relevance of this is that if attributes have been set (even by oneself for that matter) to deny Read or Delete Permissions, for example, then only the owner of the file can change these advanced NTFS attributes (or can assign these permissions to other users).

If one is a member of administrators, it seems generally assumed that one has full control; but even administrators cannot change attributes that have denied to them by the owner; and that owner may even be the system! However an administrator can always take ownership and then change the attributes as required - even if the System is the owner.

In other words; check to see if you are the owner of the file/folder. If not, then (as a member of administrators) take ownership of the file/folder.

RClick on the File or Folder and Select Properties and go to the Security Tab.

From Advanced - Permissions Entries - (If you are not listed then Add yourself using the Add button).
From Advanced - Owner - (If you are not shown as the current owner at the top then Add yourself by highlighting and clicking Apply and Press OK twice).

Now that you are both the owner and an administrator check the advanced permissions for the file.

R-Click on the File/Folder and Select Properties and go to the Security Tab Again.

From Advanced - Permissions Entries - (Highlight your own entry) and then click View/Edit and uncheck any Deny Boxes and ensure all allow boxes are checked); the allow boxes will be greyed if the permissions are inherited.

If the permissions are inherited from a parent folder you may uncheck "Allow inheritable permissions ..." and select remove. You will then have to add your name once more and then click on View/Edit and ensure all permissions are allowed again).

Before you close Security, check that Full Control, Modify, Read&Execute, Read and Write are Allowed for your Name on the Security Tab.

Switch to the General Tab and change the Read-only or Hidden attributes as desired. If the Hidden Attribute is greyed then that file has been designated as a System File/Folder. Click Apply and OK and hopefully you will now be able to do what you want with the file or folder.

Take appropriate care if messing with system files in this way.

Two related issues are Windows File Protection, which can recreate System Protected Files on rebooting using SFC or by WMI Service (this may just be in XP) which via WIA interface tries to prevent system entries from being altered, and copies a backup which is restored by Winlogon.exe on rebooting. Such files may sometimes be deleted in SafeMode, but are recreated on reboot.

Incidentally, if such files can be copied onto a FAT partition any advanced NTFS attributes will be lost.

Please embellish or add-to the above, correct any inaccuracies and add any specific differences that apply to WinXP.

Sorry for the length of this and I hope this is the right forum.

;)

FrankSG
10-23-2002, 05:40 PM
I'm wondering if this applies to XP PRO only. I have XP Home and if I right click on a folder, there is no Security tab. Most of my folders have three tabs: A General tab with an Advanced button on it. I looked at it and there seems to be nothing there that would help. There is a Sharing tab which I believe is used if you want to share folders with others on the computer. On that one there is a box that can be checked that says "Make this folder Private". That box is grayed out and therefore can't be checked, so I'm assuming that my folders are not private--which is the way that I want it. The other tab is a Customize tab. I don't remember what it does, but there seems to be no help there.
It seems that Microsoft has went over-kill with their Read Only/Hidden attributes. I'll keep searching--maybe will come up with something

Paul Komski
10-23-2002, 07:11 PM
Taken from MSKB Q308421 (http://support.microsoft.com/search/preview.aspx?scid=kb;en-us;Q308421)

re: How to Take Ownership of a Folder (WinXP)

NOTE: You must be logged on to the computer using an account that has administrative privileges. If you are running Windows XP Home Edition, in order to have access to the Security tab, you must first start in Safe Mode and log on with an account that has Administrative rights.

If you are using Windows XP Professional, you must disable Simple File Sharing. By default, Windows XP Professional uses Simple File sharing when not joined to a domain. For additional information about how to do this, click the article number below to view the article in the Microsoft Knowledge Base:

See MSKB Q307874 (http://support.microsoft.com/search/preview.aspx?scid=kb;en-us;Q307874) for HOW TO: Disable Simplified Sharing and Password-Protect a Shared Folder in Windows XP

Hope this helps.

ps btw Taking ownership may also be necessary after "reinstalling over" to access the original MyDocuments folder for example.

FrankSG
10-24-2002, 02:46 PM
Starting it in Safe mode was the answer. I was then able to find the Security tab. It seemed that I did not have Full Control in everything. I changed it so that I have the full control and that solved my problem--I am now able to remove attributes or to add attributes as I choose. Having said that, I want to add that I may have unknowingly given some incorrect information on one of my earlier posts. I don't like to admit a mistake, but neither do I want to mislead anyone by something that I said earlier. In one of my posts that I had submitted before, I said that I couldn't remove or add attributes even when I got to a DOS prompt using the attrib command. I was wrong. It can be done using a DOS prompt by using the attrib command. The reason I couldn't do it before was because of the long file names that I was working with. By trial and error I have discovered that if you are working with a file that has a long file name--that is more characters that the 8/3 as was used in DOS, it is necessary to enclose the file name within quotation marks. I wasn't doing that which is the reason I was getting the messages that told me that the parameters were incorrect. I just wanted to clear that up since part of the reason I was having a problem was because of my mistake. Thanks for all the information that you gave me, Paul. It has cleared up a lot of things for me. Who knows--I might even to start likeing XP once I get the hang of it.
Frank SanGregory