D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 15456 - sc.ini: Access denied for non-superusers on Windows 10
Summary: sc.ini: Access denied for non-superusers on Windows 10
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: installer (show other issues)
Version: D2
Hardware: All Windows
: P1 major
Assignee: No Owner
URL:
Keywords: pull
Depends on:
Blocks:
 
Reported: 2015-12-16 16:18 UTC by David Eckardt
Modified: 2016-01-18 17:24 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description David Eckardt 2015-12-16 16:18:06 UTC
After installing DMD on Windows 10 normal users have no access permission for sc.ini. DMD's error message says that object.d wasn't found, which is very misleading.
Comment 1 Brad Anderson 2015-12-16 19:12:36 UTC
(In reply to David Eckardt from comment #0)
> After installing DMD on Windows 10 normal users have no access permission
> for sc.ini. DMD's error message says that object.d wasn't found, which is
> very misleading.

Did you install it in Program Files or something like that? I can't think of any reason a regular user wouldn't have permissions. It works fine for me in Windows 10.
Comment 2 David Eckardt 2015-12-17 13:50:25 UTC
This happened with the dmd-2.069.2 installer

http://downloads.dlang.org/releases/2.x/2.069.2/dmd-2.069.2.exe

on Windows 10 Home, using the default installation options, which install it in the C:\D\ directory.
Comment 3 Brad Anderson 2015-12-17 21:01:24 UTC
(In reply to David Eckardt from comment #2)
> This happened with the dmd-2.069.2 installer
> 
> http://downloads.dlang.org/releases/2.x/2.069.2/dmd-2.069.2.exe
> 
> on Windows 10 Home, using the default installation options, which install it
> in the C:\D\ directory.

Oh, my apologies. I wasn't using the latest version. Just reproduced the object.d error but my sc.ini was fine and accessible. My druntime folder was completely missing... Then I uninstalled and reinstalled several versions going back to 2.069.0 and all had weird, different files missing.

I think it might be the uninstaller is still recursively deleting things even as the installer is busy installing the new version... Very unexpected bug. I'm looking into it more.
Comment 4 Brad Anderson 2015-12-17 21:15:59 UTC
Added Rainer and Martin on the CC. Assuming it's the same bug you hit, it seems you can reproduce by going through the uninstaller and installer as quickly as possible. The uninstaller "finishes" almost instantly once it gets to the RMDir /r part which makes me think it's doing the deletions asynchronously and the new files being added by the installer are subject to the delete. Very ugly bug.

One quick fix might be to rename the C:\D folder prior to deleting it. I'm unfortunately too busy at the moment to try to fix this myself but might be able to look in a couple weeks.
Comment 5 Rainer Schuetze 2016-01-17 22:15:51 UTC
I could verify the permissions for sc.ini are broken after installation. Here's a possible fix: https://github.com/D-Programming-Language/installer/pull/165
Comment 6 Brad Anderson 2016-01-18 05:24:00 UTC
Yep, it's just the permissions. The other issue issue I hit in the above comments is unrelated (though still a problem). Either pull request will fix this issue.
Comment 7 github-bugzilla 2016-01-18 17:22:04 UTC
Commit pushed to stable at https://github.com/D-Programming-Language/installer

https://github.com/D-Programming-Language/installer/commit/ebc452178823bd9d75ad12db918ec53c970b3285
Merge pull request #167 from rainers/alluser_access

Fix issues 15456 and 15572 - bad sc.ini permissions for restricted users
Comment 8 github-bugzilla 2016-01-18 17:24:18 UTC
Commit pushed to master at https://github.com/D-Programming-Language/installer

https://github.com/D-Programming-Language/installer/commit/ebc452178823bd9d75ad12db918ec53c970b3285
Merge pull request #167 from rainers/alluser_access