Sticky Bit

I want a file I create to not be deletable by other users so I created a sticky bit by chmod 1644 on the file. chown'd it to root and then tried to delete (via GUI drag to trash and empty) as a non root user and it let me. is sticky bit only good for terminal deletes or something?

See "man 2 chmod" for an explanation of the sticky bit on individual files. It's more about caching than permissions.

The sticky bit does have a use for directories in some O/S.

mkdir mydir
chmod 1770 mydir
chown myuser:mygroup mydir
cd mydir
touch myfile
chmod 640 myfile
chown myuser:mygroup myfile

The file myfile can be read by anyone in mygroup but the sticky bit on the directory stops them deleting the file with error "not owner".
Try it. Not all O/S behave the same way.

A less complicated way to protect a file is to own the directory and the file and only allow write access to yourself. In this example users in your group can see the file and its contents but not make changes.

mkdir mydir
chown myuser:mygroup mydir
chmod 750 mydir
cd mydir
touch myfile
chmod 640 myfile
chown myuser:mygroup myfile

The sticky bit, when set on a directory, allows file deletion only by the file owner. This permission set is useful to prevent file deletion in public directories, such as /tmp, by users who do not own the file.

The directory permission where the file is located contains the permissions permitting if files in the directory can be deleted or not. The permissions of the file direct who can read the file, not if it can be deleted.

Thanks n1djs!