Cannot create file "C:\Program ..display.txt". Access is denied

Windows 7 has implemented addition security mechanism to prevent accidental or intentional file or folder modification by not allowing users other then owner of file or folder to access it. Hence incase if you need to access, modify or delete such files or folder you need to take ownership first then assign rights or permission to respective users.

Take Ownership in Windows 7

1. Locate the file or folder on which you want to take ownership in windows explorer.

2. Right click on file or folder and select “Properties” from Context Menu.

3. Click on Security tab.

windows 7 files

4. Click on “Advance”.

5. Now click on Owner tab in Advance Security Settings for User windows.

owner tab

6. Click on Edit Button and select user from given Change Owner to list if user or group is not in given list then click on other users or groups. Enter name of user/group and click ok.

other users

7. Now select User/group and click apply and ok. (Check “Replace owner on subcontainers and objects” if you have files and folder within selected folder)

8. Click ok when Windows Security Prompt is displayed

9. Now Owner name must have changed.

10. Now click Ok to exist from Properties windows

Granting Permissions to that file/folder

1. Locate the file or folder on which you want to take ownership in windows explorer

2. Right click on file or folder and select “Properties” from Context Menu

3. Click on Edit button in Properties windows Click ok to confirm UAC elevation request.

4. Select user/group from permission windows or click add to add other user or group.

5. Now under Permission section check the rights which you want to grant i.e check “Full Control” under the “Allow” column to assign full access rights control permissions to Administrators group.

change permissions

6. Click Ok for changes to take effect and click ok final ok to exit from Properties window.

Now you can access files of folder in windows 7 with full permissions and take full control.