Changing permissions to your file system

Sometimes a web application needs access to your website's file system to upload files on our LAMP stacks.

Most common directions will instruct you to run chmod 777. However, chmod 777 will not produce the normal results in our hosting environment.

Before granting the webserver permissions to your site's file system, please note: Changing file system permissions can create a security issue.

You are responsible for security on your LAMP stack. See: Why a site might be taken offline.

How to grant webserver permissions on U of M Hosting:

In the command examples below, is the shortname of your site. Refer to www.uofmhosting.net for more information. 

  1. Log in to your site using an SSH client (not SFTP).
  2. CD into your projects directory: /data/example.
  3. Notice the name of the directory under data (above is an example). The webserver user for your account would be example-user.
  4. Run this command: setfacl -R -m u:example-user:rwx <dir> and then setfacl -d -R -m u:example-user:rwx <dir> 

Note: We reserve the right to suspend your site if you give the webserver access to PHP code that you're running.  

If you have questions, submit a helpdesk ticket by emailing uofmhosting@umich.edu.