View Issue Details

IDProjectCategoryView StatusLast Update
0004739FreeCADBugpublic2021-09-16 15:03
Reportercurtmcd Assigned Touwestoehr  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionwon't fix 
PlatformWindowsOS10OS Version20H2
Product Version0.19 
Target Version0.20 
Summary0004739: Launch from Windows installer fails to drop privileges
DescriptionDiscussion on forum: https://forum.freecadweb.org/viewtopic.php?f=4&t=61302

When FreeCAD is installed on a Windows machine using the Windows installer, and FreeCAD is then launched by the installer, then it will be running as Administrator.

Reasons this is a bug:
1. A user will have run the installer with intent to run it as themselves (even if installing for all users)
2. There is no valid reason to ever run FreeCAD as Administrator
3. New users do not expect this and get frustrated
   a. User network shares are inaccessible
   b. User may create files they cannot later edit
   c. User may modify system files
4. Among software packages, this behavior is unique to FreeCAD.

A suggested fix is to change the installer to fork a separate process for the part that escalates privileges and modifies the system, and after that exits successfully, launch FreeCAD in the original process.

A quick interim fix would be to remove the launch checkbox until the above can be implemented.
Steps To Reproduce1. Make sure FreeCAD is not installed on a Windows 10 machine
2. Download the installer from
   https://github.com/FreeCAD/FreeCAD/releases/download/0.19.2/FreeCAD-0.19.2.7b5e18a-WIN-x64-installer1.exe
3. Run the installer
4. At the end of the installer, tick the "Launch" checkbox
5. Finish installation

FreeCAD is now running as Administrator and not as the user who installed it.
TagsNo tags attached.
FreeCAD InformationThis problem has not been reported for version 0.20 as the Windows installer is not yet available, however it is will be in 0.20 for lack of being addressed thus far.

OS: Windows 10 Version 2009
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.24291 (Git)
Build type: Release
Branch: releases/FreeCAD-0-19
Hash: 7b5e18a0759de778b74d3a5c17eba9cb815035ac
Python version: 3.8.6+
Qt version: 5.15.2
Coin version: 4.0.1
OCC version: 7.5.0
Locale: English/United States (en_US)

Activities

Kunda1

2021-09-02 21:16

administrator   ~0015890

Hi @apeltauer, care you weigh in? Thanks!

Kunda1

2021-09-08 14:37

administrator   ~0015918

Adding to v0.20 roadmap

uwestoehr

2021-09-15 16:31

manager   ~0015926

Last edited: 2021-09-15 16:32

I do not agree that there is a bug. The installer uses just the Windows user handling, so in effect it behaves like every other program. The launch button is a convenience tool to check after the installation if everything went fine. Admins know that when they launch a program with admin privileges, that it has, well, of course admin permissions.

So as I stated also in the forum thread, when you don't like a feature, you are not forced to use it.

> 2. There is no valid reason to ever run FreeCAD as Administrator

If you think so, then don't do this. To be admin you must explicitely get this permissions. The default of the installer is to install only for the current user.

curtmcd

2021-09-16 05:39

reporter   ~0015935

It is definitely a bug. The installer does not behave like all others as claimed -- name one. The launch button is currently not a convenience, but an inconvenience and a disservice to all new FreeCAD Windows users because it leads to unexpected trouble as described in the forum. The user expectation is not to "check if it went fine", but to use the program immediately. Admins rarely install this program; users do. Running an process that temporarily escalates privileges does not reclassify the physical human to be an IT Admin any more than the Unix "passwd" command does. New users to FreeCAD are subject to this installer and wouldn't know not to use the Launch button "feature" because they have never seen another installer broken like this.

uwestoehr

2021-09-16 15:02

manager   ~0015938

The topic has been discussed properly in the forum. There is no bug as GeneFC summarized in his post: https://forum.freecadweb.org/viewtopic.php?f=4&t=61302&start=40#p533363

The installer provides you an option, if you don't want it, don't use it. I will not remove an optional feature just because some users might want to not use it. That's why the feature is optional and not mandatory.

uwestoehr

2021-09-16 15:03

manager   ~0015939

Closing.

Issue History

Date Modified Username Field Change
2021-09-02 07:52 curtmcd New Issue
2021-09-02 21:16 Kunda1 Note Added: 0015890
2021-09-02 22:36 Kunda1 Assigned To => uwestoehr
2021-09-02 22:36 Kunda1 Status new => assigned
2021-09-08 14:37 Kunda1 Target Version => 0.20
2021-09-08 14:37 Kunda1 Note Added: 0015918
2021-09-15 16:31 uwestoehr Note Added: 0015926
2021-09-15 16:32 uwestoehr Note Edited: 0015926
2021-09-16 05:39 curtmcd Note Added: 0015935
2021-09-16 15:02 uwestoehr Note Added: 0015938
2021-09-16 15:03 uwestoehr Status assigned => closed
2021-09-16 15:03 uwestoehr Resolution open => won't fix
2021-09-16 15:03 uwestoehr Note Added: 0015939