eXtropia: the open web technology company
Technology | Support | Tutorials | Development | About Us | Users | Contact Us
 ::   Tutorials
 ::   Presentations
Perl & CGI tutorials
 ::   Intro to Perl/CGI and HTML Forms
 ::   Intro to Windows Perl
 ::   Intro to Perl 5
 ::   Intro to Perl
 ::   Intro to Perl Taint mode
 ::   Sherlock Holmes and the Case of the Broken CGI Script
 ::   Writing COM Components in Perl

Java tutorials
 ::   Intro to Java
 ::   Cross Browser Java

Misc technical tutorials
 ::   Intro to The Web Application Development Environment
 ::   Introduction to XML
 ::   Intro to Web Design
 ::   Intro to Web Security
 ::   Databases for Web Developers
 ::   UNIX for Web Developers
 ::   Intro to Adobe Photoshop
 ::   Web Programming 101
 ::   Introduction to Microsoft DNA

Misc non-technical tutorials
 ::   Misc Technopreneurship Docs
 ::   What is a Webmaster?
 ::   What is the open source business model?
 ::   Technical writing
 ::   Small and mid-sized businesses on the Web

Offsite tutorials
 ::   ISAPI Perl Primer
 ::   Serving up web server basics
 ::   Introduction to Java (Parts 1 and 2) in Slovak


Introduction to UNIX for Web Developers
Permission Bits  
Okay, that was quite a sidetrack. Let's return to permissions.

If you recall, the "ls -l" utility displayed several permission-related fields: Namely, the permission bits, the owner and the group name. We can use these three bits of information to determine who can read a file, delete or modify a file, or execute it if it is executable.

Let's look at the permission bits.

The permission bits specify three sets of three security specifications. Specifically, they define:

  • Is the file readable by the owner?
  • Is the file writable (modify or delete) by the owner?
  • Is the file executable by the owner?

  • Is the file readable by users in the specified group?
  • Is the file writable by users in the specified group?
  • Is the file executable by users in the specified group?

  • Is the file readable by any old user?
  • Is the file writable by any old user?
  • Is the file executable by any old user?

These 9 fields are represented in that order in the permission bits field of the ls-l command. If there is a "-" in the field that means that the file is "not" readable, writable, or executable depending on the field.

[Permission Bits]

Of course, this is best shown by example. Consider the following:

Listing Explanation
rwxrwxrwx Readable, writable and executable by owner, group and world (everyone)
rw-rw-rw readable and writable by everyone but executable by no one
rwx------ readable, writable and executable only by the owner
rwxrw-r-- readable, writable and executable by the owner. Readable and writable by group members and readable by world.

Note that directories work just the same as files except that execution privilege represents the ability to move into the directory. If you do not give executable privileges to world and group, nobody can "cd" into the directory but you.

So the next obvious question is, how do you modify these permission fields? How do you change the permission bits, the owner and the user?

Previous | Next | Table of Contents