See
BLT.
owner: In Linux, a file has an owner. By default, a file is owned by the
user that creates it, in other words, the user that invokes the application that creates it. Some exceptions and clarifications (or things to be clarified):
- If a script invokes an executable that creates a file, is the created file owned by the owner of the script or by the user who invoked the script? (I need to test sometime -- I don't even have a good guess at this point.)
- If the suid bit is set on an executable that creates a file, the new file is owned by the owner of the executable, not the user who invoked the executable.
- I'm assuming (but need to confirm) that the sgid bit works similarly -- a file newly created by an executable with the sgid bit set "inherits" the group of the executable.
-
The owner of a file can use chmod to change the permissions for the owner, group, and world. Only root can change ownership of a file (using chown or chgrp). (Confirm: An executable or script that is suid root (i.e., the suid bit is set and the owner is root) can do things like chown or chgrp.)
See:
Contributors
- RandyKramer - 30 Jan 2002
- <If you edit this page, add your name here, move this to the next line>