Template:Set file permissions/sandbox: Difference between revisions From Online Manual

Jump to: navigation, search
(testing moving files and directories into another list)
 
(removed some information that pertains to installing packages. That does not belong here. it is about trouble installing packages, or about chmod)
 
Line 1: Line 1:
==Set File/Folder Permissions==
==Set File and Folder Permissions==
After the {{lc:{{{1|install}}}}} archive has been uploaded and extracted, you need to set the files' permissions. This is commonly done by use of the Unix utility <b>CHMOD</b>. The correct CHMOD value for SMF folders is either 777, 775 or 755, and 666 or 644 usually for files, depending on your hosting service. There are two methods for this step, the method used depends on the hosting service that you use. <br />
File and folder permissions control who can see your files and use your folders.  They can control whether you will be able to install [[Modifications|mods]] to your forum. You will use Unix <b>chmod</b> values to designate permissions. On most servers, a setting of 755 for folders and 644 for files will work. If this does not work on your hosting service, you may need 777 or 775 for folders, and 666 or 664 for files. Some hosts do not allow using 777 for folders or 666 for files -- using such high values will cause Internal Server Errors, 500 erors, or other errors.  If the permission on your files or folders does not make them writable, the SMF {{#switch: {{lc:{{{1|install}}}}}|install=install|upgrade=upgrad}}er will report the problem -- if it can detect it.


===Setting File Permissions With the {{#switch: {{lc:{{{1|install}}}}}|install=Install|upgrade=Upgrad}}er===
===Setting File Permissions With the {{#switch: {{lc:{{{1|install}}}}}|install=Install|upgrade=Upgrad}}er===
The SMF {{#switch: {{lc:{{{1|install}}}}}|install=install|upgrade=upgrad}}er can set file permissions simply and easily. Navigating to the directory where SMF is located should redirect you to the {{lc:{{{1|install}}}}}.php file and prompt the {{#switch: {{lc:{{{1|install}}}}}|install=install|upgrade=upgrad}}er. For example: www.yourdomain.com/forum/{{lc:{{{1|install}}}}}.php. If the {{#switch: {{lc:{{{1|install}}}}}|install=install|upgrade=upgrad}}er detects files that need their permissions adjusted it will prompt for FTP details so it can <b>CHMOD</b> the files it requires for the {{lc:{{{1|install}}}}}. This will work on most servers.  If this does not work to you, you may choose to use to set file permissions using FTP.
The simplest approach is to skip this step until you run the SMF {{#switch: {{lc:{{{1|install}}}}}|install=install|upgrade=upgrad}}er.  It can set file permissions simply and easily for you, and will work on most servers. If the {{#switch: {{lc:{{{1|install}}}}}|install=install|upgrade=upgrad}}er needs it, it will ask for FTP login details to get the job done. If you run into any problems setting file permissions with the {{#switch: {{lc:{{{1|install}}}}}|install=install|upgrade=upgrad}}er, you can use the instructions below for Setting File Permissions with FTP to handle it yourself.


===Setting File Permissions With FTP===
===Setting File Permissions With FTP===
Line 11: Line 11:
*{{lc:{{{1|install}}}}}.php
*{{lc:{{{1|install}}}}}.php


If the permission on your files or folders does not make them writable, the SMF installer will report the problem. In that case, use your FTP client or host panel to reset the permissions for the files or folders the installer reports.
</includeonly><noinclude>{{Documentation}}</noinclude>
 
'''Please note:''' On some servers, the 777 or 666, permission may cause Internal Server Errors (ISEs) or similar errors. If an ISE or other error has occured on the server, the administrator may change the value one step back, to 755 or 644.  In come cases, SMF does not detect the errors that result when the host does not permit 777 or 666 permissions.  In such a case, the SMF Package Manager might report the mod install succeeded, but one or more steps did not get done.
 
If your host uses suphp (hosts such as 1and1.com), then you may be permitted to use CHMOD to set 777/666 permissions on files, but may see 500 errors when SMF attempts to use those files.  If your host uses suphp, use permissions of 755 for directories and 644 for files

Latest revision as of 16:28, 21 February 2013

Set File and Folder Permissions

File and folder permissions control who can see your files and use your folders. They can control whether you will be able to install mods to your forum. You will use Unix chmod values to designate permissions. On most servers, a setting of 755 for folders and 644 for files will work. If this does not work on your hosting service, you may need 777 or 775 for folders, and 666 or 664 for files. Some hosts do not allow using 777 for folders or 666 for files -- using such high values will cause Internal Server Errors, 500 erors, or other errors. If the permission on your files or folders does not make them writable, the SMF installer will report the problem -- if it can detect it.

Setting File Permissions With the Installer

The simplest approach is to skip this step until you run the SMF installer. It can set file permissions simply and easily for you, and will work on most servers. If the installer needs it, it will ask for FTP login details to get the job done. If you run into any problems setting file permissions with the installer, you can use the instructions below for Setting File Permissions with FTP to handle it yourself.

Setting File Permissions With FTP

Using a control panel or FTP client, file permissions can be changed quickly and easily. Usually, FTP programs will allow permissions to be changed by right-clicking files/directories and selecting "Properties", "Attributes" or "Permissions". The desired numerical value can be entered, or if provided, check boxes can be changed.

  • /attachments
  • /cache
  • install.php

</includeonly>

[edit] [purge] Template documentation

This template is meant to be included in articles on installing and upgrading, to provide the information about CHMOD/file permissions. To see it in action, please look at the testcases, or at Special:WhatLinksHere/Template:Set_file_permissions

Examples:

{{Set file permissions|install}}
{{Set file permissions|upgrade}}
  • install the word "install" will be inserted at several key points
  • update the word "update" will be inserted at several key points


Advertisement: