Computer file systems use a mechanism called “permissions” to control what users can access. With computer filesystems the term user can refer to a person or a computer program. The access rights for file systems manage the ability of users to view or make changes to files.
When setting up custom theme templates for Shopp, you’ll need to create a
shopp/ directory (or folder) in your theme files and give write permissions for that directory to the web server, or to be more specific the web server user.
As most web hosting providers use UNIX-like system, we’ll go over how to change permissions for Unix-based file systems. The access control system manages permissions given to specific classes.
There are three kinds of permissions on Unix-like systems:
- read permission provides a user the ability to view a file
- write gives the ability to make changes to a file
- execute allows a user to run a program file (or access a directory)
There are also three file system classes that permissions are given to:
- user refers to the individual owner of a file
- group refers to the group owner of a file, and by extension includes all users of that group
- others is anyone else that is not the file owner or a member of the group owner
Each of the three types of permissions are granted (or not granted) to each of the file classes. On Unix-like systems, file permissions are set in three groups of three:
- what the user can do (read, write, execute)
- what the group members can do (read, write, execute)
- what anyone else can do (read, write, execute)
Most systems represent these permissions using characters for each of the permission types:
- r for the read permission
- w for the write permission
- x for the execute permission
- – for no permission
The entire permission for a file would then be represented like
-rwxrwxrwx. The first character is for marking special files like directories. The rest of the characters are in three groups of three permission bits. The first three are for the user (file owner), the second three for the group and the final three for the others class (everyone else).
Write Permission for Shopp Templates
Usually, all files that you upload to your server will automatically be set to be owned by your user account which should have the write permission. In order for the Shopp to automatically install the template files into your theme to allow for customization, the web server (the program that Shopp runs under) is the user that needs write access to the
Setting Permissions with an FTP Client
FTP programs allow you to manage file ownership and permissions on your remote server. You’ll often find it in program menus (right-clicking a file) as the set permissions option. In order to give the web server write access to the
shopp/ directory, you’ll typically right-click the newly created directory and select the File Permissions menu option. You will need to give write and execute permissions to the group. The write permission is need so that Shopp can make changes, and execute permission is necessary in order for Shopp to be able to access the directory.
Some hosts may require that you give full access to everyone by also giving write and execute permissions to the others class. If this is required, it is recommended that you leave it this way just long enough to install the template files from Shopp. Once the templates are in place, remove the write permission from the others group on the