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

1.3. Permissions

Let’s create a file using the touch command

						$ touch myfile
					

Now do an ls -l on the directory

						$ ls -l 
-rw-r--r--  1 dave    admin       0 Feb 19 22:05 myfile
					

We have created an empty file, and as expected the first dash tells us that we have an ordinary file. You’ll find that most of your file creations will be for ordinary files and symbolic links (more on symbolic links later).

User permissions Group permissions Other permissions
r w - r - - r - -

The next three permission bits (rw-) are your permissions, the owner of the file. The following (r--) are the group permissions that you belong to, in this case the group admin. The last three (r--) are the rest of the world, or anybody else. My default group admin, of which I am a member, ...

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