TheeDigital > Blog > How to Set Up Unix File Permissions for Magento

How to Set Up Unix File Permissions for Magento

Richard Horvath
Last updated: Magento 2 min read
Magento is an open source ecommerce platform. Though it is a user-friendly content management system (CMS) for web stores, there are common errors that can be made when initially setting up the site. Have you seen this error message during the installation of Magento? Fatal error: Call to a member function children() on a non-object The most common reason for this error message is that the Magento installation script is trying to access other scripts which are in a directory that is unreadable by your web server. You might have better luck using the tar.gz archived version of Magento (you can download from Magentocommerce.com). Tar archives are normally preset with the permissions of the person who archived them (in this case, a Magento developer). If you are using a Magento friendly hosting company, you should be able to simply upload the compressed tar.gz file and uncompress it on the server side. And the permissions will already be properly set. With that said, it is still a good idea to be familiar with setting permissions manually, especially if you run your own dedicated web server.

Manually Setting the File and Directory Permissions:

  1. First, check that all of your Magento directories are readable and executable by your web server’s user. Normally the web server runs as “apache” (running the server as user “nobody” is NOT recommended for security reasons).
  2. Try to limit permissions to only your ftp/shell username and the web server. You can do this by changing the owner of files to their ftp/shell username and set the group to the web server’s group. chown -r yourname:apache /your/magento
  3. Make files (not directories) readable by your web server: find /your/magento -type f -exec chmod 640 {} ;
  4. Set the file permissions for Magento directories to readable and executable: find /your/magento -type d -exec chmod 750 {} ;
  5. Lastly, set the permissions for directories that need to be writable and executable: chmod 770 /your/magento/app/etc chmod 770 /your/magento/var chmod 770 /your/magento/var/cache chmod 770 /your/magento/media chmod 770 /your/magento/media/downloadable chmod 770 /your/magento/media/import

Take Security Seriously

Setting up and running an e-commerce web server securely is extremely important because of the nature of the website. A compromised web server can allow hackers easy access to thousands of credit card numbers before the security breach is even noticed. If you are unsure about security, it is recommended that you use a scalable e-commerce service or that you hire an experienced and trusted Magento developer.
Need help setting up your site on Magento? Find out if Magento is right for your ecommerce website. Contact the web developers at TheeDigital in Raleigh, NC at 919-341-8901 or schedule a consultation.

Tags: Magento

Richard Horvath

Richard Horvath is the founder of TheeDigital, a Raleigh based award-winning web design and digital marketing agency. He is proud of his team and the results that they provide to their clients.

Related Posts

TheeDigital Wins 3 MarCom Awards 2018
Awards and Recognition 3 min read

TheeDigital Wins 3 New MarCom Web Design Awards

We’re absolutely thrilled to share that our web design team won 3 new MarCom web design awards…
Richard Horvath

28 Costly Mistakes Your Freelance Web Designer is Making
Digital Marketing 11 min read

28 Costly Mistakes Your Freelance Web Designer is Making

Your freelance web designer could be making crucial mistakes that can severely damage your business. Find out…
Gregory Burke

why is UX essential to your website?
Web Design 7 min read

Why is UX Design Essential to Your Website?

Short for user experience, UX design is all about ensuring that your website visitors have a pleasant,…
Richard Horvath

why are SSL certificates important
Search Engine Optimization 5 min read

Why SSL and HTTPS are Essential for Your Website

Google wants a more secure web and is making HTTPS the standard for all websites. Learn how…
Richard Horvath

Schedule a Consultation