Quantcast

Maximum PC

It is currently Mon May 20, 2013 1:13 am

All times are UTC - 8 hours




Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject: Root, bad or good?
PostPosted: Sun Jul 18, 2004 6:27 am 
Max [Ph]otographer
Max [Ph]otographer
User avatar

Joined: Mon Jun 28, 2004 4:10 pm
Posts: 5200
Hey all. I'm starting to get very frustrated very fast with Linux for one simple reason: "Permission Denied."

Everywhere I go, people say "Don't use root or you'll fubar your hard drive" or somthing similar. So, I created a new user a few weeks ago, but now I have one big problem, I don't have access to a freaking thing.

I just tried to add a plugin to Mozilla. Permission Denied. Damnit, I want the freedom to add or change any damn thing I damn well please!

I also can't use a large quantity of music on one of my HDDs because, permission denied. Furthermore, I can't edit any of the system scripts, which it seems that changing or adding anything to linux involves editing scripts, because that's right, permission denied. I can't even watch a movie because this user doesn't even have access to the DVD-Rom.

Now, I know there are ways to fix this all, but frankly, I don't feel like spending the next week configuring every damn permission so that my stupid other user can access them.

Now, can someone tell me why I must continue without using root?

PO'ed
Dan O.


Top
  Profile  
 
 Post subject: Re: Root, bad or good?
PostPosted: Sun Jul 18, 2004 8:08 am 
Bitchin' Fast 3D Z8000
Bitchin' Fast 3D Z8000
User avatar

Joined: Sat Jun 19, 2004 2:28 pm
Posts: 52
If you need to do something just use "su" sans quotes. typed by when just typed "su" it defaults to the root account and you just need to supply a password. you can also use it to get in to other accts "su brian" "su wheel" etc and so on. You can also configure sudo to allow you to run certain root commands on from user accts.


Top
  Profile  
 
 Post subject: Re: Root, bad or good?
PostPosted: Sun Jul 18, 2004 8:19 am 
Bitchin' Fast 3D Z8000
Bitchin' Fast 3D Z8000
User avatar

Joined: Sat Jun 19, 2004 2:28 pm
Posts: 52
Far as you permission issue go my guess the files are in the /root folder?

just su in to root and move them to your users home then run
"chown -R <username>:<user_group> <directory_with stuff>"

the "-R" tells it to be recursive so it starts in the directory the it goes in and hits all the fileswith in.

other uses of chown
"chown <username> <filename>"

Far as the DVD goes you can either add its group to your user or change the group on it to your users group. YMMV on this one.


Top
  Profile  
 
 Post subject:
PostPosted: Sun Jul 18, 2004 8:36 am 
Max [Ph]otographer
Max [Ph]otographer
User avatar

Joined: Mon Jun 28, 2004 4:10 pm
Posts: 5200
Okay, I know about su and chown and all that. The problem is that alot of the stuff I'm trying to do is from apps I can't waste time finding the command line for, so su doesn't work.

Take, for example this one. I have an Nforce agp, so I use the Alsa mixer to adjust the volume controls. For some reason, just about everything is turned up to 50%, (I might have done that in root). But now I'm in my other user, and when I load alsamixer, it says that it can't access the settings. I can change the volumes for this session, but once I restart the session (even logging out and back in will do this) the volumes all go back to where they came from. I tried "su" and then "alsactl store" but it still didn't work, because I believe it saved root's volumes, not mine.

It's not that I can't fix the permissions, it's the fact that just about every damn thing in Linux requires permission from root. I can't be fixing every ****ing permission every time I want to do something, I just want to do it.

I think that about 10-20% of my time in Linux has been spent ****ing around with permisions.

Sorry, but I'm a bit PO'ed right now at the whole thing. Why can't I just give my user admistrator capabilties like I could in WinXP? I feel as though I'm on a limited account.

Dan O.


Top
  Profile  
 
 Post subject:
PostPosted: Sun Jul 18, 2004 9:17 am 
Bitchin' Fast 3D Z8000
Bitchin' Fast 3D Z8000
User avatar

Joined: Wed Jun 16, 2004 5:29 pm
Posts: 6316
Location: Far away from you
Yea...it's not exactly the kindest thing around..,in that aspect

One thing you can do is launch mozilla from a command prompt after going through su.


Top
  Profile  
 
 Post subject:
PostPosted: Sun Jul 18, 2004 12:53 pm 
Maximum PC Editor
Maximum PC Editor
User avatar

Joined: Tue May 25, 2004 1:13 pm
Posts: 2308
This doesn't help you very much now, but I think the reason you're having problems is that you initially set everything up as root and are now trying to use all that stuff as a user. I setup everything using my user account (su-ing as necessary), and I haven't had any permissions problems to speak of.

I only install stuff to /usr/local or my home directory, and store everything I need in my home directory.

I had a spot of trouble with some network shares, but then I figured out how to set them to my user's group.


Top
  Profile  
 
 Post subject:
PostPosted: Sun Jul 18, 2004 1:05 pm 
Bitchin' Fast 3D Z8000
Bitchin' Fast 3D Z8000
User avatar

Joined: Sat Jun 19, 2004 2:28 pm
Posts: 52
Belboz99 wrote:
Okay, I know about su and chown and all that. The problem is that alot of the stuff I'm trying to do is from apps I can't waste time finding the command line for, so su doesn't work.
....


like somew one said you can launch it from the console.

the apps I use tend to use the same name as the binary

another way is to log as root run the app and look at "ps aux" and see what is executed.

generally speaking I su mostly when I complie stuff and need to do "make install"

thought I do most configuring with su then vi :)

Just be patiant it will work out.


Top
  Profile  
 
 Post subject: Re: Root, bad or good?
PostPosted: Tue Jul 20, 2004 11:19 am 
Coppermine
Coppermine

Joined: Wed Jul 07, 2004 11:07 am
Posts: 664
Location: Woodland Hills, CA
Belboz99 wrote:
Hey all. I'm starting to get very frustrated very fast with Linux for one simple reason: "Permission Denied."


The classic permissions lesson.

Ok, its simple.

Do an 'ls -l'

This will show you a lot.

here is a sample...

-rw-r--r-- 1 ken metavers 22330 Jul 12 14:02 slash1.jpg
drwxr-xr-x 4 ken metavers 4096 Mar 6 19:15 sandbox

As far as a file is concerned, there are 3 (4 if you count root) types of users it recognizes: the owner, a group, and the world.

The 1st column (startiung from the left) are your permissions.
a 'd' in the leftmost space denotes that it is a directory. a '-' means it is a regular file.

Now the next THREE letters are permissions for the owner (who is 'ken' in this case). Ken has read/write permissions for slash1.jpg (rw-) the dash in ('rw-') is a placeholder for EXECUTE permissions, which slash1.jpg does not have. The next three characters (r--) means that the group (metavers) has read permissions only, notice that there are two dashes in place of write and execute. The last three (r-- again) are for the WORLD. r-- in the third set of permissions say that ANYONE can read the file.

So, now that we have that out of the way. Depending on your distro, a GNU/Linux System probably defaults to a fairly secure set up (unlike MS, and you can see the problems they have due to rampant root permissions). So, since I am assuming you are fairly intimate with the hardware you have, you should know that IO devices interact with the user space through /dev (mostly). So, since alsamixer is the program that controls the mixer on your soundcard, you should probably play with the corresponding /dev file.

In my case, the dev file is /dev/sound/mixer

if i do an 'ls -la' on that...I get...
crw-rw---- 1 root audio 14, 0 Dec 31 1969 mixer

The c in this case means it is a character device. The owner of the file is root.
If you notice root has read and write permission to the mixer. You'll also notice that there is a group called audio that has read and write permissions. You can do a couple of things here, you can change the permissions to rw for the world, which means ANYONE can play with the mixer, or you can add yourself to the audio group. to add yourself to a group, you probably want to look for /etc/group and edit it.

Ok, thus endeth the lesson. You can extend this idea to all other devices that you are having problems with.

As far as directories and files...
man chmod

You don't have to change this stuff all at once. WHen you encounter a permissions problem, just find it and fix it once and for all.


Top
  Profile  
 
 Post subject:
PostPosted: Wed Jul 21, 2004 1:55 pm 
Coppermine
Coppermine
User avatar

Joined: Sat Jul 17, 2004 3:29 am
Posts: 637
Location: MA
I was going to say the same thing as WillSmith...you must have initially set up the filesystem incorrectly, or installed everything as ROOT.... As the others before me have already eluded to, you will need to change file permissions..seems tedious, but once it is done, you shouldn't have to mess with it again.


Top
  Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group