LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   Is multiple owners of a single file possible? can user1 own a file that root also own (https://www.linuxquestions.org/questions/debian-26/is-multiple-owners-of-a-single-file-possible-can-user1-own-a-file-that-root-also-own-675245/)

dave247 10-09-2008 01:17 AM

is multiple ownership of a single file possible? NON GROUP
 
So my professor is having us do some ridiculous things to our server, even though he said not to do them all according to his handout....ANYWAY one thing we are supposed to do is make a script that does $ chown -hR user1 / which makes user1 become the owner of all the files that root owns.

I was wondering something now because of this: can a user1 be an owner of a file that is also owned by Root? I know Root owns everything, but is it really possible for another user to co-own everything that root owns? User1 can now delete files created and owned by Root? Oh and they are NOT in the same group.

NOTE: This is not a question on my lab report, therefore I am not asking for answers on my schoolwork. I am asking this as a result of extra interest that came out of my assignment, and I have also looked on google.com/linux for an answer, but I didn't find anything.

Thanks
dave247

jschiwal 10-09-2008 01:22 AM

A file has just one owner. The chown command needs to be run as root. Look at using acls to give more than one user full access to files without using groups.

dave247 10-09-2008 01:46 AM

Quote:

Originally Posted by jschiwal (Post 3304906)
A file has just one owner. The chown command needs to be run as root. Look at using acls to give more than one user full access to files without using groups.

Yeah I did run it as root. So aside from acl's, doesnt this kind of mess things up in a way? If user1 also owns */* like Root, can user1 do a lot more than normal or is he just owner of everything in an unorthodox and error causing way?

I was actually getting some weird errors when I logged in but it went away when I killed user1 and then chowned everything to root (just a precaution).

jkerr82508 10-09-2008 04:53 AM

I think the hint is here:

Quote:

So my professor is having us do some ridiculous things to our server, even though he said not to do them all according to his handout
It sounds as though he's asking you to do something that he expects you to know should not be done. It seems to me a rather odd teaching method, but maybe it works if you learn something in the process.

Jim


All times are GMT -5. The time now is 11:15 AM.