Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Access Denied when opening .txt file

Posted on 2018-01-12
15
High Priority
?
59 Views
Last Modified: 2018-01-13
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
0
Comment
Question by:APD Toronto
  • 6
  • 5
  • 2
  • +2
15 Comments
 
LVL 7

Expert Comment

by: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
0
 

Author Comment

by:APD Toronto
OK, This is even stranger. When I use the UNC, I don't even see all my files
Files.JPG
0
 
LVL 7

Expert Comment

by:Yves Accad
Can you try hitting F5 on the UNC accessed foler? Any change?
0
Managing Security & Risk at the Speed of Business

Gartner Research VP, Neil McDonald & AlgoSec CTO, Prof. Avishai Wool, discuss the business-driven approach to automated security policy management, its benefits and how to align security policy management with business processes to address today's security challenges.

 

Author Comment

by:APD Toronto
No change
0
 
LVL 7

Expert Comment

by: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
0
 

Author Comment

by:APD Toronto
OK, no idea how, but that listed the files equally.

Still Access deenied.
0
 
LVL 7

Expert Comment

by: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?
0
 

Author Comment

by:APD Toronto
Opening the file through Notepad as an admin, then modifying it works.

Using File Explorer does not.

How come?
0
 
LVL 7

Assisted Solution

by:Yves Accad
Yves Accad earned 1500 total points
OK so that verifies that we're dealing with a UAC issue. You don't have access to c:\inetpub although the Administrators group has access to the folder and you are part of the Administrators group because UAC takes precedence.

You can try disabling UAC or set permission using an elevated command prompt ( right-click command prompt and run as administrator)
icacls %systemdrive%\inetpub /grant  %userdomain%\%username%:(OI)(CI)(F) /grant %userdomain%\%username%:F

This will assign your user full control on inetpub.
0
 

Author Comment

by:APD Toronto
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

0
 
LVL 38

Expert Comment

by:Shaun Vermaak
Do you get Accress Denied when you save the file or when you open it?
0
 
LVL 24

Expert Comment

by: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!
0
 
LVL 12

Expert Comment

by: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.
0
 
LVL 24

Accepted Solution

by:
Eirman earned 1500 total points
You're on the wrong track.
Maybe so - Still there is no harm in trying Unlocker (It lists any locking 'handles).

(Perhaps re-booting to safe mode would be worth trying).
0
 

Author Closing Comment

by:APD Toronto
Changing Permissions in Safe Mode did it,
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Join & Write a Comment

Your business may be under attack from a silent enemy that is hard to detect. It works stealthily in the shadows to access and exploit your critical business information, sensitive confidential data and intellectual property, for commercial gain. T…
With more and more companies allowing their employees to work remotely, it begs the question: What are some of the security risks involved with remote employees and what actions should we take to secure them?
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

564 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question