LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-24-2009, 03:50 AM   #1
SpuriousQ
LQ Newbie
 
Registered: Nov 2008
Posts: 2

Rep: Reputation: 0
root permissions on different files and shells and rpm's and everything.


Hi to all!

One of the most frustrating thing on Linux is the amount of time wasted in order to do simple tasks. I, for instance, I'm use to the simple work with windows, -installing everything within the reach of a double click (how wonderful)- and now I have found out that I need to read lots of tutorials and forums to execute simple tasks.
For example:
I want to install Mathematica on Fedora 11. I have the cd and I have allocated the file (/home/media/L/Unix/Installer. Of course, I can't do the "double click thing" so I have to open a terminal. I have something like this:

"[spurious@machinename L]$" (without the quotes)

so, I want to install Mathematica. On Mathematica site, they tell me I need to type ./MathInstaller. ok... I do this:
Asumming I have entered the correct file
"[User@machinename L]$ /file1/file2/file3/..../filen ./MathInstaller"

I arrive to something like:

"Enter the installation directory, or press ENTER to select
/usr/local/Wolfram/Mathematica/7.1"

I press, of course, ENTER, and I get this:

">Error: Cannot create directory /usr/local/WolframL/Mathematica/7.1.
You may need to be logged in as root to continue with this installation.
>"
Well, once you've arrived to the terrible, infamous ">" sign (which means you can not do anything except closing the terminal) I start again...
However, as smart as I am, I start everything from "root"... I go like:
"[spurious@machinename L]$su -
Passwordnothing to see but you type your password)"
and you received something like:
"[root@machinename ~]#"
(which is good because now you have permission to do something)
This is when you start wondering if moving to linux is a good idea, since, (remember, you want to install Mathematica) you have spent a lot of time trying to do a simple task that you can accomplish with a "double click"... But I'm stubborn, I'm determine to be able to do a simple task... so, I think in possibilities: I will start the more simple way:
"[root@machinename ~]# ./MathInstaller"
This is the logical way, isn' it? Alas!, no... you get a solution like this:
"[root@machinename ~]#there is no file or directory"
Well,it wasn't that simple... c'mon, you are not within the reach of the installer... Machines are not yet that bright... so, I try to move to that file... that's easy, right? you just type cd and the path of your file... even more, you can save a lot of typing with "~" thing... so, you type:
"[root@machinename ~]# cd ~/media/L/Unix/Installer/ "
It seems right, right?... I mean, that's the path... but... (this is the exact moment that Hansel & Gretel start coming back from memories)... no,no,nonono... you get this response:
"-bash: cd: /root/media/L: No such file or directory..."

yikes! Let's try a different way... hmmm. Of course, you type exit... and start again... I mean, I open another terminal, move to the directory of the file I want to install... and I type the following:

"[spurious@machinename L/Unix/Installer]$ sudo ./MathInstaller"
And you get this:
"[sudo] password for Spurious:
(you type root password]
Sorry, try again
[sudo] password for Spurious:
(you type Spurious password)
Spurious is not in the sudoers file. This incident will be reported"

SoooOOOoo... not only I haven't been able to perform a simple task, but, I will be reported!!! To whom?... to me? I'm the only one that uses this machine, My Machine!

So... having explained my problems, I have two questions:

how do I install something that is not in the repositories?
how can I put myself in the sudoers list so I can be able to install something, since root and user are me and myself.

greetings!
 
Old 07-24-2009, 04:29 AM   #2
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978
Hi and welcome to LQ!

Well, you were almost there, except that when you use cd to change to the installation directory, you used ~ which expanded to the root's home, that is /root. Use the full path instead: cd /home/spurious/media/L/Unix/Installer/ or even cd ~spurious/media/L/Unix/Installer/ where ~spurious expands to user spurious' home.
Quote:
Originally Posted by SpuriousQ View Post
how do I install something that is not in the repositories?
By reading instructions on how to do that. Mathematica comes with its own binary installer which should take care of the installing process, whereas other software must be compiled from source. Usually you download them in .tar.gz format (compressed archive), extract it, cd to the extracted directory and read installation instructions in a file called INSTALL.

Last edited by colucix; 07-24-2009 at 11:52 AM. Reason: removed faulty answer
 
Old 07-24-2009, 04:47 AM   #3
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,465

Rep: Reputation: Disabled
Dear Spurious,
One of the most frustrating experiences in helping newbie users is a letter like yours. Taking the time to learn a little about the system you have decided to use will save you hours, days weeks of the frustration you are feeling now. That said, let's get to a few simple points. The folder /home/spurious and everything it contains (all the file and subfolders) are yours. You don't need to be root or use sudo or do anything fancy (just like on your former OS). However, everything else is not yours. You need permission to mess with it.

So you want to install mathematica. Fine. Let's get on with it. You say, "I have allocated the file (/home/media/L/Unix/Installer." I'm not sure what that means but I guess you downloaded the installation file to the folder /home/media/L/Unix/. Not a particularly good choice but let's move on. Then you say, that you ran the install program (as yourself not root) and it responded with
Quote:
"Enter the installation directory, or press ENTER to select
/usr/local/Wolfram/Mathematica/7.1
So it is proposing to install Mathematica to that folder and wants to know if that's ok. Notice that is NOT in your home folder so automatically you know you must be root to do it. (to write anything to a folder not in or under your home folder).

Quote:
I press, of course, ENTER, and I get this:

">Error: Cannot create directory /usr/local/WolframL/Mathematica/7.1.
You may need to be logged in as root to continue with this installation.
>"
Of course you did, you're not root and you just asked to install the program to /usr/local/... where you need to be root.
So you do the whole thing again this time as root. End of problem.

As to your next problem, your whinging is starting to get annoying so I'll be brief.
Where exactly is the installation file located????
I thought you put it in /home/media/L/Unix/Installer. If you are root and you type ~ in front of a path, the system thinks you mean /root/media/L/Unix/ so of course it won't find it. When you're root you'll need to either
a. navigate to the folder where the install file is and type
Code:
./install_file_name
b. type the entire correct path starting with /home/media/...

Here endeth the lesson. I'll let someone else with more patience and a better temper continue. You might think about an attitude adjustment in the meantime.
jdk

Last edited by jdkaye; 07-24-2009 at 04:51 AM.
 
Old 07-24-2009, 10:05 AM   #4
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: SlackwareŽ
Posts: 12,892
Blog Entries: 27

Rep: Reputation: 2183Reputation: 2183Reputation: 2183Reputation: 2183Reputation: 2183Reputation: 2183Reputation: 2183Reputation: 2183Reputation: 2183Reputation: 2183Reputation: 2183
Hi,

Welcome to LQ!

You do have some responsibility to gain some understanding so as to perform tasks. Be it for M$ or GNU/Linux you should get some background to perform. Someone had to teach you about 'double-clicking'.

'Linux Newbie Admin Guide' would be a good start.

BTW, I agree that you should try a little attitude adjustment. The problem is not GNU/Linux but your lack of not preparing yourself to use it. Somewhere in your M$ experience at the start you had to read or be directed to perform some actions or did you take that little yellow M$ pill.

The above link and others available from 'Slackware-Links'. More than just SlackwareŽ links!
 
Old 07-24-2009, 10:21 AM   #5
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,361
Blog Entries: 55

Rep: Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547
// Sudo was created for allowing granular control over which command a user can run under other users privileges. When talking deliberate subversion of DAC rights and "proper" solutions it is always good to (respectfully) challenge the user. After all what a user says he wants does not necessarily correlate with reality...

Last edited by unSpawn; 07-24-2009 at 11:22 AM. Reason: // Because I Can
 
Old 07-25-2009, 07:18 PM   #6
SpuriousQ
LQ Newbie
 
Registered: Nov 2008
Posts: 2

Original Poster
Rep: Reputation: 0
First of all: Thank you all for your kind patience. (I was just whining after searching for hours for a solution for my problem (yes, I know how to google and wiki and all...)). Indeed, you are absolutely right about gathering the proper information before starting to manipulate something. Being used to Windows for long long time so I have forgotten everything on DOS commands, so you can figure very easily how difficult is to comeback from a graphical environment to a text one.
I have read some things on Linux (e.g. Linux for Dummies) but most I have learned from this kind of forums. As a newbie (and as a teacher) I know that proper answers come from proper questions... but the most difficult thing is to learn how to ask the proper questions (a good question has in itself its own answer) so I also know that frustration arises when you don't know the "lingo"... (try to explain "red" to a blind man). A great example is the following post (on fedora forum) http://forums.fedoraforum.org/showth...external+media, where there is a lot of clarification needed. I knew exactly what the question was about (being newbie) but for the experts was not properly made (or precise enough).
Now I know (thanks to you) that the page "Linux command guide" and "Linux newbie Admin guide" is what I was searching for... (command guide and Admin guide didn't mean anything to me).
 
Old 07-25-2009, 08:48 PM   #7
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.9, Centos 7.3
Posts: 17,411

Rep: Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397
This is a really good tutorial/guide: http://rute.2038bug.com/index.html.gz
Just hang in there and you'll get it. Nobody was born knowing MS or any other computer OS.

Just FYI, '~' means the home dir of whichever user you are or specify.
A good rule when on the cmd line is to do

pwd

(print working dir) ie where am I now?
Also remember Linux is case sensitive by default.
As mentioned, there is a strict distinction in Linux between users, and particularly normal users and root.
Better security, just requires a little more planning up front when deciding how to do stuff, especially installs.

Welcome to LQ
 
Old 07-26-2009, 09:11 AM   #8
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: SlackwareŽ
Posts: 12,892
Blog Entries: 27

Rep: Reputation: 2183Reputation: 2183Reputation: 2183Reputation: 2183Reputation: 2183Reputation: 2183Reputation: 2183Reputation: 2183Reputation: 2183Reputation: 2183Reputation: 2183
Hi,

Quote:
Originally Posted by SpuriousQ View Post
First of all: Thank you all for your kind patience. (I was just whining after searching for hours for a solution for my problem (yes, I know how to google and wiki and all...)). Indeed, you are absolutely right about gathering the proper information before starting to manipulate something. Being used to Windows for long long time so I have forgotten everything on DOS commands, so you can figure very easily how difficult is to comeback from a graphical environment to a text one.<snip>
That's the problem with GUI. Too many people fall into the trap of allowing others to do the work for them and not realizing the full impact. Experience and exposure will aid you in the end. Sure, I too use a GUI at times but I use the 'cli' most of the time. The more you use the 'GUI' then you too will fall into that trap again.

Explicit statements in language are the same in a OS by association since you must understand the proper syntax in order to perform the statement correctly. You would not use the word 'no' when 'not' is necessary.

Just a few more links to aid you;

Linux Documentation Project
Rute Tutorial & Exposition
Linux Command Guide
LinuxSelfHelp
Getting Started with Linux

These links and others can be found at 'Slackware-Links' . More than just SlackwareŽ links!
 
  


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
how to install binary files and rpm's 5m1 Linux - Newbie 4 02-04-2009 08:06 AM
why file permissions in /dev/ files reset to root after every reboot engekay69 Linux - Newbie 2 04-16-2008 01:23 PM
chown and/or chmod to restore permissions on files moved from another drive by root. Shay Linux - General 4 04-12-2007 09:47 AM
Copying files as root without changing permissions BillyGalbreath Linux - General 3 12-28-2005 09:39 AM
other linux files converted to .rpm's Troubledyouth Linux - Software 7 05-23-2005 11:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:22 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration