• Skip to main content
  • Skip to header right navigation
  • Skip to site footer

Vi Wickam

Loveland Colorado Online Marketing, Website Design and Ecommerce web development

  • Home
  • Meet Vi
  • What Vi Does
    • Website Creation
    • Big Picture Online Marketing
  • Blog
  • Contact
August 4, 2017 by Vi Wickam

How to Reset Website File Permissions from Command Line

If you have ever worked on a website, there is a good chance that you have had problems with file permissions. In this article, I’m going to walk you through how to reset file permissions on your whole site to the recommended standard file permissions via linux command line.

  1. The first step in this process is to connect to the server via a terminal program. The standard today is to use Secure Shell (SSH) to connect to a server via terminal. SSH is an encrypted (secure) way to connect to a server and view a terminal screen. The SSH client that I use is called Putty. It’s free, and works very well. I link mine together with my FTP/SCP client program, WinSCP.
    I’m not going to cover how to use Putty or WinSCP in this brief tutorial, but you will need to use a terminal client such as putty to connect to your linux server.
  2.  Next, type the following command to set all of the file permissions of every file in your account to 644. 
     chmod -R 644 *

    This command will change the permissions on the file to be writeable and readable (6) by you, and readable (4) by other members of the group you belong to and the rest of the world. The readable by everybody is especially important because on a web site, you need to make the files viewable to the world. And if you want plugins to function correctly, the files need to be editable by you. 

  3.  Next, type the following command to set all of the directory/folder permissions of every file in your account to 755. (or copy and paste)
     find . -type d -exec chmod 0755 {} \;

    This searches through all of the files in your site and sets the directory permissions to 755 – Read/Write/Execute for you, and Read/Execute for group and world (everyone except you.) In the Linux/Unix world directories must be executable or nobody will be able to access them.

I hope this tutorial on resetting file permissions is useful for you.

Category: Internet, WordpressTag: command line, file permissions, linux, ssh

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Get a Quote

"*" indicates required fields

1
2
Name*
This doesn't need to be an exact budget, but I need an idea of what the approximate budget is that you are planning on for this project.
Give me some more detail about this project so that I can understand what you have in mind and in what areas you would like me to help you out.
This field is for validation purposes and should be left unchanged.

Copyright © 2023 · Wizard of Ads Online · All Rights Reserved · Vi Wickam is a Wizard of Ads Digital Marketing and Strategy Partner