LinuxQuestions.org
Help answer threads with 0 replies.
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 12-04-2004, 10:39 PM   #16
Ninja Cow
Member
 
Registered: May 2003
Location: Pensacola, Florida
Distribution: Debian, Slackware, Amigo, Ubuntu
Posts: 221

Rep: Reputation: 30

Yeah. Behold Linux's security. =)

Most files can only be edited by root. su - will allow you to edit any files that your user cannot touch.

Any files in your user's directory must be owned by the user before said user can edit them.

You can fix this by doing...

chown [user] [file]

...as root.
 
Old 12-04-2004, 11:12 PM   #17
Gag Halfrunt
LQ Newbie
 
Registered: Nov 2004
Distribution: Mandrake/Knoppix
Posts: 24

Rep: Reputation: 15
Does that "chown" command add [user] to the list of users able to access the file, or change it so only they can?

i.e., if JOE owns file.txt, ROOT enters "chown JANE file.txt"

Can JOE still edit file.txt, or is it now JANE's file? Is there a way to let both of them edit it, but not anyone else?
 
Old 12-04-2004, 11:14 PM   #18
ror
Member
 
Registered: May 2004
Distribution: Ubuntu
Posts: 583

Rep: Reputation: 33
chown is change ownership, jane would then own the file, as though they always have owned and always will own the file.

If you want certain people to be able to read/write a file then use groups.
 
Old 12-05-2004, 01:10 AM   #19
DreameR-X
Member
 
Registered: Dec 2004
Location: New York
Distribution: Slackware
Posts: 154

Original Poster
Rep: Reputation: 30
So although root is more dangerous...being a user is a LOT more of a pain-in-the-ass. Almost uneccessarily if I am correct. Couldn't you just close the loose-ends in the security issue w/ root?
-Galen
 
Old 12-05-2004, 01:34 AM   #20
Ninja Cow
Member
 
Registered: May 2003
Location: Pensacola, Florida
Distribution: Debian, Slackware, Amigo, Ubuntu
Posts: 221

Rep: Reputation: 30
How is it a pain in the ass being a user? Since you have the root password you can become root anytime you wish!

Like I said, use su - at the command line. You will then have root power.
 
Old 12-05-2004, 02:37 AM   #21
DeadPenguin
Member
 
Registered: Nov 2004
Location: Delaware
Distribution: Slackware
Posts: 351

Rep: Reputation: 30
It's better to be a user and su to root when you need to get something done.

If you are root all the time you are asking for trouble. I am a newb and had to learn the hard way. I made a typing mistake as root and deleted some things I didn't want to delete.
just my .02.
-Blair
 
Old 12-05-2004, 03:21 AM   #22
DreameR-X
Member
 
Registered: Dec 2004
Location: New York
Distribution: Slackware
Posts: 154

Original Poster
Rep: Reputation: 30
Yea I did that the first day...I moved a 'usr' folder from one package to my 'usr' directory and thought replace was like the Windows replace, which means it jsut adds the stuff missing...but NOOO it deletes the whole USR folder and replaces it w/ a new folder that has the package files ONLY. weak. hehe. But I didnt mean just admin privelages...I mean, as user I could barely even open regular programs,etc. they were all locked. Any advice would be awesome!
-Galen
 
Old 12-08-2004, 12:27 AM   #23
bigjohn
Senior Member
 
Registered: Jun 2002
Location: UK .
Distribution: *buntu (usually Kubuntu)
Posts: 2,682
Blog Entries: 9

Rep: Reputation: 45
Well really, you'd have to look around and find out if there's a basic set of "things" that you'd normally need access to, to be able to "get on".

The whole principal of linux is the same (well pretty much) as unix. That's why linux is described as "unix like" or "desktop unix".

We are all aware that it's quite a bit more than that, but if you've had mainly experience of W98 and similar, then you've not so much been spoiled, but ruined. IT habits wise that is, because it's only been since xp (or NT as a commerical user - don't know about Me so ??) that you've started to have similar protections i.e. with XP home, when you install or just basic setup you'd automatically have root priviledges, whereas if you'd done a multi user setup, then the admin account has the root priviledges, and the user account can only do "user stuff".

So, you'd have to find out about whether there's a list of suggested stuff that you'd need to have access to, to work/play as user. It sort of becomes second nature after a while.

For instance, the gentoo docs suggest that when setting up user accounts, you do
Quote:
# useradd -m -G users,wheel,audio -s /bin/bash john
for an account for the user "john".

Don't follow the last bit (/bin/bash) someone might be able to explain that bit, and the -m -G bit's should be in the man page, but the other bit is saying to put user john into groups users, wheel and audio, users and audio are self explainatory, the wheel bit, thats important because without that, you can't do "su" commands.

If you open the editor you like and look at /etc/group, you should see the list of stuff that the users (user and root) can use and that some processes need to get access to as well.

Sorry if that doesn't seem to make sense, it does to me, but having reread it, I can't think of any clearer way to explain it.

regards

John
 
  


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
A few newb questions Abbaddon Linux - Newbie 6 09-14-2004 06:26 AM
Some general linux newb questions Levitate Linux - Newbie 3 08-05-2004 11:40 AM
Just some newb questions testament Linux - Newbie 15 07-04-2004 12:52 PM
Newb questions regarding USB, modem, and general FC1 Linux help LaptopLinux Linux - Newbie 2 05-31-2004 01:44 PM
Some General Linux Newb Questions hadding Programming 1 11-05-2003 07:47 PM


All times are GMT -5. The time now is 10:25 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