LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-15-2011, 10:31 AM   #1
cov
Member
 
Registered: Apr 2005
Location: Durban
Posts: 436

Rep: Reputation: 30
Installed software only runs as root


I've just installed DraftSight on a Ubuntu 11.10 install.

I've downloaded the /deb file and run dpkg -i on it which has installed the software in /opt/dassault-systemes/draftsight/bin/DraftSight

Code:
ls -l /opt/dassault-systemes/draftsight/bin/DraftSight
-rwxr-xr-x 1 root root 815 2011-10-01 08:48 /opt/dassault-systemes/draftsight/bin/DraftSight
]Starting the software as a normal user give the following error:
Code:
DraftSight.bin: main.cpp:162: QString WriteProtected(QDir, int): Assertion `0' failed.
Aborted
Running it with sudo also fails.

However if I invoke the superuser by typing sudo su, then the software starts up correctly.

Can anyone suggest what I need to do to allow a normal user to use the software? The problem is that files saved are owned by root.
 
Old 12-15-2011, 11:13 AM   #2
sgosnell
Senior Member
 
Registered: Jan 2008
Location: Baja Oklahoma
Distribution: Debian Stable and Unstable
Posts: 1,943

Rep: Reputation: 542Reputation: 542Reputation: 542Reputation: 542Reputation: 542Reputation: 542
Reinstall it with gdebi or Synaptic, not dpkg. That should set the necessary permissions.
 
Old 12-19-2011, 08:58 AM   #3
cov
Member
 
Registered: Apr 2005
Location: Durban
Posts: 436

Original Poster
Rep: Reputation: 30
Well, installing in gdebi has the same result.

Not sure how to install using synaptic.
 
Old 01-18-2012, 10:34 AM   #4
cov
Member
 
Registered: Apr 2005
Location: Durban
Posts: 436

Original Poster
Rep: Reputation: 30
Damn.

Still having this problem.

Only thing Google throws up is this thread.
 
Old 01-18-2012, 11:03 AM   #5
eSelix
Senior Member
 
Registered: Oct 2009
Location: Wroclaw, Poland
Distribution: Arch, Kubuntu
Posts: 1,281

Rep: Reputation: 320Reputation: 320Reputation: 320Reputation: 320
Maybe this software store files in current directory or application directory. Can you for testing give permissions 0777 to this directory and try to launch as normal user? If this will be succesful, then its bad, because you can't change program behavior, eventually change working directory before launching to user HOME or /tmp.

If not, Linux has a nice command:
Code:
strace -e trace=file /opt/dassault-systemes/draftsight/bin/DraftSight
Search where error occurs and read in which directory or paste output here.

Last edited by eSelix; 01-18-2012 at 11:04 AM.
 
Old 01-18-2012, 11:12 AM   #6
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,455

Rep: Reputation: 2353Reputation: 2353Reputation: 2353Reputation: 2353Reputation: 2353Reputation: 2353Reputation: 2353Reputation: 2353Reputation: 2353Reputation: 2353Reputation: 2353
That error may well be because a luser cannot write wherever this thing is writing stuff. If the user can't run the file, it's "Permission Denied"

But no user can write on /opt
 
Old 01-18-2012, 11:39 AM   #7
cov
Member
 
Registered: Apr 2005
Location: Durban
Posts: 436

Original Poster
Rep: Reputation: 30
I've change the ownership of the directory in /opt to dave:dave, but it still fails if I invoke the app under the dave user.

Code:
 chown dave:dave -R dassault-systemes
root@SNECCI:/opt# ls -l dassault-systemes/
total 4
drwxr-xr-x 10 dave dave 4096 2012-01-18 18:22 draftsight
root@SNECCI:/opt# ls -l dassault-systemes/draftsight/bin/
total 38384
drwxr-xr-x  2 dave dave     4096 2012-01-18 18:22 codecs
-rwxr-xr-x  1 dave dave      815 2011-10-01 08:48 DraftSight
-rwxr-xr-x  1 dave dave 10312740 2011-10-01 08:48 DraftSight.bin
-rw-r--r--  1 dave dave    25868 2011-10-01 08:48 DsCommandVarsDict.xml
-rw-r--r--  1 dave dave    12712 2011-10-01 08:48 DsLispDict.xml
-rwxr-xr-x  1 dave dave  1062220 2011-10-01 22:18 ExtCommands.tx
-rwxr-xr-x  1 dave dave   360267 2011-10-01 08:48 FxCharMap.tx
-rwxr-xr-x  1 dave dave 18956455 2011-10-01 08:48 FXCommands.tx
-rwxr-xr-x  1 dave dave   413681 2011-10-01 08:48 FXCurves.tx
-rwxr-xr-x  1 dave dave  2307705 2011-10-01 08:48 FXDimCommands.tx
-rwxr-xr-x  1 dave dave   293287 2011-10-01 08:48 FXEvalWatcher.tx
-rwxr-xr-x  1 dave dave  1062863 2011-10-01 08:48 FXGripPoints.tx
-rwxr-xr-x  1 dave dave  2830314 2011-10-01 08:48 FXProperties.tx
-rwxr-xr-x  1 dave dave   336600 2011-10-01 08:48 HelpGuide
drwxr-xr-x  2 dave dave     4096 2012-01-18 18:22 imageformats
-rwxr-xr-x  1 dave dave    23109 2011-10-01 08:48 K2GestureWidget.tx
drwxr-xr-x 15 dave dave     4096 2012-01-18 18:22 messages
-rwxr-xr-x  1 dave dave   225657 2011-10-01 08:48 ModelerGeometry.tx
-rwxr-xr-x  1 dave dave    93745 2011-10-01 08:48 PlotStyleServices.tx
-rwxr-xr-x  1 dave dave    73506 2011-10-01 08:48 RasterProcessor.tx
-rwxr-xr-x  1 dave dave   769365 2011-10-01 08:48 RecomputeDimBlock.tx
-rwxr-xr-x  1 dave dave    90636 2011-10-01 08:48 RxRasterServices.tx
drwxr-xr-x  2 dave dave     4096 2012-01-18 18:22 sqldrivers
Subsequently running strace as you suggest gives this:

Code:
dave@SNECCI:~/Documents/ACAD/Blocks/Models$ strace -e trace=file /opt/dassault-systemes/draftsight/bin/DraftSight
execve("/opt/dassault-systemes/draftsight/bin/DraftSight", ["/opt/dassault-systemes/draftsigh"...], [/* 44 vars */]) = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 3
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/i386-linux-gnu/libc.so.6", O_RDONLY) = 3
stat64("/home/dave/Documents/ACAD/Blocks/Models", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0
stat64(".", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0
open("/opt/dassault-systemes/draftsight/bin/DraftSight", O_RDONLY) = 3
--- SIGCHLD (Child exited) @ 0 (0) ---
--- SIGCHLD (Child exited) @ 0 (0) ---
stat64("/usr/lib32/gconv", 0xbfe0b680)  = -1 ENOENT (No such file or directory)
chdir("/opt/dassault-systemes/draftsight/bin") = 0
stat64("/etc/fedora-release", 0xbfe0b660) = -1 ENOENT (No such file or directory)
DraftSight.bin: main.cpp:162: QString WriteProtected(QDir, int): Assertion `0' failed.
--- SIGCHLD (Child exited) @ 0 (0) ---
Aborted
Lots of "no such file or directory", particularly where it seems to be looking in the /etc directory; not an entirely appropriate location for some of them...
 
Old 01-18-2012, 11:46 AM   #8
DavidMcCann
LQ Veteran
 
Registered: Jul 2006
Location: London
Distribution: PCLinuxOS, Salix
Posts: 6,150

Rep: Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314
I see that the Linux version is described as a beta, so it's more likely that the problem is with the program than anything you did in installing. Tell them about it.
 
Old 01-18-2012, 02:52 PM   #9
cov
Member
 
Registered: Apr 2005
Location: Durban
Posts: 436

Original Poster
Rep: Reputation: 30
Yes, I must admit that I am rapidly coming to this conclusion too.

However, it's been a month since this problem surfaced, I would have expected it to be fixed by now if it were a general bug.

The company is probably also hoping to make money by providing support (as they are entitled to do IMO), so there is no forum or free knowledgebase through which to provide them with the information which may help them solve this...
 
Old 01-18-2012, 05:34 PM   #10
eSelix
Senior Member
 
Registered: Oct 2009
Location: Wroclaw, Poland
Distribution: Arch, Kubuntu
Posts: 1,281

Rep: Reputation: 320Reputation: 320Reputation: 320Reputation: 320
The difference between "sudo some_app" and "sudo su" is that former does not change the HOME variable. I did some testing and discover that this application does not work (I get segfault) when user has no write permission to file ~/.config/DraftSight/1.2.188/Workspace/Classic Default.xml So, check this. I sugest you to take ownership of all files in your home directory, because if you often using sudo you may also get other applications working improperly:
Code:
sudo chown -Rc dave:dave /home/dave

Last edited by eSelix; 01-18-2012 at 05:39 PM.
 
Old 01-19-2012, 12:08 AM   #11
cov
Member
 
Registered: Apr 2005
Location: Durban
Posts: 436

Original Poster
Rep: Reputation: 30
Thanks very much for your efforts on this.

Oddly enough, sudo /opt/dassault-systemes/draftsight/bin/DraftSight doesbn't work.

Code:
dave@SNECCI:~$ sudo /opt/dassault-systemes/draftsight/bin/DraftSight
[sudo] password for dave: 
DraftSight.bin: main.cpp:162: QString WriteProtected(QDir, int): Assertion `0' failed.
Aborted
Permissions in my home directory are fine, though:

Code:
dave@SNECCI:~$ ls -l .config/DraftSight/
total 4
drwxrwxr-x 13 dave dave 4096 2011-10-25 09:15 1.2.188
lrwxrwxrwx  1 dave dave   20 2011-11-14 09:20 Documents -> /home/dave/Documents
dave@SNECCI:~$ ls -l .config/DraftSight/1.2.188/
total 48
drwxrwxr-x  2 dave dave 4096 2011-10-25 09:14 Alias
drwxrwxr-x  2 dave dave 4096 2011-10-25 09:14 Fonts
-rw-rw-r--  1 dave dave  360 2011-11-14 09:36 history.txt
drwxrwxr-x  2 dave dave 4096 2011-10-25 09:14 Linestyles
drwxrwxr-x  2 dave dave 4096 2011-10-25 09:21 Print Settings
drwxrwxr-x  2 dave dave 4096 2011-10-25 09:14 Print Styles
drwxrwxr-x  3 dave dave 4096 2011-10-25 09:14 Profiles
drwxrwxr-x  2 dave dave 4096 2011-10-25 09:14 RichLine Styles
drwxrwxr-x  2 dave dave 4096 2011-10-25 09:14 Support
drwxrwxr-x  2 dave dave 4096 2011-10-25 09:14 Template
drwxrwxr-x 15 dave dave 4096 2011-10-25 09:14 UI
drwxrwxr-x  2 dave dave 4096 2011-11-14 09:36 Workspace
dave@SNECCI:~$ ls -l .config/DraftSight/1.2.188/Workspace/
total 4
-rw-rw-r-- 1 dave dave 2213 2011-11-14 09:36 Classic Default.xml
 
Old 08-11-2018, 07:35 AM   #12
eckirchn
LQ Newbie
 
Registered: Feb 2010
Location: Colorado
Distribution: Fedora
Posts: 17

Rep: Reputation: 1
Fedora 27 and Root

Under Fedora 27 I can't get this to run without root privileges, under Unbuntu 17.10 it seems to run fine as a normal user. There aren't many current threads on this topic.
 
Old 08-11-2018, 10:25 AM   #13
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,750

Rep: Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222
Quote:
Originally Posted by eckirchn View Post
Under Fedora 27 I can't get this to run without root privileges, under Unbuntu 17.10 it seems to run fine as a normal user. There aren't many current threads on this topic.
Including this one...this is not a "current thread"...it's 6 years old!

Suggest you start a new thread with a detailed description of the problem you're having.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Firefox Only Runs as root athomas Linux - Software 13 04-24-2012 10:34 PM
Two scripts, one runs with the other only runs as root halfpower Slackware 8 04-11-2009 04:05 PM
Code runs as root? neo_in_matrix Programming 5 06-08-2005 09:38 PM
KDEVELOP 3.1 installed but still runs 3.0 jonty_11 Programming 4 10-02-2004 03:19 PM
x only runs in root Bigfut Red Hat 1 08-19-2004 02:43 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:26 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration