Question
How do I set permissions on a Unix server (Linux, BSD, OSX, Solaris, etc.)?
Answer
The Unix operating system has strict rules governing who can do what to files
and directories. In order for Big Medium to manage your website, its settings and
its HTML pages, you must give Big Medium access to relevant files and
directories.
The moxiedata directory
When you first install Big Medium, make sure that you set the following
permissions on the moxiebin directory and its contents (I'll explain what
chmod is in a sec):
moxiebin: chmod 755
- All
.cgi files directly inside moxiebin: chmod 755
Other directories
If you're installing Big Medium on a hosted web account, you probably
don't have to make any other permission settings on other files or
directories. That's because hosted accounts are typically set to run
scripts as the same account that you used to upload the files, so Big Medium
has all the permission it needs.
If Big Medium complains that it does not have permission to do something,
however, you'll need to make some adjustments.
In particular, Big Medium needs full read/write/execute permissions on the
following directories.
moxiedata
bmadmin
- The HTML directory of any sites it's managing
If Big Medium complains that it does not have necessary permission
in any of these directories...
Do you have root access to the server?
(If you don't know, that probably means you don't.) If you do have root
access to the server, change the ownership of the directory and its
contents to be the same as the account under which the web server is
running the script.
Common names for the web server account are "apache," "web" and "nobody."
If you're not sure, ask your server administrator.
If the server is running under the account "web," for example, you would
change ownership of the moxiedata directory and its contents from
the command line like so:
cd /path/to/moxiedata
chown -R web ../moxiedata
Otherwise, adjust directory permissions
Try setting the directory's permissions to chmod 755. If that still
doesn't work, try chmod 775. Otherwise, try chmod 777.
Warning. chmod 777 means that any account on the server has permission
to edit the contents. Unless you deeply trust everyone with an account on the
server, this can be a security risk. Check with your hosting company about
other strategies for giving the web server account access to the directory.
How do I "chmod" a file or directory?
The chmod command sets/changes permissions in Unix-based systems.
From the command line
If you have command-line access to the server, you can use chmod from the
command line to change permissions. Navigate to the directory that holds the
file or directory you would like to change:
cd /path/to/directory
Then type the following command, where "filename" is the name of the file or
directory whose permissions you would like to change and the number is the
chmod permissions number you would like to set:
chmod 777 filename
From your FTP application
Most Unix systems allow you to chmod files using an FTP application (e.g.,
WS_FTP or CuteFTP for Windows, and Transmit, Fetch or Interarchy for Mac).
If you are unfamiliar with FTP, you may want to ask a webmaster for
assistance; he or she probably uses FTP to make changes to your website.
Here are some application-specific pointers to setting chmod via FTP:
WS_FTP
Open WS_FTP and connect to your server. Highlight the file or directory
to change, then right-click the file and select "Properties."
The permissions areas appear at the bottom of the Properties dialog.
To set 755 permissions:
- Check all of the left-column boxes below "owner."
- Check only the "read" and "execute" boxes below "group" and "other."
To set 775 permissions:
- Check all of the left-column boxes below "owner" and "group."
- Check only the "read" and "execute" boxes below "other."
To set 777 permissions:
CuteFTP
Open CuteFTP and connect to your server. Right-click the file or directory
whose permissions you would like to change and choose "Properties."
The different options for the permissions are located at the bottom of this
dialog box; enter the appropriate chmod number.
Fetch
Open Fetch and connect to your server. Select the file or directory to change
and click "Get Info." Expand the "Ownership and Permissions" area and, in the
box labeled "UNIX equivalent," enter the appropriate chmod number.
Transmit
Open Transmit and connect to your server. Select the file or directory to change
and choose "Get Info" from the "File" menu. Under "Permissions," enter the
appropriate chmod number in the field labeled "Octal."
Interarchy
Open Interarchy and connect to your server. Select the file or directory to change
and choose "Get Info" from the Listing menu. Near the bottom there is a
permissions panel. Type the appropriate chmod number and click "Apply."