SMB backup errors - "You'll need to provide administrator permission to copy this folder"
-
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]:
I click "continue," then:
"You need permission from Unix User\pi to make changes to this folder" [2]:
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]:
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]:
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. -
@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:
- Run
sudo nano /etc/samba/smb.conf
: - In the [global] section set
allow insecure wide links = yes
- In the per [share] setting then allow symlinks to be followed, set:
wide links = yes
. Save and quit editor. - 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 - Run
-
@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 linksgames/
(which is inside the other one) to the[roms]
share. So when you backup theconfigs
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? -
@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.
-
@sleve_mcdichael For
cgenius
, you can remove the symlink forgames
fromconfig
and configureSearchPath3 = /home/pi/RetroPie/roms/ports
incgenius.cfg
. Not sure foralephone
, since I don't have it installed. -
@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 inSearchPath2 = .
now, since we've moved ourselves to where they are.)It does move us away from
$md_inst
, where we findvfsroot/
, 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 incgenius/
proper. With this change, they do have to be incgenius/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 inrp_module_help="...
-- is this a bug to be addressed, or just a necessary consequence to be worked-around? -
@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. -
@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.
-
@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.
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.