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.


MORE RESOURCES:
RELATED ARTICLES
Avoid Getting Ripped Off By A Hosting Company
Chances are if you host multiple domains or websites you are spending too much money at your current hosting provider. Other hosting companies increase their profits by forcing you to create an additional hosting account every time you want to host a new domain or website.
Great Web Hosting - What to Look For!
Web hosting can best be described as a modern-day marriage: none of this till death do us part stuff, it's more like I'll stick around as long as your uptime is 100%, you answer my frantic queries instantly, and you charge me less than a decent latte at Starbucks. What follows is a few tips to help make the relationship less rocky and possibly prosperous!First of all, we all need to take a little responsibility and at least figure out what we think we need from a web host up front.
Dedicated Server vs. Co-location Web Hosting
So - you know shared hosting no longer cuts it, and your single office connection is not enough to host a web server - so which is best, leasing a dedicated server or buying your own server and co-locating it someone's data center? Difference For those that are unsure of the difference, here it is in a nutshell. When you co-locate, you are simply renting space within someone else's facility to store your own server or servers.
Business Web Hosting: Which is Right for You?
Business web hosting is what you need. You have a website you need to put online.
Shared Web Hosting Service Explained!
The next concern for you after designing and developing web pages is to get your web site hosted on the Internet. But with so many web hosting companies offering various types of web hosting packages - shared web hosting, dedicated web hosting, managed web hosting, which type of hosting should you choose?As a general rule, it is a good idea to go for shared web hosting if you are a small business owner and cost is your major concern.
Uptime Guarantee - Good Idea?
When looking for a Web Host there are lots of factors that come into play. Usually the deciding factors are price and bandwidth.
Steps to Becoming a Web Host Reseller
You've decided to get a reseller web hosting account to resell web space. What now? Here's a step-by-step guide.
How to Choose the Web Site Hosting Service thats Right for You
There are few things as critical to your e-business success as having a reliable web hosting service ..
How To Change Your Web Hosting Provider - Step-By-Step Guide
Whether you are disgruntled with the level of service your current web hosting provider, or you have discovered a provider that offers you better deal, or your online business has simply outgrown your present provider, any reason is as good as any for changing your web hosting provider. The only concern is how to switch your web site from a web host to another in the right way and no or as little aggravations as possible.
The #1 Factor New Webmasters Forget to Consider when Choosing a Web Hosting Plan
The ProblemToo often new webmasters sign-up with the first good hosting plan they see; they purchased a domain name, built up a site, generated a small income, and decided "Hey, this works, I should make another site". From there the webmasters purchase a new domain and begin working on a new site only to realize that their hosting plan supports only 1 pointed domain; they will have to purchase an entirely new hosting plan for each new domain name.
How to Choose a Hosting Web Package Cheap
If you're looking for a hosting web package cheap there are many things to consider. To find a hosting web package cheap you really need to do your homework and search the internet for the right host for you.
Sender Policy Framework (SPF) - How to use it to Fight Email Forgery
Spam is a real problem today. Forged email is a big part of the spam problem.
Web Hosting Operating Systems Explained
A few time ago appeared a lot disagreements between opinions on the internet regarding, which is the best operating system for web hosting. There are people who hate windows, there are people who love FreeBSD and many others.
Low Cost Web Hosting Services - Dont Forget About Uptime
Once you have your company's web site up and running, it is vital that you do everything possible to keep it that way. Nothing sets off alarms in a customer's head faster than a non accessible web site or one that has features which do not work.
Choosing Between Free or Paid Web Hosting
There are a number of things to consider when choosing between a free or paid web hosting service. Setting aside cost for a moment, lets look at some factors that will help you make an informative decision.
Useful Tips When Applying For A Web Host Provider
Once you have considered the design for your website and it is ready to be hosted, there are some matters to be considered when choosing the adequate web host:I - Accessibility of the site?Once you have applied for a web host provider you should take several aspects into account such as the time it takes to load or the period of time it is up.These aspects are very important because if there are problems related to them, this can create extreme annoyance and renouncement of the possible visitors.
Web Site Design and Hosting
If you're looking for a professionally designed web site at cheap, bargain basement prices, you may find it as close as your web hosting provider. Many companies that host web sites also offer web design services to their customers at low prices.
Hosting Your Way All The Way To The Bank
Let's face it, the Internet is here for good. Today's Internet reminds me of the California gold rush.
Getting The Best Web Hosting For Your Business
After the dot.com bubble burst a few years back I really thought that the Internet craze was over.
Linux Servers: Do You Understand the Difference?
First of all, some people are worried that they will not be able to use Linux hosting because they run Windows on their PCs. However, what operating system you run on your own PC is irrelevant to which web hosting environment you can use, because the latter is run remotely on a web server, where your website files will be uploaded.