theypsilon / Update_All_MiSTer

All-in-one script for updating your MiSTer
GNU General Public License v3.0
605 stars 27 forks source link

updater-pc permissions and path issues for ao486 and wonderswan #82

Closed birdybro closed 2 years ago

birdybro commented 2 years ago

updater-pc + BIOS-Getter are exhibiting some strange behavior on Windows regarding only two of the BIOS that are downloaded. Here are the snippets from the log. /BIOS/AO486/ is empty afterward, /BIOS/WonderSwan/ is not empty, it contains both boot.rom and boot1.rom.

STARTING BIOS RETRIVAL FOR: AO486

curl: (22) The requested URL returned error: 404
cp: cannot stat '../BIOS/AO486/boot0.rom': No such file or directory
Downloading https://raw.githubusercontent.com/MiSTer-devel/ao486_MiSTer/master/releases/bios/boot0.rom
curl: (22) The requested URL returned error: 404
cp: cannot stat '../BIOS/AO486/boot1.rom': No such file or directory

Downloading https://raw.githubusercontent.com/MiSTer-devel/ao486_MiSTer/master/releases/bios/boot1.rom

STARTING BIOS RETRIVAL FOR: WonderSwan

cp: cannot open '../BIOS/WonderSwan/boot.rom' for reading: Permission denied

'../BIOS/WonderSwan/boot.rom' -> '../games/WonderSwan/boot.rom'
cp: cannot open '../BIOS/WonderSwan/boot1.rom' for reading: Permission denied

'../BIOS/WonderSwan/boot1.rom' -> '../games/WonderSwan/boot1.rom'

WonderSwan permissions are "incorrectly ordered" according to Windows.

image

I know updater-pc is kind of a lower priority, just figured I'd mention it since I noticed it. :)

dvydra commented 2 years ago

I have been able to reproduce this as well. Same "incorrectly ordered" message.

I ran updater-pc, and the BIOS/WonderSwan directory has the following permissions. image

Actually all of the files created by the script have similar permissions, but don't override my ability to modify the other files.

I manually reset permissions for the MiSTer folder (which I had created), that the updater was populating using: Properties -> Security -> Advanced -> "Replace all child object permission entries with inheritable permission entries from this object" checkbox.

I personally don't understand how a file downloaded from the internet ends up with it's own NTFS permissions, rather than just inheriting. I'm going to try and investigate that now.

System: Windows 11 Pro 22000.493 Ran update_all_win.bat from https://github.com/theypsilon/Update_All_MiSTer/releases/download/1.4/updater-pc.zip

dvydra commented 2 years ago

update: the NULL SID permissions are an artefact of cygwin. This page explains it fairly well. https://blog.dhampir.no/content/forcing-cygwin-to-create-sane-permissions-on-windows

theypsilon commented 2 years ago

Thanks @dvydra what would be the suggested fix?

dvydra commented 2 years ago

Not sure. Is there something different about how the wonderswan BIOS files are retrieved by the script?

theypsilon commented 2 years ago

Not really

birdybro commented 2 years ago

I can't reproduce this, I think it might just be one of the random times that storage is locked by MiSTer for whatever reason. Wonderswan is the last to execute, so it could be related, but I don't know. Closing for now since I don't think it's reliably reproducible and I don't think it's related to the script itself.