LinuxQuestions.org
Help answer threads with 0 replies.
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
 
LinkBack Search this Thread
Old 09-26-2011, 08:22 AM   #1
anjanu
LQ Newbie
 
Registered: Mar 2009
Location: New Delhi
Distribution: Fedora
Posts: 15

Rep: Reputation: 0
Cannot access software installed in /opt/ directory...why?


I was trying to install QtSDK in /opt/ directory by logging in as a normal user then launching the installer through terminal as root...but since the installer is a GUI installer so it game me an error: Problem elevating the user privilege...or some thing...

So, I then finally logged in as root (GUI) and launched the installer through GUI an installed it in /opt/QtSDK directory...and was able to launch in as root.

but by logging as normal user...I cannot launch the program...it gives me an error:Failed to change to directory '/root' (Permission denied)

i tried chmod 777 /opt/QtSDK and also chmod 777 /opt/ as root but still doesn't work...
 
Old 09-26-2011, 09:12 AM   #2
jdkaye
Senior Member
 
Registered: Dec 2008
Location: Gorizia, Italy
Distribution: Debian Testing Amd64
Posts: 2,776

Rep: Reputation: Disabled
you can try using gksu or gksudo followed by the name of the GUI installer. That might work.
ciao,
jdk
 
Old 09-26-2011, 10:13 AM   #3
anjanu
LQ Newbie
 
Registered: Mar 2009
Location: New Delhi
Distribution: Fedora
Posts: 15

Original Poster
Rep: Reputation: 0
those command dont work...I think they are specific to Debian builds...I am using Scientific Linux 6 which is an Red Hat build
 
Old 09-26-2011, 10:20 AM   #4
sundialsvcs
Senior Member
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 3,685

Rep: Reputation: 330Reputation: 330Reputation: 330Reputation: 330
You must have read/write access to the location where you intend to install the software, and that location must be listed in your $PATH.

In most systems, the /usr/local directory is set aside for software that you have installed "locally," and it is good practice to create a non-rootly "maintenance user" that has read/write access to that location expressly for the purpose of doing local software installation and maintenance.

For a variety of reasons that we need not go into here, it's a good idea to use this "well-known location" for this purpose, if you are given a choice in the matter.

Some installer-packages allow you to designate where the software is to be installed; others do not. Therefore, some installer packages pragmatically must be run as root.
 
1 members found this post helpful.
Old 09-27-2011, 01:34 PM   #5
anjanu
LQ Newbie
 
Registered: Mar 2009
Location: New Delhi
Distribution: Fedora
Posts: 15

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by sundialsvcs View Post
You must have read/write access to the location where you intend to install the software, and that location must be listed in your $PATH.

In most systems, the /usr/local directory is set aside for software that you have installed "locally," and it is good practice to create a non-rootly "maintenance user" that has read/write access to that location expressly for the purpose of doing local software installation and maintenance.

For a variety of reasons that we need not go into here, it's a good idea to use this "well-known location" for this purpose, if you are given a choice in the matter.

Some installer-packages allow you to designate where the software is to be installed; others do not. Therefore, some installer packages pragmatically must be run as root.
Ok I did this
chmod 777 /opt/QtSDK/, as root to allow read write and execute permission for all users
and
PATH=$PATH:/opt/QtSDK/, to add the location to my PATH
export PATH

but still same error...please tell in some detail
 
Old 09-27-2011, 08:30 PM   #6
frankbell
Senior Member
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Debian
Posts: 3,753

Rep: Reputation: 637Reputation: 637Reputation: 637Reputation: 637Reputation: 637Reputation: 637
What are the permissions on the QtSDK executable itself?
 
Old 09-28-2011, 01:05 AM   #7
anjanu
LQ Newbie
 
Registered: Mar 2009
Location: New Delhi
Distribution: Fedora
Posts: 15

Original Poster
Rep: Reputation: 0
I did chmod -R 777 /QtSDK as root to allow rwx permission for all users
but still same error.

I was able to launch SDK Updater (even before) and when I click update it downloads all the files and asks for root password,
but when I enter the password it fails again with the same error after long pause.
 
Old 09-28-2011, 04:51 AM   #8
snooly
Member
 
Registered: Sep 2011
Posts: 124

Rep: Reputation: Disabled
You really shouldn't just go around doing "chmod 777" on stuff. You are allowing anybody who gets access to the machine to make any changes they want there. A malicious user can cause you a lot of trouble.

This error looks like the problem: Failed to change to directory '/root' (Permission denied).

The user you are running as can't change to the directory /root, because that directory is normally only readable by the root user. I am certainly not suggesting that you change the permissions on the /root directory.

You need to somehow figure out why it is trying to change directory to /root. Maybe it's because you installed the software as root, and it thinks that /root must be your home directory.

The install instructions don't look very helpful: http://doc.qt.nokia.com/sdk-1.1/sdk-installing.html
 
  


Reply

Tags
chmod


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Newbie as they come and how do I get an ansic directory to appear in /opt hpux2Linux Linux - Newbie 6 07-14-2009 04:00 PM
Use of the /opt directory - Suse 9.2 swamprat Linux - Software 2 02-17-2006 03:42 PM
regarding /opt directory... zameer_india Linux - Newbie 2 01-19-2005 12:48 AM
OPT INITRD Directory Purpose(s)? Needed? Outabux Debian 1 10-05-2004 10:41 PM
Installed newer mandrake, but /home directory doesn't have write access anymore?!? repeater75 Mandriva 2 02-19-2004 08:48 PM


All times are GMT -5. The time now is 12:02 PM.

Main Menu
 
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
Open Source Consulting | Domain Registration