O'Reilly logo

Linux and Unix Shell Programming by David Tansley

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

Chapter 1. File security and permissions

To stop unwanted users accessing your files, you can set permission bits on them, and on your directories. You can also specify what type of permissions the files get when they are created: this is just a small part of system security. We will not concern ourselves with the big security picture, just the files and directory part.

This chapter will cover:

  • permissions on files and directories;

  • the setuid;

  • chown and chgrp;

  • umask; and

  • symbolic links.

A file is owned by the user who created it and the group the user belongs to. That user alone can then specify who can read, write and execute that file. Of course, root or the system administrator can override anything that a mere mortal user does. A file when created ...

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