• Recent
  • Tags
  • Popular
  • Home
  • Docs
  • Register
  • Login
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 1 Jul 2023, 07:29 7 Jan 2023, 05:36

    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
    • L
      Lolonois
      last edited by Lolonois 1 Jul 2023, 15:52 7 Jan 2023, 15:50

      @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 1 Aug 2023, 00:19 8 Jan 2023, 00:15

        @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?

        L 1 Reply Last reply 8 Jan 2023, 13:32 Reply Quote 0
        • L
          Lolonois @sleve_mcdichael
          last edited by 8 Jan 2023, 13:32

          @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
          • M
            mitu Global Moderator
            last edited by 10 Jan 2023, 04:23

            @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 11 Jan 2023, 20:12 Reply Quote 0
            • S
              sleve_mcdichael @mitu
              last edited by 11 Jan 2023, 20:12

              @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?

              B M 2 Replies Last reply 11 Jan 2023, 20:59 Reply Quote 0
              • B
                BuZz administrators @sleve_mcdichael
                last edited by BuZz 1 Nov 2023, 21:04 11 Jan 2023, 20:59

                @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 11 Jan 2023, 22:10 Reply Quote 1
                • S
                  sleve_mcdichael @BuZz
                  last edited by 11 Jan 2023, 22:10

                  @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
                  • M
                    mitu Global Moderator @sleve_mcdichael
                    last edited by 12 Jan 2023, 04:15

                    @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
                    9 out of 9
                    • First post
                      9/9
                      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.

                      This community forum collects and processes your personal information.
                      consent.not_received