Web Developer's Virtual Library: Encyclopedia of Web Design Tutorials, Articles and Discussions


WDVL Newsletter

Active Server Pages
JSP/Java Servlets
Microsoft SQL Server
Daily Backup
Dedicated Servers
Streaming Audio/Video
24-hour Support    

jobs.webdeveloper.com

Hiermenus


e-commerce
Partner With Us















Developer Channel
FlashKit.com
JavaScript.com
JavaScriptSource
Developer Jobs
ScriptSearch
StreamingMediaWorld
Web Developer's Journal
Web Developer's Virtual Library
WebDeveloper.com
Webreference
Web Hosts
XMLfiles.com

internet.com
IT
Developer
Internet News
Small Business
Personal Technology

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers


Permission Bits

July 19, 1998

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?

Additional Resources:

Who Are you and Who else is here?
Introduction to UNIX for Web Developers | Table of Contents
The "chmod" Utility


Up to => Home / Internet / UNIX / Intro




Jupiter Online Media: internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and Jupiter Online Media

Jupitermedia Corporate Info


Legal Notices, Licensing, & Permissions, Privacy Policy.

Web Hosting | Newsletters | Tech Jobs | Shopping | E-mail Offers