Avatar of APD Toronto
APD Toronto
Flag for Canada asked on

Access Denied when opening .txt file

Hi Experts,

When I try to open a text file, I get Access Denied.

When I tried to give full permissions, I get

An error occurred while applying security information to:

C:/inetpub/wwwroot\domain.com\downloads\myfile.txt

Access is denied.

I have also verified that I am that I am the owner of the  file.  I am also logged in as an admin.

I'm using Win 7 Pro x64

Any help will be appreciated
Windows OSWindows 7Security

Avatar of undefined
Last Comment
APD Toronto

8/22/2022 - Mon
Yves Accad

From your description it sounds like it may be a UAC issue. As a test can you edit the file if you access it using the UNC?

example:   \\Yourservername\C$\inetpub/wwwroot\domain.com\downloads\myfile.txt
APD Toronto

ASKER
OK, This is even stranger. When I use the UNC, I don't even see all my files
Files.JPG
Yves Accad

Can you try hitting F5 on the UNC accessed foler? Any change?
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes
APD Toronto

ASKER
No change
Yves Accad

Just to make absolutely sure we're hitting the same folder can you use this UNC instead of what is in the screenshot?

\\Optiplex\C$\inetpub\wwwroot\CRM_COR\attachments\client-1\prog-11
APD Toronto

ASKER
OK, no idea how, but that listed the files equally.

Still Access deenied.
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Yves Accad

One more test please. Right-click notepad > Run as administrator. Then go to the file in question and try to open it, modify and save it. Does it work?
APD Toronto

ASKER
Opening the file through Notepad as an admin, then modifying it works.

Using File Explorer does not.

How come?
SOLUTION
Yves Accad

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
APD Toronto

ASKER
When I set this PC 10 years back, I chose "Nataliia & aleks" as the main Admin, then I changed it to APoposki, and now I get...

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Windows\system32>icacls %systemdrive%\inetpub /grant  %userdomain%\%username%:(OI)(CI)(F) /grant %userdomain%\%username%:F
Invalid parameter "OPTIPLEX\Nataliia"
'aleks:' is not recognized as an internal or external command,
operable program or batch file.
The filename, directory name, or volume label syntax is incorrect.

C:\Windows\system32>icacls %systemdrive%\inetpub /grant  %userdomain%\apoposki:(OI)(CI)(F) /grant %userdomain%\%username%:F
Invalid parameter "OPTIPLEX\Nataliia"
The filename, directory name, or volume label syntax is incorrect.

C:\Windows\system32>icacls %systemdrive%\inetpub /grant  %userdomain%\"apoposki":(OI)(CI)(F) /grant %userdomain%\%username%:F
Invalid parameter "OPTIPLEX"apoposki:(OI)(CI)(F) /grant OPTIPLEX\Nataliia "
The filename, directory name, or volume label syntax is incorrect.

C:\Windows\system32>icacls %systemdrive%\inetpub /grant  %userdomain%\"Nataliia & aleks":(OI)(CI)(F) /grant %userdomain%\%username%:F
Invalid parameter "OPTIPLEX"Nataliia"
The filename, directory name, or volume label syntax is incorrect.

C:\Windows\system32>

Open in new window

This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
Shaun Vermaak

Do you get Accress Denied when you save the file or when you open it?
Eirman

Try Unlocker.
It's the most popular file unlocking software out there.

This tip applies to ALL software that you may ever install ...

Take your time installing, so you don't install unwanted toolbars etc.
Don't blindly click YES/OK/Standard Installation - Read before you click!
Andrew Leniart

@Eirman,

You're on the wrong track. Unlocker will do nothing to solve an access denied message. The file is not "Locked" - This is clearly a permissions issue and Yves has already proven that.
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
ASKER CERTIFIED SOLUTION
Eirman

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
APD Toronto

ASKER
Changing Permissions in Safe Mode did it,