• Login
    • Search
    • Categories
    • Recent
    • Tags
    • Users
    • Groups
    • Rules
    • Help

    Do more on the web, with a fast and secure browser!

    Download Opera browser with:

    • built-in ad blocker
    • battery saver
    • free VPN
    Download Opera

    scoped_dir folders in downloads directory

    Opera for Windows
    38
    77
    103421
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • rejzor
      rejzor @burnout426 last edited by

      @burnout426 Anyone actually still uses FAT32 these days for things other than USB drives?

      Reply Quote 0
        burnout426 1 Reply Last reply
      • burnout426
        burnout426 Volunteer @rejzor last edited by

        @rejzor Not sure. It was indeed a usb thumb drive I was testing with.

        Reply Quote 0
          1 Reply Last reply
        • burnout426
          burnout426 Volunteer last edited by

          FWIW, I filed bug DNA-65689 with a good description of the problem and good steps to reproduce; to try to get some official answers on the behavior and to fix and improve things. Pointed to this thread also.

          Reply Quote 0
            1 Reply Last reply
          • burnout426
            burnout426 Volunteer last edited by

            Okay. The reason for creating the scoped directories is to prevent DLL hijacking when launching executables that don't use safe DLL searching. By launching the executable from within a separate folder, it prevents dangerous DLLs (that you accidentally downloaded or were tricked into downloading) in the downloads directory from being used by the executable instead of the real, safe system versions of the DLLs.

            The exe that's placed in the scoped directory isn't a copy of the exe. It's an NTFS hard link to the original (which you can check with fsutil hardlink list filename), so it's not taking up extra space. By default, the scoped directory is placed in the system %TEMP% directory. However, if you set the download directory to another drive, the scoped directory must be created on that drive instead (in the downloads directory for example) because NTFS hard links can't cross file system boundaries.

            These scoped directories are deleted when Opera properly shuts down.

            So, Opera is doing this to protect the user from this type of attack, and all of Opera's current behavior with the scoped directories is correct / expected.

            However, more-robust handling of cleanup of the directories might be investigated.

            Hope that helps.

            Reply Quote 1
              rejzor 1 Reply Last reply
            • rejzor
              rejzor @burnout426 last edited by

              @burnout426 Fine, but then fix the Opera to clean up this stuff correctly. It's clearly broken if these folders are being left behind.

              Reply Quote 1
                burnout426 1 Reply Last reply
              • burnout426
                burnout426 Volunteer @rejzor last edited by

                @rejzor said in scoped_dir folders in downloads directory:

                @burnout426 Fine, but then fix the Opera to clean up this stuff correctly. It's clearly broken if these folders are being left behind.

                Can you list each situation where Opera doesn't clean them up? On shutdown of Opera, Opera is at least cleaning up ones it created in that session for me.

                Reply Quote 0
                  1 Reply Last reply
                • rejzor
                  rejzor last edited by

                  I stopped executing downloaded programs from within Opera. Not a single scoped_dir folder in there. It's just annoying that I have the popup there inside Opera interface and I have to avoid using it and manually opening the downloads folder when the thing could work right from the get go in cleaning up its mess in the first place. I mean, no other program uses "scoped_dir" so why doesn't Opera try to clean it up on restarts, checking its designated download folder for scoped_dir folders and if there are any, clean them up. If they are in use, it won't allow it anyway so you just can't make the cleanup wrong. It's an easy fix if anyone at least bothered to do it...

                  Reply Quote 0
                    1 Reply Last reply
                  • roma-fl
                    roma-fl last edited by

                    Agreed with rejzor.
                    I always set download directory as "D:\" and I don't want to see strange & ugly folders on my working drive.

                    Reply Quote 0
                      1 Reply Last reply
                    • burnout426
                      burnout426 Volunteer last edited by

                      As a workaround, you could put:

                      noscoped.bat

                      FOR /D %%X IN (scoped_dir*) DO RD /S /Q "%%X"
                      

                      in the downloads folder and double-left-click it for easy cleanup.

                      Or, you could do something like:

                      cd "d:\downloads"
                      FOR /D %%X IN (scoped_dir*) DO RD /S /Q "%%X"
                      

                      for the batch file and then modify Opera's shortcut to be something like:

                       "d:\downloads\noscoped.bat" & "C:\Program Files\Opera\launcher.exe"
                      

                      That bat obviously wouldn't execute if you launched Opera via a file association (unless you edited the commands in the registry). But, it'd work for the normal shortcut case.

                      On a side, I did notice that if you close Opera while a scoped directory it created is in use (because the installer is still open in the directory), Opera won't delete it, obviously. So, that's another situation to avoid.

                      Reply Quote 1
                        rkoopmansnl 1 Reply Last reply
                      • rkoopmansnl
                        rkoopmansnl @burnout426 last edited by

                        @burnout426 said in scoped_dir folders in downloads directory:

                        FOR /D %%X IN (scoped_dir*) DO RD /S /Q "%%X"
                        

                        This works better... 😉

                        FOR /D %X IN (scoped_dir*) DO RD /S /Q "%X"
                        
                        Reply Quote 0
                          burnout426 1 Reply Last reply
                        • burnout426
                          burnout426 Volunteer @rkoopmansnl last edited by

                          @rkoopmansnl One way is for inside a batch file and the other is for on the command-line directly.

                          Reply Quote 0
                            1 Reply Last reply
                          • A Former User
                            A Former User @kosterio last edited by

                            2 years later, Feb 5th 2018, this is still an issue. Executing file after download from the browser will create a "scoped_dir" folder......

                            Reply Quote 1
                              1 Reply Last reply
                            • demiryasinoruc
                              demiryasinoruc last edited by

                              Still continue.

                              V51.0.2830.26

                              Reply Quote 0
                                1 Reply Last reply
                              • A Former User
                                A Former User last edited by

                                same here

                                Reply Quote 0
                                  1 Reply Last reply
                                • redscarf
                                  redscarf last edited by

                                  54.0.2952.60 stable has same problem

                                  Reply Quote 0
                                    1 Reply Last reply
                                  • dartesey
                                    dartesey last edited by

                                    UP!!

                                    Reply Quote 0
                                      1 Reply Last reply
                                    • burnout426
                                      burnout426 Volunteer last edited by

                                      It's still intended behavior and there's still no word of having an option to turn it off.

                                      Reply Quote 0
                                        1 Reply Last reply
                                      • privatadata
                                        privatadata last edited by

                                        This is ridiculous. I love the browser but hate this behaviour! There has to be an unofficial fix.

                                        Reply Quote 1
                                          burnout426 1 Reply Last reply
                                        • burnout426
                                          burnout426 Volunteer @privatadata last edited by

                                          @privatadata

                                          The current workaround is to make sure your downloads folder is on the same drive as your temp folder. For example, if your temp folder is at "C:\Users\yourusername\AppData\Local\temp", your downloads folder needs to be on C: also. Then, those scoped directores will be created in the temp folder instead.

                                          Another workaround is to have the drive your downloads folder is on formatted as FAT32 instead of NTFS.

                                          Another workaround might (depends on how the feature is coded) be to set your temp folder to be on the same drive as your downloads folder. For example, if your downloads folder is at F:\downloads, your temp folder needs to be set to f:\temp for example. However, before you can do that, you need to figure out how Opera determines the temp folder path. If it just uses the TEMP or TMP environment variables, you can modify those. However, if it uses USERNAME or USERPROFILE or APPDATA or LOCALAPPDATA or HOMEPATH as a base of the temp path, you would have to move your whole windows user profile to F:\Users\yourusername for example. That'd be a mess. If Opera uses HOMEDRIVE or SYSTEMROOT as a base, you're probably SOL.

                                          However, if you can figure out why Opera is not cleaning up the scoped folders for you when it closes, maybe you'll have another workaround. Haven't checked in a while, but Opera cleans them up for me.

                                          For example,:

                                          On a side, I did notice that if you close Opera while a scoped directory it created is in use (because the installer is still open in the directory), Opera won't delete it, obviously. So, that's another situation to avoid.

                                          Reply Quote 0
                                            1 Reply Last reply
                                          • A Former User
                                            A Former User last edited by

                                            Same here (11/17/2018)

                                            56.0.3051.104 Stable
                                            Windows 10 64bit

                                            Reply Quote 0
                                              1 Reply Last reply
                                            • First post
                                              Last post

                                            Computer browsers

                                            • Opera for Windows
                                            • Opera for Mac
                                            • Opera for Linux
                                            • Opera beta version
                                            • Opera USB

                                            Mobile browsers

                                            • Opera for Android
                                            • Opera Mini
                                            • Opera Touch
                                            • Opera for basic phones

                                            • Add-ons
                                            • Opera account
                                            • Wallpapers
                                            • Opera Ads

                                            • Help & support
                                            • Opera blogs
                                            • Opera forums
                                            • Dev.Opera

                                            • Security
                                            • Privacy
                                            • Cookies Policy
                                            • EULA
                                            • Terms of Service

                                            • About Opera
                                            • Press info
                                            • Jobs
                                            • Investors
                                            • Become a partner
                                            • Contact us

                                            Follow Opera

                                            • Opera - Facebook
                                            • Opera - Twitter
                                            • Opera - YouTube
                                            • Opera - LinkedIn
                                            • Opera - Instagram

                                            © Opera Software 1995-