> For the complete documentation index, see [llms.txt](https://learn.sitecove.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://learn.sitecove.com/how-to-guides/web-hosting/control-panel-and-server-management/how-to-manage-users-and-permissions.md).

# How to Manage Users & Permissions

#### Introduction <a href="#introduction" id="introduction"></a>

Managing users and permissions is crucial for maintaining security and control over your server or hosting environment. Whether you are using a control panel like cPanel, Plesk, or DirectAdmin, or managing a Linux server via SSH, understanding how to create users and assign appropriate permissions ensures that only authorized individuals can access and modify critical files. This guide will walk you through the process of managing users and permissions effectively.

#### Step 1: Understanding User Roles and Permissions <a href="#step-1-understanding-user-roles-and-permissions" id="step-1-understanding-user-roles-and-permissions"></a>

#### **Types of Users** <a href="#types-of-users" id="types-of-users"></a>

* **Administrator (Root/Superuser):** Has full control over the server and all files.
* **Reseller:** In control of managing multiple hosting accounts (common in shared hosting environments).
* **Regular Users:** Can manage their websites and email accounts but have limited access to server settings.
* **FTP Users:** Only have access to upload/download files.

#### **Permission Levels** <a href="#permission-levels" id="permission-levels"></a>

* **Read (r):** Allows viewing file contents.
* **Write (w):** Allows modifying or deleting files.
* **Execute (x):** Allows running scripts or applications.
* **Owner, Group, Others:** Determines who can access files (owner, specific user groups, or the public).

#### Step 2: Managing Users & Permissions in cPanel <a href="#step-2-managing-users-permissions-in-cpanel" id="step-2-managing-users-permissions-in-cpanel"></a>

1. **Log into cPanel**
   * Access cPanel via `https://yourdomain.com/cpanel`.
2. **Create New Users**
   * Navigate to **User Manager** under the **Preferences** section.
   * Click **Add User**, enter details (username, email, password), and set privileges.
3. **Assign File Permissions**
   * Use the **File Manager** in cPanel.
   * Right-click a file or folder and select **Change Permissions** to modify access levels.
4. **Manage FTP Accounts**
   * Go to **FTP Accounts** to create and manage access for different users.

#### Step 3: Managing Users & Permissions in Plesk <a href="#step-3-managing-users-permissions-in-plesk" id="step-3-managing-users-permissions-in-plesk"></a>

1. **Log into Plesk**
   * Access Plesk via `https://yourdomain.com:8443`.
2. **Create User Accounts**
   * Navigate to **Users** > **Add User**.
   * Assign roles such as Administrator, Web User, or FTP User.
3. **Set Permissions**
   * In **File Manager**, select a file or directory and modify access settings.
4. **Manage FTP & Database Users**
   * Under **Websites & Domains**, you can create database and FTP users with restricted access.

#### Step 4: Managing Users & Permissions in DirectAdmin <a href="#step-4-managing-users-permissions-in-directadmin" id="step-4-managing-users-permissions-in-directadmin"></a>

1. **Log into DirectAdmin**
   * Access DirectAdmin via `https://yourdomain.com:2222`.
2. **Add Users**
   * Go to **Account Manager** > **User Accounts**.
   * Click **Create User** and assign necessary privileges.
3. **Modify File Permissions**
   * Use the **File Manager** to adjust file and folder permissions.

#### Step 5: Managing Users & Permissions via SSH (Linux Server) <a href="#step-5-managing-users-permissions-via-ssh-linux-server" id="step-5-managing-users-permissions-via-ssh-linux-server"></a>

If you're using a VPS or dedicated server without a control panel, you can manage users via SSH.

#### **Creating Users** <a href="#creating-users" id="creating-users"></a>

```bash
sudo adduser newusername
```

BashCopy

#### **Assigning User Permissions** <a href="#assigning-user-permissions" id="assigning-user-permissions"></a>

* Change file ownership:

```bash
sudo chown username:groupname /path/to/file
```

BashCopy

* Modify permissions:

```bash
sudo chmod 755 /path/to/file
```

BashCopy

#### **Granting Sudo Privileges** <a href="#granting-sudo-privileges" id="granting-sudo-privileges"></a>

To give a user administrative privileges, add them to the sudo group:

```bash
sudo usermod -aG sudo newusername
```

BashCopy

#### **Managing User Access** <a href="#managing-user-access" id="managing-user-access"></a>

* List users:

```bash
cat /etc/passwd
```

BashCopy

* Delete a user:

```bash
sudo deluser username
```

BashCopy

#### Best Practices for User Management <a href="#best-practices-for-user-management" id="best-practices-for-user-management"></a>

* **Use the principle of least privilege (PoLP):** Grant only necessary permissions.
* **Regularly review user access:** Remove or restrict inactive users.
* **Use strong passwords and SSH keys:** Enhance security by enforcing strong authentication methods.
* **Monitor user activity:** Check logs for unauthorized access attempts.

#### Conclusion <a href="#conclusion" id="conclusion"></a>

Proper user and permission management is essential for maintaining security and efficiency in your hosting environment. Whether using cPanel, Plesk, DirectAdmin, or a Linux server, ensuring the right users have the correct level of access helps protect your data and server integrity.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://learn.sitecove.com/how-to-guides/web-hosting/control-panel-and-server-management/how-to-manage-users-and-permissions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
