* Kristjan <[EMAIL PROTECTED]> [030607 12:29]: > How can I make so that users can > change the ownership of files that are resided in their own home > directory and that are not owned by them > > Currently an user who issues 'chown' command to the file that is not > owned by him only gets that operation is not permitted
Several others have responded already, but I'll give a try here ... hopefully it will become clearer. Ownership and permissions on a directory determine what can be done in that directory. If you have read permission, you can see the names of files. If you have write permission, you can create files or subdirectories in that directory, move files in or out, and delete files or subdirectories. If you have execute permission, you can traverse or descend down through the directory to see directories below it; if not you are blocked from subdirectories. Ownership and permissions on a file relate to the file itself, with no consideration for the directory. If you have read permission, you can read the file. If you have write permission, you can change it. If you have execute permission, you can execute it as a script or program. Only root can change the ownership of a file or directory. The owner of a file or directory can change its group ONLY if the owner is a member of the group being changed to. Applying these principles, as others have suggested, the non-root owner cannot change who owns the file. But if the file is not read-only, she can make a copy of it. The copy will then be owned by her. If she has write privileges in the directory, she can then delete the old file. When you start thinking the Unix way is actually fairly consistent (which it is) then you're One Of Us ;-) -- Jan Wilson, SysAdmin _/*]; [EMAIL PROTECTED] Corozal Junior College | |:' corozal.com corozal.bz Corozal Town, Belize | /' chetumal.com & linux.bz Reg. Linux user #151611 |_/ Network, PHP, Perl, HTML
Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com