LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 05-29-2004, 12:42 AM   #1
SciYro
Senior Member
 
Registered: Oct 2003
Location: hopefully not here
Distribution: Gentoo
Posts: 2,038

Rep: Reputation: 51
chmod like programs


how far can chmod reach?

what i mean exactly is suppose someone is logged in as... user1

can user1 use chmod to change the permissions/ownership of a file owned by user2 ? (user1 and user2 are in different groups)

and what is user1 was the root user?, does that change anything?

(i need to know to properly set up my linux laptop with good permission settings.. but right now theres a program so the laptop wont boot up.. (just my luck)
 
Old 05-29-2004, 04:46 AM   #2
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
Only root can chmod or chown files owned by other users. Normal users can't even chown their own files (just chmod them).
 
Old 05-29-2004, 05:23 AM   #3
Poetics
Senior Member
 
Registered: Jun 2003
Location: California
Distribution: Slackware
Posts: 1,181

Rep: Reputation: 49
And users can only chgroup files to which they belong to both the beginning and ending groups for.
 
Old 05-29-2004, 08:06 AM   #4
SciYro
Senior Member
 
Registered: Oct 2003
Location: hopefully not here
Distribution: Gentoo
Posts: 2,038

Original Poster
Rep: Reputation: 51
OK, how about we assume that any user can use chmod/chown ? (the reason i want to know is that i want to split up the "root" users power into multiple users, and i need to have it so that each user can chmod/chown files they own (change it so a new user owns it, new group, or just simple permissions)
 
Old 05-29-2004, 07:32 PM   #5
darthtux
Senior Member
 
Registered: Dec 2001
Location: 35.7480° N, 95.3690° W
Distribution: Debian, Gentoo, Red Hat, Solaris
Posts: 2,070

Rep: Reputation: 47
Anyone with root priviledges can chown/chown any file they want. sudo is a program to give users root priviledges for the entire system or only certain commands. You could set it up so users could just use chmod/chown as root. This would be a security risk since they could change ownership/permissions for any file they had access to meaning most files on the system.

I don't think there is a way to do what you are asking.
 
Old 05-30-2004, 09:41 AM   #6
SciYro
Senior Member
 
Registered: Oct 2003
Location: hopefully not here
Distribution: Gentoo
Posts: 2,038

Original Poster
Rep: Reputation: 51
so then i guess i should try and find a patch to delete the "root" user and just use regular users with correct permission settings

anyone know of any?
 
Old 05-30-2004, 11:59 AM   #7
darthtux
Senior Member
 
Registered: Dec 2001
Location: 35.7480° N, 95.3690° W
Distribution: Debian, Gentoo, Red Hat, Solaris
Posts: 2,070

Rep: Reputation: 47
SciYro, I don't understand where you're coming from. How do you think the system will function without a root user? Who do you think is going to own system files?

Why would you want a user to be able to change permissions on a file owned by another user? Then there would be no security.

Just use su or sudo
man su
man sudo
 
Old 05-31-2004, 06:27 AM   #8
SciYro
Senior Member
 
Registered: Oct 2003
Location: hopefully not here
Distribution: Gentoo
Posts: 2,038

Original Poster
Rep: Reputation: 51
darthtux: what i need is so that every user can change the permissions only for files they own/ have permission to change permissions

and not having a root user would make the system less crowded as regular users with restricted permissions (one your to handle /dev one to handle kernel stuff, one for compiling, one for X config's, one for normal user use, one for firewall, etc) .. so that each user can only do so little

i find the thought of a user (root) being able to access files they don't own or have permission to own kinda securityless (at least on a single/some user laptop/desktop)
 
Old 05-31-2004, 06:38 AM   #9
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Debian Testing
Posts: 19,192
Blog Entries: 4

Rep: Reputation: 475Reputation: 475Reputation: 475Reputation: 475Reputation: 475
AFAIK, there are files and commands which look explicitly for the root user to execute/modify them. By removing root, you would remove their functionality. Also, programs may span across directories - so in your example, you would have one user run the program in / then when it gets to /usr you'd need another user to run something, and so on. Having just one super user is the simplest way - KISS at it's finest IMO.

Also, would you have the pseudo super users be normal accounts? Say user1 has access to / and is also a normal user account, every time user1 logs in, malicious programs or users have access to ~/user1 and to / which gives them a fair bit of control. Or would you have user1 as the super user and user1a as their user account. They'd still have to su but you have now doubled the number of accounts you'd need. Much better to have users and root.

But I'll wait until a security guru comes along for a definitive answer.
 
  


Reply



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
Are these programs - or equivalent programs - available for Linux? voly Linux - Software 12 07-29-2005 02:44 AM
What can we do if we type chmod ugo-x /bin/chmod ?????? bunny123 Linux - Software 3 02-01-2005 08:53 PM
CHMOD in shell : chmod 777 /usr/ <---is that right? cpanelskindepot Programming 5 07-16-2004 05:37 AM
my table with programs when i press in button (left down corner) do no show programs sagi7ario Mandriva 1 03-12-2004 12:02 PM
How to get newly installed programs in programs list Brosky Linux - Software 5 02-06-2004 03:45 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 06:44 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
Open Source Consulting | Domain Registration