On file and directory permission and ownership: Difference between revisions From Online Manual

Jump to: navigation, search
mNo edit summary
 
(11 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Needs work}}
Installing SMF Packages requires either editing files or adding files and/or directories. Changing a file means reading a file and replacing it with a changed version of the file. All of Package Manager's changes to SMF's software require the permissions to read from, and write to, files and directories. Sometimes, package installation fails because of file permission problems. This page explains some of the common problems and offers some guidance on resolving them.
<!-- Why we care: How these issues affect SMF installations -->


==Intro to setting File Permissions==
==File Permissions and Ownership==
<!-- What USUALLY works, with links to info about ftp and chmod already on the  wiki -->
On Unix-based systems, file permissions are changed using a utility called [[chmod]]. [[FTP - How do I use FTP|FTP]] servers generally provide a local command, also called chmod, to allow setting file permissions via FTP. If you are using an old style command-line FTP client, you will have to use this command directly, but if you are using one of the popular drag-and-drop style FTP clients (like FileZilla, cuteFTP), you will be able to view and change file permissions by checking and changing the properties of the files. If your web host provides it, you may be able to log in directly to the account using SSH and explore your files using Unix shell commands.
*[[chmod]]
*[[What is installer/package manager FTP path]]
*[[What is FTP]]
*[[How do I use FTP]]  
*Using an FTP client to examine and change individual file permissions
*Using an FTP client to find out who owns "your" files and directories.
==Advanced File Permissions==
<!-- SMF's recommended file permissions, and why SMF makes this recommendation -->
===Who owns your files?===
<!--Different hosts set up things in different ways-->
====Who is the webserver? Who is php?====
*nobody (when?)
*someone other than you (www-data on Ubuntu)
*You, if suphp or suExec is installed and properly configured.


====Things that can go wrong====
You should be able to change the permissions of files you own, but you might not own all the files that you think you do. It may be the case that some of the files in your directories might belong to another user. Some FTP clients do not give you information about file ownership. On Unix-based operating systems, the chown utility is used to change file ownership.
* You install SMF via FTP so the files belong to you, but the webserver runs as someone other than you, or nobody , and so it cannot edit files via Package Manager
* You install SMF via FTP so the files belong to you, and the webserver is supposed to run as you, but it has "accidentally" caused some files created via Package Manager to be created that are not owned by you, and now neither it nor you can do anything with them.
* Other cases?


====Some Common Problems====
To learn more about navigating your files using FTP, please read [[FTP - How do I use FTP|How do I use FTP]].  To find out if your host provides SSH access to your account, check your host's website or contact their technical support.
Cases
 
* Package Manager says it installed a mod correctly, but the mod is obviously not there
[[Category:FAQ]]
** Cause
** Solution
* Package Manager syas it installed a mod correctly, and the mod seems to be only half there
** Cause
** Solution

Latest revision as of 13:45, 22 December 2015

Installing SMF Packages requires either editing files or adding files and/or directories. Changing a file means reading a file and replacing it with a changed version of the file. All of Package Manager's changes to SMF's software require the permissions to read from, and write to, files and directories. Sometimes, package installation fails because of file permission problems. This page explains some of the common problems and offers some guidance on resolving them.

File Permissions and Ownership

On Unix-based systems, file permissions are changed using a utility called chmod. FTP servers generally provide a local command, also called chmod, to allow setting file permissions via FTP. If you are using an old style command-line FTP client, you will have to use this command directly, but if you are using one of the popular drag-and-drop style FTP clients (like FileZilla, cuteFTP), you will be able to view and change file permissions by checking and changing the properties of the files. If your web host provides it, you may be able to log in directly to the account using SSH and explore your files using Unix shell commands.

You should be able to change the permissions of files you own, but you might not own all the files that you think you do. It may be the case that some of the files in your directories might belong to another user. Some FTP clients do not give you information about file ownership. On Unix-based operating systems, the chown utility is used to change file ownership.

To learn more about navigating your files using FTP, please read How do I use FTP. To find out if your host provides SSH access to your account, check your host's website or contact their technical support.



Advertisement: