LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   root permissions on different files and shells and rpm's and everything. (https://www.linuxquestions.org/questions/linux-newbie-8/root-permissions-on-different-files-and-shells-and-rpms-and-everything-742414/)

SpuriousQ 07-24-2009 02:50 AM

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 -
Password:(nothing 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!

colucix 07-24-2009 03:29 AM

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 (Post 3618569)
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.

jdkaye 07-24-2009 03:47 AM

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

onebuck 07-24-2009 09:05 AM

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!

unSpawn 07-24-2009 09:21 AM

// 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...

SpuriousQ 07-25-2009 06:18 PM

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).

chrism01 07-25-2009 07:48 PM

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
:)

onebuck 07-26-2009 08:11 AM

Hi,

Quote:

Originally Posted by SpuriousQ (Post 3620272)
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!


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