Skip to content
This repository has been archived by the owner on Dec 14, 2021. It is now read-only.

install.sh creates ~/.config/sourcetrail owned by root #625

Closed
knatten opened this issue Oct 11, 2018 · 3 comments
Closed

install.sh creates ~/.config/sourcetrail owned by root #625

knatten opened this issue Oct 11, 2018 · 3 comments

Comments

@knatten
Copy link

knatten commented Oct 11, 2018

$ sourcetrail
/usr/bin/sourcetrail: 8: [: /bin: unexpected operator
terminate called after throwing an instance of 'boost::filesystem::filesystem_error'
  what():  boost::filesystem::create_directory: Permission denied: "/home/knatten/.config/sourcetrail/log"
Aborted (core dumped)

This is because ~/.config/sourcetrail has wrong ownership:

~/.config$ ls -lad sourcetrail/
drwxr-xr-x 2 root root 4096 Oct 11 12:21 sourcetrail/

chowning that directory to my user fixed the problem.

@egraether
Copy link
Contributor

Thank you for the report and your solution! #626 is reporting the same problem.

The directory is created in the install.sh script:

mkdir -p ~/.config/sourcetrail

So adding this line to the script would fix the issue?

chown -R $USER ~/.config/sourcetrail

@knatten
Copy link
Author

knatten commented Oct 16, 2018

I don't think that will help, as $USER will be root when the script is run with sudo. You probably want something like this:

if [ "$SUDO_USER" ]; then CHOWNUSER=$SUDO_USER; else CHOWNUSER=$USER; fi

But I'm not a bash expert, so take this with a grain of salt.

@egraether
Copy link
Contributor

Fixed with 2018.3.123
I could reproduce the issue on Ubuntu and your solution worked. Thanks for the help!
We will release a beta build this week.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants