LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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, 11:31 AM   #1
cov
Member
 
Registered: Apr 2005
Location: Durban
Posts: 382

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, 12:13 PM   #2
sgosnell
Member
 
Registered: Jan 2008
Location: Baja Oklahoma
Distribution: Debian
Posts: 427

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

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

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

Original Poster
Rep: Reputation: 30
Damn.

Still having this problem.

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

Rep: Reputation: 309Reputation: 309Reputation: 309Reputation: 309
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 12:04 PM.
 
Old 01-18-2012, 12:12 PM   #6
business_kid
Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 6,624

Rep: Reputation: 585Reputation: 585Reputation: 585Reputation: 585Reputation: 585Reputation: 585
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, 12:39 PM   #7
cov
Member
 
Registered: Apr 2005
Location: Durban
Posts: 382

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, 12:46 PM   #8
DavidMcCann
Senior Member
 
Registered: Jul 2006
Location: London
Distribution: CentOS, Salix
Posts: 3,228

Rep: Reputation: 825Reputation: 825Reputation: 825Reputation: 825Reputation: 825Reputation: 825Reputation: 825
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, 03:52 PM   #9
cov
Member
 
Registered: Apr 2005
Location: Durban
Posts: 382

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, 06:34 PM   #10
eSelix
Senior Member
 
Registered: Oct 2009
Location: Wroclaw, Poland
Distribution: Arch, Kubuntu
Posts: 1,246

Rep: Reputation: 309Reputation: 309Reputation: 309Reputation: 309
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 06:39 PM.
 
Old 01-19-2012, 01:08 AM   #11
cov
Member
 
Registered: Apr 2005
Location: Durban
Posts: 382

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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 11:34 PM
Two scripts, one runs with the other only runs as root halfpower Slackware 8 04-11-2009 05:05 PM
Code runs as root? neo_in_matrix Programming 5 06-08-2005 10:38 PM
KDEVELOP 3.1 installed but still runs 3.0 jonty_11 Programming 4 10-02-2004 04:19 PM
x only runs in root Bigfut Red Hat 1 08-19-2004 03:43 AM


All times are GMT -5. The time now is 05:25 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration