CHMOD - Undertanding File Permissions on a Unix-Based Server

The basic command for changing file permissions in unix based operating systems is the 'chmod' command. This command is executed with a set of parameters after it. With most FTP clients, you can simply select the filename you want to change the permissions of, right click, and choose the chmod command.

There are three main groups of permissions when dealing with the chmod command. The three groups are yourself or owner, your unix group, and everyone else. A typical chmod command would look like this - 'chmod 755' This allows you to add, remove or rename files as well as read or edit a file. It also specifies that your unix group and everyone else can only read and edit the file in question. They can't add, delete, or rename the file.

How the numbers in the chmod command work

There are three types of permissions that can be given to a file. They are read, write, and execute. The read permission is assigned a value of 4, the write permission is assigned a value of 2 and the execute permission is assigned a value of 1. So when a chmod command specified the digit 7 as the first number, it means that all three types of permissions are to be assigned to it. If a party is assigned a value of '0' then it means it has no rights whatsoever to a file. '6' tells the server that the user can read and write to the file but can't execute it. I think you get the idea.

Common permissions to set

Most of your html files will do fine with a permission of 644. Most script files will need a permission of 755. Any configuration files in a script package will often need a file permission of 777. Be very careful about assigning a file permission of '777' for everyone. With this permission, it means that anyone who gains access to your server will be able to add, remove, rename, read or edit the file. It is always a good idea with security in mind to assign the least amount of permissions necessary to get the job done.

An FTP client can keep things simple

Most people on shared servers will not have access to a command line to be able to use the chmod command. For most people, changing file permissions will be done through an FTP client. To do this, right click on the file you want to alter, and choose the chmod command. You will usually get a popup that will show nine checkboxes. The will be arranged in three rows. On the left you will usually see Read, Write, and Execute for the row headings. You can accomplish the same thing as typing in the numbers above by clicking on one, two or three boxes for each party. Once you're done, you click the apply or ok button and the file permissions will be changed.

If you keep in mind that you need to always go with the most restrictive file permissions possible that still allows your files to execute, and that there are three parties to define permissions for, you'll do fine. The three parties again are the owner, group, and everyone else.

This article was written by Joe Duchesne, president of http://www.yowling.com/, a web hosting company that specializes in helping online business owners increase their website traffic. Copyright 2004 Yowling. Reprint Freely as long as you link back to my website from this resource box.

In The News:

Powered by Feedzilla

Domain Name and Web Hosting Hell

Does GoDaddy really suck?I am in the process of registering... Read More

Provide A Good Home For Your Website

Selecting a web hosting company is like sending one of... Read More

Linux Servers: Do You Understand the Difference?

First of all, some people are worried that they will... Read More

Reseller Hosting: The Good and The Bad!

Reseller webhosting can be a great way to earn some... Read More

Bound To Your Old Expensive Web Host by Fear?

You're not alone! Many people are bound to the old... Read More

What You Should Know About Your Web Host

Yesterday I received a nice email in my inbox, I... Read More

The Problem with Free Web Hosting Plans

In my opinion, free web hosting is one of the... Read More

Finding a Home for Your Internet Enterprise - A Point by Point List

After much Net surfing and looking at all the offers... Read More

Web Hosting Services Absolutely Necessary for Your Websites Success

Web hosting services play a vital part in your website's... Read More

How Can I Get The Web Host Services And Support I Need, Hassle-free?

Choosing a host or switching hosts can be an agonizing... Read More

How Multiple Server Hosting impacts your websites uptime

This article describes the technology behind multiple server hosting and... Read More

Windows Hosting versus Linux Hosting

The matter of choosing between the operating system (OS) running... Read More

Avoiding Bad Web Hosts

The Internet represents the most powerful communication revolution since the... Read More

Personal Web Hosting ? Free Or Cheap?

After you have spent some time and creativity on designing... Read More

Free or Paid Web Hosting?

Just finished your first website? So it's the time to... Read More

How to Know When It is Time for Your Website to Move On to Dedicated Servers

Knowing when it is time to move onto a dedicated... Read More

Managed Hosting Services - Who Benefits from It?

Managed Hosting Services are used primarily by companies that either... Read More

10 Helpful Tips to Follow When Switching Web Hosts

You've made your decision to move from your website from... Read More

How to Choose a Quality Webhost

If you are anything like me, you'd probably like to... Read More

Server Host: Where Does My Web Page Go?

For those of you who don't really understand where or... Read More

Choosing The Wrong Server Will Literally Make Or Break You

Choosing the right web server will be one of the... Read More

Web Hosting and Development

If you've ever browsed the World Wide Web and wondered... Read More

Nine Things To Know Before Selecting The Web Host For Your Business

It may seem simple yet it is often times overlooked.... Read More

How to Choose a Web Hosting Company?

Nowadays, anybody can afford to order a feature-packed web hosting... Read More

Free Web Hosting - Why Might It Be A Bad Idea

When talking about free anything the legitimate question that first... Read More