Access Denied

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
speedmetal
Posts: 2
Joined: 28 Apr 2010 04:17

Access Denied

Post by speedmetal »

I'm running XYplorer as administrator on Win7. I'm getting "Access Denied" trying to view the contents of c:\Documents and Settings. What do I need to know?

Thanks!

nas8e9
Posts: 2232
Joined: 21 Jun 2008 14:50

Re: Access Denied

Post by nas8e9 »

speedmetal wrote:I'm running XYplorer as administrator on Win7. I'm getting "Access Denied" trying to view the contents of c:\Documents and Settings. What do I need to know?

Thanks!
C:\Documents and Settings on Windows 7 is a shortcut (technical term: junction) pointing to C:\Users; it's there to provide legacy compatibility. The "funny" thing is that appending a path name (like C:\Documents and Settings\user\My Documents) works (the contents of the folder are shown) but trying to list the contents of C:\Documents and Settings *itself* does not.

In general, just ignore the folder and go straight to C:\Users.

speedmetal
Posts: 2
Joined: 28 Apr 2010 04:17

Re: Access Denied

Post by speedmetal »

I did not know that. Thanks :)

admin
Site Admin
Posts: 64841
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Access Denied

Post by admin »

nas8e9 wrote:
speedmetal wrote:I'm running XYplorer as administrator on Win7. I'm getting "Access Denied" trying to view the contents of c:\Documents and Settings. What do I need to know?

Thanks!
C:\Documents and Settings on Windows 7 is a shortcut (technical term: junction) pointing to C:\Users; it's there to provide legacy compatibility. The "funny" thing is that appending a path name (like C:\Documents and Settings\user\My Documents) works (the contents of the folder are shown) but trying to list the contents of C:\Documents and Settings *itself* does not.

In general, just ignore the folder and go straight to C:\Users.
Since I still cannot test this at home, I pass on a question I received by email:
I am running MS Vista Ultimate 64 bit. XYPlorer does not show any files under "My Music", "My Pictures" or "My Videos" folders. It simply says "Access is denied". These are default MS folders, and are not protected or hidden.
Is this a similar thing?

nas8e9
Posts: 2232
Joined: 21 Jun 2008 14:50

Re: Access Denied

Post by nas8e9 »

admin wrote:Since I still cannot test this at home, I pass on a question I received by email:
I am running MS Vista Ultimate 64 bit. XYPlorer does not show any files under "My Music", "My Pictures" or "My Videos" folders. It simply says "Access is denied". These are default MS folders, and are not protected or hidden.
Is this a similar thing?
Unfortunately I can reproduce this with 9.00.0207 on both Windows Vista x86 SP2 as well as Windows 7 x64 RTM. The inaccessible folders' shortcut menu has a Junction Target; selecting Go to Junction Target goes to the corresponding Vista folder (C:\Users\username\Music, etc.). It seems XYplorer does indeed use \Documents and Settings, either directly or through an (on Vista and later) obsolete API.

To be clear, this concerns the My Documents node in XYplorer's tree (second node from the top below Computer). More or less interesting that apparently not many forum members use that node on later Windows versions (at least not pointing to the default folders) or there'd been forum bug reports by now...

admin
Site Admin
Posts: 64841
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Access Denied

Post by admin »

nas8e9 wrote:
admin wrote:Since I still cannot test this at home, I pass on a question I received by email:
I am running MS Vista Ultimate 64 bit. XYPlorer does not show any files under "My Music", "My Pictures" or "My Videos" folders. It simply says "Access is denied". These are default MS folders, and are not protected or hidden.
Is this a similar thing?
Unfortunately I can reproduce this with 9.00.0207 on both Windows Vista x86 SP2 as well as Windows 7 x64 RTM. The inaccessible folders' shortcut menu has a Junction Target; selecting Go to Junction Target goes to the corresponding Vista folder (C:\Users\username\Music, etc.). It seems XYplorer does indeed use \Documents and Settings, either directly or through an (on Vista and later) obsolete API.

To be clear, this concerns the My Documents node in XYplorer's tree (second node from the top below Computer). More or less interesting that apparently not many forum members use that node on later Windows versions (at least not pointing to the default folders) or there'd been forum bug reports by now...
Is this "Access Denied" a system message or from XYplorer? Do you have a screenshot?

nas8e9
Posts: 2232
Joined: 21 Jun 2008 14:50

Re: Access Denied

Post by nas8e9 »

admin wrote:Is this "Access Denied" a system message or from XYplorer? Do you have a screenshot?
It's a message from XYplorer:

admin
Site Admin
Posts: 64841
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Access Denied

Post by admin »

nas8e9 wrote:
admin wrote:Is this "Access Denied" a system message or from XYplorer? Do you have a screenshot?
It's a message from XYplorer:
Good, that's what I had hoped. This leaves me a chance to fix it. :)

Thanks a lot!

admin
Site Admin
Posts: 64841
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Access Denied

Post by admin »

I researched this and found that XY's behavior is technically correct. These folders in Vista/7 are in fact junctions with the purpose to silently redirect programs that access them to their Windows Vista/7 equivalent. So they provide backward compatibility to XP. However, these folders are hidden and not meant to be browsed by the user. Instead you are supposed to browse the real locations, which e.g. in case of "My Music" would be "C:\Users\$USER$\Music".

Quote from the web:
The reason you get an Access Denied on these junctions has nothing to do
with the fact that they are junctions. These junctions have a specific
Access Denied access control entry (ACE)for the Everyone group on their
discretionary access control list (DACL).
But is it true that you can browse them in WE?

PeterH
Posts: 2826
Joined: 21 Nov 2005 20:39
Location: DE W11Pro 24H2, 1920*1200*100% 3840*2160*150%

Re: Access Denied

Post by PeterH »

:?:
admin wrote:These folders in Vista/7 are in fact junctions with the purpose to silently redirect programs that access them to their Windows Vista/7 equivalent.
I don't understand - Programs can access them, but XY can't?
And: what's the sense of "My Documents", if I can't access them?

Sounds very strange to me...

nas8e9
Posts: 2232
Joined: 21 Jun 2008 14:50

Re: Access Denied

Post by nas8e9 »

admin wrote:I researched this and found that XY's behavior is technically correct. These folders in Vista/7 are in fact junctions with the purpose to silently redirect programs that access them to their Windows Vista/7 equivalent. So they provide backward compatibility to XP. However, these folders are hidden and not meant to be browsed by the user. Instead you are supposed to browse the real locations, which e.g. in case of "My Music" would be "C:\Users\$USER$\Music".

Quote from the web:
The reason you get an Access Denied on these junctions has nothing to do
with the fact that they are junctions. These junctions have a specific
Access Denied access control entry (ACE)for the Everyone group on their
discretionary access control list (DACL).
But is it true that you can browse them in WE?
The difference in behaviour between XYplorer and Windows Explorer seems to be that WE *can* use C:\Documents and Settings\username\My Documents to browse C:\Users\username\Documents while XYplorer doesn't get past C:\Documents and Settings. WE can't, like XYplorer, browse C:\Documents and Settings itself. Please see the attached screenshots.

nas8e9
Posts: 2232
Joined: 21 Jun 2008 14:50

Re: Access Denied

Post by nas8e9 »

In case it's of use: Windows 7 defines the problematic folders in the registry as shown in the screenshot, with %USERPROFILE% generally being set to C:\Users\username (without a trailing slash).

nas8e9
Posts: 2232
Joined: 21 Jun 2008 14:50

Re: Access Denied

Post by nas8e9 »

PeterH wrote:I don't understand - Programs can access them, but XY can't?
And: what's the sense of "My Documents", if I can't access them?

Sounds very strange to me...
Legacy compatibility *is* apparently very messy. :)

The problem as I understand it, is that some badly-written programs always assume that folders like My Documents and My Pictures hang off C:\Documents and Settings\username; in other words, they have the location of shell folders hard-coded instead of, as they should, look up the location of these shell folders through the registry and/or some API (my MSDN skills aren't that great...).

PeterH
Posts: 2826
Joined: 21 Nov 2005 20:39
Location: DE W11Pro 24H2, 1920*1200*100% 3840*2160*150%

Re: Access Denied

Post by PeterH »

PeterH wrote::?:
admin wrote:These folders in Vista/7 are in fact junctions with the purpose to silently redirect programs that access them to their Windows Vista/7 equivalent.
I don't understand - Programs can access them, but XY can't?
And: what's the sense of "My Documents", if I can't access them?

Sounds very strange to me...
Hey - 2 different cases? My comment was to the picture of nas8e9 showing "Access is denied" to "My Documents\My Music".
But at start of topic, and in nas8e9's later posts you refer to "c:\Documents and Settings\username\My Documents" - I think this is quite different?

nas8e9
Posts: 2232
Joined: 21 Jun 2008 14:50

Re: Access Denied

Post by nas8e9 »

PeterH wrote:
PeterH wrote::?:
admin wrote:These folders in Vista/7 are in fact junctions with the purpose to silently redirect programs that access them to their Windows Vista/7 equivalent.
I don't understand - Programs can access them, but XY can't?
And: what's the sense of "My Documents", if I can't access them?

Sounds very strange to me...
Hey - 2 different cases? My comment was to the picture of nas8e9 showing "Access is denied" to "My Documents\My Music".
But at start of topic, and in nas8e9's later posts you refer to "c:\Documents and Settings\username\My Documents" - I think this is quite different?
The problem is that C:\Documents and Settings is purely there as a pointer to what folders and files used to lie beneath in the old Windows 2000/XP folder structure. Windows Explorer does manage to access shell folders through this legacy help (i.e. C:\Documents and Settings\username\My Documents, etc.) whereas XYplorer gets stuck in C:\Documents and Settings itself, which isn't a real folder but merely a junction with a restrictive ACL.

XYplorer actually can *see* the folders beneath C:\Documents and Settings when using Autocomplete in the address bar, but it can't navigate through and beyond C:\Documents and Settings.

Post Reply