RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login
    Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

    SMB backup errors - "You'll need to provide administrator permission to copy this folder"

    Scheduled Pinned Locked Moved Help and Support
    smbbackuppermissionadministrator
    9 Posts 4 Posters 804 Views
    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.
    • S
      sleve_mcdichael
      last edited by sleve_mcdichael

      RPi4, 2GB
      RetroPie 4.8.2 (built from 4.7.1)

      Backing up via SMB over WiFi to Windows 10 by highlighting all the folders in \\retropie and copying to a local folder on the PC.

      Expected: items copy to local backup folder with no further user input.

      Actual: Near the start, after discovering items but before anything transfers, I get "You'll need to provide administrator permission to copy this folder" [1]:

      alt text

      I click "continue," then:

      "You need permission from Unix User\pi to make changes to this folder" [2]:

      alt text

      I click "Try Again" and it seems to work, copying the bulk of the files, until it gets near the end when it gives this:

      "You require permission from the computer's administrator to make changes to this folder" [3]:

      alt text

      This time I click "Try Again" and nothing happens, it just brings up the same window over and over, until I click Skip. Then it takes me to:

      "The destination contains 23 files with the same names" - "all files have the same date and size" [4]:

      alt text

      alt text

      alt text

      alt text

      I tell it to "skip 23 files with the same date and size," and it finishes up; once it's done, everything seems to be accounted for and in the right place.


      [1], [2] seem to be referencing /opt/retropie/configs/ports.

      [3] seems to be referencing /opt/retropie/configs/ports/cgenius/games -> /home/pi/RetroPie/roms/ports/cgenius:

      pi@retropie:~ $ ls -l /opt/retropie/configs/ports/cgenius/games
      lrwxrwxrwx 1 pi pi 36 Aug 26 20:28 /opt/retropie/configs/ports/cgenius/games -> /home/pi/RetroPie/roms/ports/cgenius
      pi@retropie:~ $ ls -ld RetroPie/roms/ports/cgenius
      drwxr-xr-x 7 pi pi 4096 Oct 18 10:52 RetroPie/roms/ports/cgenius
      

      I didn't check out all 23 of them but [4] seems to reference /opt/retropie/configs/ports/alephone/Image Cache/Cache.ini and /opt/retropie/configs/ports/cgenius/CGLog.html, among others.

      1 Reply Last reply Reply Quote 0
      • LolonoisL
        Lolonois
        last edited by Lolonois

        @sleve_mcdichael nothing wrong with RetroPie itself but all is not lost:

        For security reasons Samba does not follow symbolic links outside the shared folder on the server. The issue in short: Users could "export by symlinking" /etc/passwd and other sensitive files from your Arcade.

        However, if you trust everyone on your LAN you can weaken this security measure:

        1. Run sudo nano /etc/samba/smb.conf:
        2. In the [global] section set allow insecure wide links = yes
        3. In the per [share] setting then allow symlinks to be followed, set: wide links = yes. Save and quit editor.
        4. Then issue: sudo systemctl restart smbd and refresh the Windows Exploder share (F5).

        HTH

        Refs:
        https://www.samba.org/samba/docs/current/man-html/smb.conf.5.html#ALLOWINSECUREWIDELINKS
        https://www.samba.org/samba/docs/current/man-html/smb.conf.5.html#WIDELINKS

        1 Reply Last reply Reply Quote 0
        • S
          sleve_mcdichael
          last edited by sleve_mcdichael

          @Lolonois cheers, that seems to have done it.

          I guess it's just because the way cgenius links its directories.

          The app itself keeps configs in ~/.CommanderGenius and game files in ~/.CommanderGenius/games. This doesn't appear to be user-configurable.

          RetroPie then links ~/.CommanderGenius to the [configs] share, and then links games/ (which is inside the other one) to the [roms] share. So when you backup the configs folder it's trying to link outside the share and thence the conflict.

          So I probably only need the wide links = yes in the one section ([configs], since that's where the link originates), right?

          LolonoisL 1 Reply Last reply Reply Quote 0
          • LolonoisL
            Lolonois @sleve_mcdichael
            last edited by

            @sleve_mcdichael said in SMB backup errors - "You'll need to provide administrator permission to copy this folder":

            So I probably only need the wide links = yes in the one section ([configs], since that's where the link originates), right?

            Yes.

            1 Reply Last reply Reply Quote 1
            • mituM
              mitu Global Moderator
              last edited by

              @sleve_mcdichael For cgenius, you can remove the symlink for games from config and configure SearchPath3 = /home/pi/RetroPie/roms/ports in cgenius.cfg. Not sure for alephone, since I don't have it installed.

              S 1 Reply Last reply Reply Quote 0
              • S
                sleve_mcdichael @mitu
                last edited by

                @mitu I also tried this:

                cgenius = "pushd $romdir/ports/$md_id; $md_inst/CGeniusExe; popd"
                

                ...whereas current behavior is to pushd into $md_inst and run ./CGeniusExe from there.

                This seems to be working fine at first look, with the configs/ports/cgenius/games -> /home/pi/RetroPie/roms/cgenius symlink removed and with no post-install config mods required (it's finding the game files in SearchPath2 = . now, since we've moved ourselves to where they are.)

                It does move us away from $md_inst, where we find vfsroot/, though. Will this break something down the line since it can't find that directory, or since that's next to the executable, maybe it can still find it anyway? So far it has handled everything I've thrown at it, which has been passing the first level of Ep's 1-5 and also 9, with no crashes or missing textures (at least none that were glaringly obvious) or anything like that.

                Individual game folders do have to be in a games subdir inside .../roms/ports/cgenius (the docs already say this, but I found that it did also work if they're just in cgenius/ proper. With this change, they do have to be in cgenius/games like it already says.)

                If preview.bmp does not already exist in $romdir/ports/cgenius/games/[game], one will be created in ~/.CommanderGenius/games/[game] (since these are no longer linked to the same place.) If it does exist in $romdir, nothing is created in ~/.CommanderGenius.

                Is this broken or legit?

                https://github.com/RetroPie/RetroPie-Setup/compare/master...s1eve-mcdichae1:RetroPie-Setup:cgenius

                Side note: the variable $md_id does not appear to function when used in the header section in rp_module_help="... -- is this a bug to be addressed, or just a necessary consequence to be worked-around?

                BuZzB mituM 2 Replies Last reply Reply Quote 0
                • BuZzB
                  BuZz administrators @sleve_mcdichael
                  last edited by BuZz

                  @sleve_mcdichael said in SMB backup errors - "You'll need to provide administrator permission to copy this folder":

                  Side note: the variable $md_id does not appear to function when used in the header section in rp_module_help="... -- is this a bug to be addressed, or just a necessary consequence to be worked-around?

                  These are parsed before $md_id is available. Can just use the scriptmodule name instead.

                  $md_id is set by the parent function that calls the scriptmodule functions and so is only available in them.

                  To help us help you - please make sure you read the sticky topics before posting - https://retropie.org.uk/forum/topic/3/read-this-first

                  S 1 Reply Last reply Reply Quote 1
                  • S
                    sleve_mcdichael @BuZz
                    last edited by

                    @BuZz said in SMB backup errors - "You'll need to provide administrator permission to copy this folder":

                    These are parsed before $md_id is available. Can just use the scriptmodule name instead.

                    Noted and fixed.

                    1 Reply Last reply Reply Quote 0
                    • mituM
                      mitu Global Moderator @sleve_mcdichael
                      last edited by

                      @sleve_mcdichael though most games seem to work without vfsroot available, I'm not sure it's not internally used somewhere.

                      If preview.bmp does not already exist in $romdir/ports/cgenius/games/[game], one will be created in ~/.CommanderGenius/games/[game] (since these are no longer linked to the same place.) If it does exist in $romdir, nothing is created in ~/.CommanderGenius.

                      Is this broken or legit?

                      I don't think it's broken.

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

                      Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.

                      Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.