Barafu
Posts: 9
Joined: Thu Jun 25, 2015 2:19 pm

Linux: a severe permission problem with installer.

First of all, I did not test if this bug exists in 3.0 because it needs a fresh install. Sorry if it is already solved, but I think it is not.
Problem After installation, the installer suggests to immediately run Simplify3D. However, if the installer was run with sudo (and it usually is) then the Simplify3D application is run as root but with the environment of current user. This is a severe error. It creates the settings file in user directory but makes it read-only on future runs. This makes all settings on subsequent runs to be reverted to the state that they were on the first exit from application. This happens silently and user may even not know he has a problem, blaming developers for not saving settings at all.
Solution At the end of installation, Simplify3D application must run as the user that started sudo, not as root. Or, better yet, it should not be started at all, because you can not deduce proper user every time. There can be rather complicated cases. Running the software from the installer is Window way and does not fit easy into Linux system , where applications run as sudo confer the root rights to apps they run and files they create. In Linux, user should run app for the first time himself, which by the way ensures that user can run the app. Every app in Ubuntu repositories act this way.
JoeJ
Posts: 1435
Joined: Sun Feb 16, 2014 10:52 am

Re: Linux: a severe permission problem with installer.

I believe they include an "AddUserPermissions.sh" script that you can use anytime you need to add permissions for a specific users. It actually does a lot more than adding user permissions to the S3D files - it also fixes some other really common new user issues like adding that account to the dialout group and making sure that they can edit all of the necessary files.

Personally, I always just run S3D using sudo, but it you want to run it as a normal user, just log in as that user and then execute the AddUserPermissions script.
Barafu
Posts: 9
Joined: Thu Jun 25, 2015 2:19 pm

Re: Linux: a severe permission problem with installer.

This script exists, but it is better to prevent errors then supply a patch for the fix. Again, this problem comes silently, there is either no message or one saying "Can't open the file" without even telling which file it is. We are speaking of a beginner user, not Linux guru like us - they will have hard times to even understand they have a problem. Application does run and slice and print.
Additionally, last time this script did not help me. Unfortunately, I forgot to collect a proper data so can't file this bug, but I had a case where settings got lost on restart even after the running of the script.
User avatar
TimEdwards
Posts: 14
Joined: Fri Mar 22, 2013 7:43 pm
Location: Poolesville, Maryland
Contact: Website

Re: Linux: a severe permission problem with installer.

It should also be noted that the "AddUserPermissions.sh" script does the following:

Code: Select all

sudo chmod -R go+rwx Simplify3D
It is making several directories in the user's home path world-writeable. I don't think I'm more paranoid than the average linux user, and I consider that to be a big security hole. For one thing, on a multi-user system at a company or a school, one could surreptiously insert a setup that, if unnoticed, would destroy a printer.
karidavidsson
Posts: 1
Joined: Wed Jan 09, 2019 2:53 am

Re: Linux: a severe permission problem with installer.

This is still a problem on 4.1.1 running on Ubuntu 18.04LTS

The main issue is that the local configuration, ~/.config/Simplify3D is created with ownership root.root.

The following patch to AddUserPermissions.sh should fix this as well as the above mentions problems with write permissions:

Code: Select all

14c14,15
< sudo chmod -R go+rwx Simplify3D
---
> sudo chmod -R g+rwx Simplify3D
> sudo chmod -R o-rwx Simplify3D
19c20,22
< sudo chmod -R go+rwx Simplify3D
---
> sudo chmod -R g+rwx Simplify3D
> sudo chmod -R o-rwx Simplify3D
> sudo chown -R $USER.$USER Simplify3D
jharshman
Posts: 1
Joined: Wed May 13, 2020 6:35 pm

Re: Linux: a severe permission problem with installer.

I honestly didn't use the AddUserPermissions.sh script. The software seems to create those directories itself (assuming according to XDG_CONFIG_HOME) and there really isn't a need to change ownership on them.

Return to “Troubleshooting and Bug Reports”