Friday, April 11, 2008

How to take ownership of a file or folder in Windows XP

How to take ownership of a file or folder in Windows XP



INTRODUCTION
This article describes how to take ownership of a file or a folder where you have been denied access.

If you must access a file or a folder that you do not have access to, you must take ownership of that file or folder. When you do this, you replace the security permissions to have access.

MORE INFORMATION
How to take ownership of a folder
Note You must be logged on to the computer with an account that has administrative credentials. If you are running Microsoft Windows XP Home Edition, you must start the computer in safe mode, and then log on with an account that has Administrative rights to have access to the Security tab.

If you are using Windows XP Professional, you must disable Simple File Sharing. By default, Windows XP Professional uses Simple File sharing when it is not joined to a domain.

By default, simple file sharing is enabled on a Microsoft Windows XP-based computer if the computer is not a member of a domain. With simple file sharing, you can share folders with everyone on your workgroup or network and make folders in your user profile private. However, if simple file sharing is enabled, you cannot prevent specific users and groups from accessing your shared folders. If you turn off simple file sharing, you can permit specific users and groups to access a shared folder. Those users must be logged on with the credentials of user accounts that you have granted access to your shared folder.

If simple file sharing is enabled, you see the simple file sharing user interface appears instead of the Security and Sharing tabs. By default, this new user interface is implemented in Windows XP Home Edition and in Microsoft Windows XP Professional if you are working in a workgroup. If you turn off simple file sharing, the classic Security and Sharing tabs appear, and you can specify which users and groups have access to shared folders on your computer.

Note To allow for specific users to access the share folder after the simple file sharing is disabled, you should configure both the NTFS permissions on the Security tab and the share permission on the Sharing tab of the share folder. NTFS permissions can only be set on a partition using NTFS file system. If you remove the Every Group from the NTFS permission, you cannot access the share folder over the network.



To take ownership of a folder, follow these steps: 1. Right-click the folder that you want to take ownership of, and then click Properties.
2. Click the Security tab, and then click OK on the Security message (if one appears).
3. Click Advanced, and then click the Owner tab.
4. In the Name list, click your user name, or click Administrator if you are logged in as Administrator, or click the Administrators group. If you want to take ownership of the contents of that folder, select the Replace owner on subcontainers and objects check box.
5. Click OK, and then click Yes when you receive the following message:
You do not have permission to read the contents of directory folder name. Do you want to replace the directory permissions with permissions granting you Full Control?

All permissions will be replaced if you press Yes.
Note folder name is the name of the folder that you want to take ownership of.
6. Click OK, and then reapply the permissions and security settings that you want for the folder and its contents.


How to take ownership of a file
Note You must be logged on to the computer with an account that has administrative credentials.

To take ownership of a file, follow these steps: 1. Right-click the file that you want to take ownership of, and then click Properties.
2. Click the Security tab, and then click OK on the Security message (if one appears).
3. Click Advanced, and then click the Owner tab.
4. In the Name list, click Administrator, or click the Administrators group, and then click OK.

The administrator or the Administrators group now owns the file. To change the permissions on the files and folders under this folder, go to step 5.
5. Click Add.
6. In the Enter the object names to select (examples) list, type the user or group account that you want to give access to the file. For example, type Administrator.
7. Click OK.
8. In the Group or user names list, click the account that you want, and then select the check boxes of the permissions that you want to assign that user.
9. When you are finished assigning permissions, click OK.


Interaction of File and Folder Security on NTFS Volumes

SUMMARY
After you set permissions on specific files, users and groups sometimes have more rights to the files than expected. This is because NTFS security applies both at the file level and at the folder level. NTFS permissions granted at both levels are cumulative.

For example, you have a folder called Reports and you grant the group Sales full control, and the group Marketing read access to the folder. You then put a file called README into the folder, and explicitly set the rights to the Everyone group as Read. Members of the Marketing group will be able to read, but not delete the file README. Members of the Sales group however, will be able to both read and delete the file, because they have the full control right at the folder level. To prevent the file from being deleted by either group you would need to change the Sales group access at the folder level.



APPLIES TO
• Microsoft Windows NT Advanced Server 3.1
• Microsoft Windows NT Workstation 3.1
• Microsoft Windows NT Workstation 3.5
• Microsoft Windows NT Workstation 3.51
• Microsoft Windows NT Workstation 4.0 Developer Edition
• Microsoft Windows NT Server 3.5
• Microsoft Windows NT Server 3.51
• Microsoft Windows NT Server 4.0 Standard Edition







Website counter