Can sticky bit be set on files?

0101

Yes, the sticky bit can be set on files, but it is primarily used for directories. When the sticky bit is set on a directory, it restricts file deletion within that directory to the file's owner, the directory's owner, or the root user. This is useful in shared directories like /tmp.

For files, setting the sticky bit has no effect on the file's behavior in most Unix-like systems. It is generally not used or recommended for regular files.

0 Comments

no data
Be the first to share your comment!