How to Fix File Ownership and Permissions
Understanding and managing file ownership and permissions is important for maintaining control and security over your files. You can easily troubleshoot access issues caused by incorrect file permissions or ownership through your Bluehost Account Manager.
In this article, we will walk you through how you can reset your file permissions to default and ownership to the correct user.
Fixing File Ownership and Permissions
- Log in to your Bluehost Account Manager.
- Click Websites on the left menu.
- On the Websites page, click the FILES & ACCESS tab in the top menu.
-
Scroll down to the Fix File Ownership card, and click on the MANAGE button.
-
On the Fix File Ownership page, put a checkmark on "I understand that this will reset file ownership and permissions to their default values, which may affect file accessibility." to continue. By checking this box, you confirm your understanding and agree to proceed.
-
Click CONFIRM.
Permission Groups and Types
Each file and folder in your server has three user-based permission groups:
- User - This refers to the owner of the files or folders.
- Group - This refers to the other users on your server.
- World - This includes any public visitors (essentially, anyone on the internet).
Each group has different levels of access:
- Read (r) - Users can view the file or folder.
- Write (w) - Users can write or modify the file or folder.
- Execute (x) - Users can run the file as a program.
Default Permissions for Files and Folders
In the File Manager, permissions are displayed as a string of numbers. These numbers represent a combination of unique permissions. The first of the three digits indicates the permissions for the User, the second digit represents the Group, and the third digit signifies the World.
Typically, we only need to focus on the last three digits. If you see four digits, simply disregard the first digit. So, if you see 0755, it is equivalent to 755.
- Read - Represented by the number 4.
- Write - Represented by the number 2.
- Execute - Represented by the number 1.
- No permissions for a user are equivalent to 0.
Here are examples of how to interpret these numbers:
- Write (2) and Execute (1) without Read (4) is equal to 3.
- Read (4) and Execute (1) without Write (4) is equal to 5.
- Read (4) and Write (2) without Execute (1) is equal to 6.
- Read (4) and Write (2) and Execute (1) is equal to 7.
Below are the default permissions of files and folders based on the above numbers.
- File (0644 or 644) - The file owner (User) can read and edit the file, while the Group and World (everyone else) can only read the file.
- Folder (0755 or 755) - The folder owner (User) has full access, which means they can read, write, and open the folder. In contrast, the Group and World (everyone else) can only read and open the folder, but they cannot add or delete files.
Summary
Learning how to manage and fix file permissions is important for ensuring proper access and security across your website files. This article walks you through resetting your file ownership and restoring default file permissions through your Bluehost Account Manager. You'll also learn how permission groups and numeric values work, helping you troubleshoot access issues and maintain a secure hosting environment.
If you need further assistance, feel free to contact us via Chat or Phone:
- Chat Support - While on our website, you should see a CHAT bubble in the bottom right-hand corner of the page. Click anywhere on the bubble to begin a chat session.
- Phone Support -
- US: 888-401-4678
- International: +1 801-765-9400
You may also refer to our Knowledge Base articles to help answer common questions and guide you through various setup, configuration, and troubleshooting steps.