LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 03-13-2005, 07:22 PM   #1
tommyliu
LQ Newbie
 
Registered: Jun 2004
Location: Hong Kong
Posts: 15

Rep: Reputation: 0
About Change Own


Dear all,

I have a chown program problem. I have a directory as below:

drwxrwxr-x 57 ftp software 4096 Mar 11 23:39 software

In side software I have a directory 123 as below:

drwxrwxr-x 2 tommy software 4096 Mar 11 23:39 123

I current account is tommy. And I type chown ftp:software 123, then
output is

chown: changing ownership of `123': Operation not permitted.

I have set tommy and ftp to same software group. Why I cannot execute
this command?

Regards,

Tommy
 
Old 03-14-2005, 04:52 AM   #2
uberNUT69
Member
 
Registered: Jan 2005
Location: Tasmania
Distribution: Xen Debian Lenny/Sid
Posts: 578

Rep: Reputation: 30
does it work if you are root?
 
Old 03-14-2005, 07:23 PM   #3
tommyliu
LQ Newbie
 
Registered: Jun 2004
Location: Hong Kong
Posts: 15

Original Poster
Rep: Reputation: 0
Yes, I can.
 
Old 03-14-2005, 07:55 PM   #4
uberNUT69
Member
 
Registered: Jan 2005
Location: Tasmania
Distribution: Xen Debian Lenny/Sid
Posts: 578

Rep: Reputation: 30
is tommy a member of software?
 
Old 03-14-2005, 08:19 PM   #5
tommyliu
LQ Newbie
 
Registered: Jun 2004
Location: Hong Kong
Posts: 15

Original Poster
Rep: Reputation: 0
Yes.
 
Old 03-14-2005, 09:21 PM   #6
uberNUT69
Member
 
Registered: Jan 2005
Location: Tasmania
Distribution: Xen Debian Lenny/Sid
Posts: 578

Rep: Reputation: 30
I don't think I can answer your question properly, other than:
isn't this the idea with *nix file permisions?
ie. that you can't change the ownership of a file to another user unless you are root?
(regardless of group membership?)
 
Old 03-14-2005, 09:28 PM   #7
tommyliu
LQ Newbie
 
Registered: Jun 2004
Location: Hong Kong
Posts: 15

Original Poster
Rep: Reputation: 0
Yes. I cannot change owner while both user are same group.
 
Old 03-14-2005, 09:34 PM   #8
uberNUT69
Member
 
Registered: Jan 2005
Location: Tasmania
Distribution: Xen Debian Lenny/Sid
Posts: 578

Rep: Reputation: 30
yes, I think that is the way it's supposed to be

I don't know how to do it other than execute the command as root

is there a problem chowning with root?
 
Old 03-14-2005, 10:17 PM   #9
tommyliu
LQ Newbie
 
Registered: Jun 2004
Location: Hong Kong
Posts: 15

Original Poster
Rep: Reputation: 0
Can you use chown under non root permission ?
 
Old 03-14-2005, 11:31 PM   #10
uberNUT69
Member
 
Registered: Jan 2005
Location: Tasmania
Distribution: Xen Debian Lenny/Sid
Posts: 578

Rep: Reputation: 30
yes, but not to alter permissions for another user

you could always sudo or fakeroot the chown command I guess
 
Old 03-15-2005, 12:00 AM   #11
tommyliu
LQ Newbie
 
Registered: Jun 2004
Location: Hong Kong
Posts: 15

Original Poster
Rep: Reputation: 0
I am not understand what you mean, sorry !!!
 
Old 03-15-2005, 12:25 AM   #12
uberNUT69
Member
 
Registered: Jan 2005
Location: Tasmania
Distribution: Xen Debian Lenny/Sid
Posts: 578

Rep: Reputation: 30
I mean, for example,

user tommy cannot assign permisions for user charlie
ie.
this won't work:
$chown charlie testfile
where testfile is owned by tommy

however:
using the sudo or fakeroot commands, you could allow tommy to perform commands that normally only root could execute
ie.
$sudo chown charlie testfile

to do this you obviously need either sudo or fakeroot installed.

For sudo, for example, to allow charlie to perform root commands, you need to edit /etc/sudoers to include a line something like:
charlie ALL=(ALL) ALL
 
  


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 do I change the cursors globaly for a user? and how do I change them in the E-WM? enigma Z Linux - Software 1 09-18-2004 03:59 PM
Cannot Change GNOME Menu Items to add/change Item for Mozilla 1.2 After Upgrade metoome General 0 03-27-2004 12:19 AM
Cannot Change GNOME Menu Items to add/change Item for Mozilla 1.3 After Upgrade SForsgren Linux - General 4 03-26-2004 11:43 PM
under kde3 i change change language, where in gnome? sirpelidor Mandriva 1 12-10-2003 04:39 PM
mountig - change ro to rw, delete directory, change rw to ro ?? itsjustme Linux - General 6 10-17-2003 11:48 AM

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

All times are GMT -5. The time now is 06:21 PM.

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