• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer

02 7903 0216

     

Open Ticket

    

Client Area

FASTDOT Web Hosting Australia

FASTDOT Web Hosting Australia

Australian Cloud Hosting

  • Web Design
    • eCommerce Development
    • Branding
    • Web Design
  • Domains
    • Register
    • Domain FAQ
    • Domain Extensions
    • MyDNS Manager
    • Domain Transfer
  • Hosting
    • WordPress Hosting
    • Sydney cPanel Hosting
    • Magento Hosting – eCommerce Website
    • eCommerce Options
      • Managed Magento Hosting
      • PrestaShop Hosting
      • OpenCart Hosting
      • CS-Cart Hosting
    • Business Emails
  • Cloud Servers
    • VMware ESXi Hypervisor
    • Equinix – ISO Certified Data Centres
    • Cloud Hosting Info
    • Virtual Machines
  • Resources
    • Partner Program
    • Transferring Websites
    • WordPress Tips
    • Email Tutorials
    • Hosting in Australia
    • Apps Galore
    • Tutorials & News
      • SEO
      • VMware VPS Cloud
      • PHP and MySQL
      • Security
      • Linux Guides
      • Server Management
Order Now

Fast Web Hosting on our Enterprise Cloud

Turbo Charged cPanel HOSTING

Get Started

May 15, 2009 by Editor

File Permissions Explained with CHMOD

Setting file permissions is one of the most common tasks involved in uploading files to your hosting account, especially if you are using various scripts, eg. installing scripts the old fashioned way without Fantastico!

CHMOD refers to the command line option for setting file permissions first used on Unix systems and widely in use today.

For everyday users setting file permissions has been made even easier and you can set permissions for files and directors from both your cPanel File Manager, and also with an FTP client such as FileZilla.

CHMOD refers to the command for setting file permissions first used on Unix systems and commonly used today.

File permissions are divided into 3 categories

  • r if the read bit is set, - if it is not.
  • w if the write bit is set, - if it is not.
  • x if the execute bit is set, - if it is not.

These permissions are also applied across 3 groups – UGO which represents User, Group, Other.

Using the example permissions:

(rwx)  (r-x)  (r-x)
  |      |      |
 User  Group  Other

The first set of permissions (rwx) represents read, write, and execute permission for the User.
The second set (r-x) represents read and execute permissions the Group, and members belonging to the group.
The last set (r-x) represents read and execute permissions for Others, or the world/public at large!

Octal Notation:

A common way to represent these permission values and the values used in your cPanel File Manager and via the CHMOD option in your FTP client is in Octal notation.

You may have seen file permissions set to three digit values such as 755 above. Each permission setting can be represented by a numerical value:

  • The read “r” bit adds 4 to its total (in binary 100),
  • The write “w” bit adds 2 to its total (in binary 010), and
  • The execute “x” bit adds 1 to its total (in binary 001).

When these values are added together, the total is used to set specific permissions.

For example, a file index.php, with the following permissions rwx-r-x-r-x

(rwx)  (r-x)  (r-x)
  |      |      |
4+2+1  4+0+1  4+0+1

When converted to Octal notation, this gives you the permission setting of 755

Beware 666 and 777

Biblical implications aside, setting permissions to 666 or 777 will allow everyone to read and write to a file or directory. Such settings as these could allow tampering with sensitive files so in general, it’s not a good idea to allow these settings.

Setting files and directories to 777 will commonly result in HTTP 500 Errors.

Here are a list of some common settings, numerical values and their meanings:

  • -rw------- = (600) Only the user has read and write permissions.
  • -rw-r--r-- = (644) Only user has read and write permissions; the group and others can read only.
  • -rwx------ = (700) Only the user has read, write and execute permissions.
  • -rwxr-xr-x = (755) The user has read, write and execute permissions; the group and others can only read and execute.
  • -rwx--x--x = (711) The user has read, write and execute permissions; the group and others can only execute.
  • -rw-rw-rw- = (666) Everyone can read and write to the file. Bad idea.
  • -rwxrwxrwx = (777) Everyone can read, write and execute. Another bad idea.

Here are a couple of common settings for directories (note the d at the beginning for directory/folder permissions):

  • drwx------ = (700) Only the user can read, write in this directory.
  • drwxr-xr-x = (755) Everyone can read the directory, but its contents can only be changed by the user.

Australian cPanel Hosting

 

More great articles

5 Multichannel Marketing Strategies to Scale Your eCommerce Business
The 7 Best SMS Marketing Tips for eCommerce Sites
ERP Integration: What It Is, How It Works, and Why You Need It
How to Successfully Sell and Ship to Europe

Category iconWeb Hosting Tutorials

Primary Sidebar

Recent Posts

  • How to Upload Files Using the cPanel File Manager?
  • How To Increase the PHP Max Upload Size in cPanel®?
  • Choosing a hosting platform in 2021
  • VARCHAR vs. TEXT for MySQL Databases
  • What Are the Best Shopify® Alternatives in 2021?
Comparing the Top Free Photo Editors
5 Future-Proof Abandoned Cart & Customer Recovery Strategies for 2021
What is an htaccess 301 redirect?
ERP Integration: What It Is, How It Works, and Why You Need It

Categories

  • Application Hosting
  • Australian Cloud Hosting
  • cPanel Hosting
  • DNS and Domains
  • eCommerce Hosting
  • Email Tutorials
  • Legals
  • Linux Tutorials
  • Operating Systems
  • PHP and MySQL
  • Register a Domain Name
  • Search Engine Optimization
  • Security
  • Server Management
  • Tutorials
  • VMware Cloud Hosting
  • Web Hosting Tutorials
  • WordPress Tips & Tricks
Australian web hosting

Footer

Recent Posts

  • How to Upload Files Using the cPanel File Manager?
  • How To Increase the PHP Max Upload Size in cPanel®?
  • Choosing a hosting platform in 2021
  • VARCHAR vs. TEXT for MySQL Databases
  • What Are the Best Shopify® Alternatives in 2021?

Legals

  • Terms&Conditions
  • SLA
  • Acceptable Usage Policies
  • Privacy Policies
  • About FASTDOT
  • ISO Certified

Contact

Australia: +61 02 7903 0216
Submit a Support Ticket

Company

FASTDOT.COM.AU PTY/LTD
ACN 002 454 631
200 Bourke Rd, Alexandria NSW 2015 Australia
Processing by eWay, PayPal and Bitcoin

blankNSW Government Provider

Made with in Sydney/Australia
  • Facebook
  • Twitter

Copyright © 2022 FASTDOT.COM

All rights reserved. Return to top