官术网_书友最值得收藏!

Ensuring permissions are correct

In any computer, files and programs have a 'permission' level, meaning it states who can read, write, change, or run them. In Joomla! (Linux-based machines) we have three sets of permissions: one for the 'owner', one for the 'group', and one for the 'world'. A common security mistake is setting these incorrectly.

In this short recipe, you will check your permissions for your 'files' and 'folders'.

Getting ready

You will need:

Your FileZilla FTP client and FTP username and password.

How to do it...

  1. Open your FileZilla FTP client and in your Site Manager select your web host
  2. In the right-hand pane of FileZilla, you will see your files and folders. To the far right (scroll over ) you will see the Permissions and Owner/Group columns as shown in the following screenshot:
    How to do it...

    There are many files and they should be set (as this is a fresh install) ok. However, it won't hurt to check.

  3. Click one of the folders then (for Windows ? users) press Ctrl+A. This will highlight all the files and folders in your site. You should see a screen similar to the following:
    How to do it...

    This partial screenshot shows you have selected everything.

  4. Right-click in the blue colored portion. Select File permissions…:
    How to do it...
  5. FOLDER PERMISSIONS should be set for 755.

    The following items should be checked or filled in:

  6. Numeric value should be set for 755.
  7. Check the box Recurse into subdirectories.
  8. Check the box Apply to directories only.

    Note that if you get it wrong, don't worry - you can repeat it.

    This process will take a few minutes so be patient.

    How to do it...
  9. File Permissions should be set to 644

    Tip

    In some hosting setups you may not be able to perform this step. This would be why you would have needed to turn on the FTP LAYER earlier

  10. Following the same process as in step 4, highlight all your files and folders, right click, and click your file permissions selection.

    This time however you will change the settings as follows:

  11. Numeric value should be set for 644.
  12. Check the box Recurse into subdirectories.
  13. Check the box Apply to files only.
    How to do it...

    This step will take longer than the DIRECTORIES step.

    Once complete you may exit FileZilla.

How it works...

This will establish the 'permission's properly. Linux sets up three different classes for permissions on each file and folder:

User (u): This is the owner of the file

Group (g): Other users who are in a group and able to access files

Other (o): PUBLIC or the WORLD (meaning - everyone who does not belong to the other two roles)

You noted the numbers 755 and 644. These numbers are represented by the OCTAL numbering system (BASE 8). What they tell the Operating System about the files is as follows:

READ is 4

WRITE is 2

EXECUTE is 1

In OCTAL we add them the same as normal numbers. For example, 4+2+1 = 7. Meaning we give the OWNER of the folder READ, WRITE, and EXECUTE permissions.

Whereas we give the GROUP and OTHER 4+1 = 5, READ and WRITE permission.

On our FILES we give the OWNER 4+2 = 6 and for the GROUP and OTHER we give 4 only - giving them permission to READ ONLY.

主站蜘蛛池模板: 简阳市| 共和县| 东丽区| 台湾省| 北碚区| 察哈| 汝阳县| 呈贡县| 罗田县| 河北区| 卓尼县| 肇庆市| 乌苏市| 瓦房店市| 永宁县| 专栏| 温州市| 宣武区| 长海县| 准格尔旗| 油尖旺区| 永平县| 延川县| 通海县| 洪雅县| 龙南县| 赣榆县| 朝阳区| 涟源市| 博爱县| 抚顺市| 德兴市| 浮山县| 水城县| 汉川市| 屯留县| 蒙山县| 文安县| 谷城县| 板桥市| 仙游县|