O'Reilly logo

Fundamentals of Linux by Oliver Pelz

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

sticky bit

sticky bit only has an effect on directories and not on files. If sticky bit is set on a folder, only the owner of a specific file, folder, or subfolder created in that directory is allowed to delete it. There are some special cases where this is useful, for example, in the /tmp directory, where anybody should be allowed to see anything, but quite often processes create and rely on data stored in that folder, so it would be very bad if someone other than the creator of the process could be able to delete files from other users.

So let's test this out:

As you can see, sticky bit has been set on the /tmp directory, so let's create ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required