cant open file - access denied


  1. Posts : 2
    W10
       #1

    cant open file - access denied


    Hello. Today I did a clean install of W10. Then connected my External HDD and tryed to play some music, but some problem occured (I dont know why). All data stored on this HDD cannot be opened due to missing ownership. So I used script from this website (classic method in OS doesnt work). Everything is fine, but some files getting error. After digging deeper I found out that those files have target like this "\\?\A:**********************" and this causes the problem. They cannot be opened neither set ownership or copied etc.
    See screenshot. Can anybody help me with this?
    cant open file - access denied-bez-nazvu.jpg
      My Computer


  2. Posts : 43,010
    Win 10 Pro (22H2) (2nd PC is 22H2)
       #2

    For one thing the path length seems excessive- 261 characters?

    Windows: The File Name or Destination Path You Specified is Not Valid or Too Long | IT@Cornell
      My Computers


  3. Posts : 4,804
    Windows 11 Pro 64 Bit 22H2
       #3

    The other thing is the screenshot you posted the drive letter path to the file is \\?\A: ?
    Press the Windows key +X and choose Disk Management. In the lower pane, what Drive Letter is the External USB HDD? Is it viewable?
    Is the drive healthy? Can you access the drive in File (Windows) Explorer?
      My Computer


  4. Posts : 2
    W10
    Thread Starter
       #4

    spunk said:
    The other thing is the screenshot you posted the drive letter path to the file is \\?\A: ?
    Press the Windows key +X and choose Disk Management. In the lower pane, what Drive Letter is the External USB HDD? Is it viewable?
    Is the drive healthy? Can you access the drive in File (Windows) Explorer?
    I changed the letter by myself instead of "D:":)
    It is normally accessible.
      My Computer


  5. Posts : 43,010
    Win 10 Pro (22H2) (2nd PC is 22H2)
       #5

    Thank you for your reply?
      My Computers


  6. Posts : 8,111
    windows 10
       #6

    If its drive a a floppy disk it wont have same file length as drive d
      My Computer


  7. Posts : 2,918
    Windows 10 Pro for the Bro
       #7

    Rename one of the very long filenames to something like: a.mp3

    Like dalchina said, I think it's a very long filename. That happens when a filename (and/or a combination of a long folder structure name) ...is too long.
      My Computer


  8. Posts : 778
    Windows 7
       #8

    You'll need a different tool than takeown to handle those long paths.

    1. Copy this PowerShell script to Takeown_Over260.ps1
    Code:
    $FolderPath = (Get-Item $args[0]).FullName
    
    # https://rakhesh.com/windows/use-setacl-if-you-want-to-overcome-the-260-character-limit-when-setting-acls-2/
    
    $SetACL = "$PSScriptRoot\SetACL.exe"
    $UserName = [System.Security.Principal.WindowsIdentity]::GetCurrent().Name
    
    & $SetACL -on $FolderPath -ot file -actn setowner -ownr "n:$UserName" -rec cont_obj
    & $SetACL -on $FolderPath -ot file -actn setprot -op "dacl:np;sacl:np" -rec cont_obj

    2. Download SetACL.exe for Administrators from Helge Klein's website.

    3. Extract the ZIP file, and move SetACL.exe into the same folder as the PS script. It doesn't matter which one from the 32-bit or 64-bit versions of SetACL.exe.

    4. Run the script as Administrator, and provide your top folder's path:
    Code:
    C:\Users\GARLIN\Downloads>powershell -nop -ep bypass -f Takeown_Over260.ps1 C:\Users\GARLIN\Downloads\AUDIO
    Processing ACL of: <\\?\C:\Users\GARLIN\Downloads\AUDIO>
    Processing ACL of: <\\?\C:\Users\GARLIN\Downloads\AUDIO\MuSic>
    Processing ACL of: <\\?\C:\Users\GARLIN\Downloads\AUDIO\MuSic\ARMIN_VAN_BUUREN>
    Processing ACL of: <\\?\C:\Users\GARLIN\Downloads\AUDIO\MuSic\ARMIN_VAN_BUUREN\Armin_van_Buuren_-_A_State_of_Trance_Episode_550.2_Live_from_Expocenter_in_Moscow-Russia-(DI.FM)-07-03-2012-PS>
    Processing ACL of: <\\?\C:\Users\GARLIN\Downloads\AUDIO\MuSic\ARMIN_VAN_BUUREN\Armin_van_Buuren_-_A_State_of_Trance_Episode_550.2_Live_from_Expocenter_in_Moscow-Russia-(DI.FM)-07-03-2012-PS\00-armin_van_buuren_-_a_state_of_trance_episode_550.2_live_from_expocenter_in_moscow-russia-(di.fm)-07-03-2012-ps.cue>
    Processing ACL of: <\\?\C:\Users\GARLIN\Downloads\AUDIO\MuSic\ARMIN_VAN_BUUREN\Armin_van_Buuren_-_A_State_of_Trance_Episode_550.2_Live_from_Expocenter_in_Moscow-Russia-(DI.FM)-07-03-2012-PS\00-armin_van_buuren_-_a_state_of_trance_episode_550.2_live_from_expocenter_in_moscow-russia-(di.fm)-07-03-2012-ps.mp3>
    Processing ACL of: <\\?\C:\Users\GARLIN\Downloads\AUDIO\MuSic\ARMIN_VAN_BUUREN\Armin_van_Buuren_-_A_State_of_Trance_Episode_550.2_Live_from_Expocenter_in_Moscow-Russia-(DI.FM)-07-03-2012-PS\00-armin_van_buuren_-_a_state_of_trance_episode_550.2_live_from_expocenter_in_moscow-russia-(di.fm)-07-03-2012-ps.nfo>
    Processing ACL of: <\\?\C:\Users\GARLIN\Downloads\AUDIO\MuSic\ARMIN_VAN_BUUREN\Armin_van_Buuren_-_A_State_of_Trance_Episode_550.2_Live_from_Expocenter_in_Moscow-Russia-(DI.FM)-07-03-2012-PS\short.txt>
    
    SetACL finished successfully.
    Processing ACL of: <\\?\C:\Users\GARLIN\Downloads\AUDIO>
    Processing ACL of: <\\?\C:\Users\GARLIN\Downloads\AUDIO\MuSic>
    Processing ACL of: <\\?\C:\Users\GARLIN\Downloads\AUDIO\MuSic\ARMIN_VAN_BUUREN>
    Processing ACL of: <\\?\C:\Users\GARLIN\Downloads\AUDIO\MuSic\ARMIN_VAN_BUUREN\Armin_van_Buuren_-_A_State_of_Trance_Episode_550.2_Live_from_Expocenter_in_Moscow-Russia-(DI.FM)-07-03-2012-PS>
    Processing ACL of: <\\?\C:\Users\GARLIN\Downloads\AUDIO\MuSic\ARMIN_VAN_BUUREN\Armin_van_Buuren_-_A_State_of_Trance_Episode_550.2_Live_from_Expocenter_in_Moscow-Russia-(DI.FM)-07-03-2012-PS\00-armin_van_buuren_-_a_state_of_trance_episode_550.2_live_from_expocenter_in_moscow-russia-(di.fm)-07-03-2012-ps.cue>
    Processing ACL of: <\\?\C:\Users\GARLIN\Downloads\AUDIO\MuSic\ARMIN_VAN_BUUREN\Armin_van_Buuren_-_A_State_of_Trance_Episode_550.2_Live_from_Expocenter_in_Moscow-Russia-(DI.FM)-07-03-2012-PS\00-armin_van_buuren_-_a_state_of_trance_episode_550.2_live_from_expocenter_in_moscow-russia-(di.fm)-07-03-2012-ps.mp3>
    Processing ACL of: <\\?\C:\Users\GARLIN\Downloads\AUDIO\MuSic\ARMIN_VAN_BUUREN\Armin_van_Buuren_-_A_State_of_Trance_Episode_550.2_Live_from_Expocenter_in_Moscow-Russia-(DI.FM)-07-03-2012-PS\00-armin_van_buuren_-_a_state_of_trance_episode_550.2_live_from_expocenter_in_moscow-russia-(di.fm)-07-03-2012-ps.nfo>
    Processing ACL of: <\\?\C:\Users\GARLIN\Downloads\AUDIO\MuSic\ARMIN_VAN_BUUREN\Armin_van_Buuren_-_A_State_of_Trance_Episode_550.2_Live_from_Expocenter_in_Moscow-Russia-(DI.FM)-07-03-2012-PS\short.txt>
    
    SetACL finished successfully.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 17:33.
Find Us




Windows 10 Forums