Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/maruf-pfc/php-mysql-project-run-in-linux

Run PHP MySQL Projects on Linux
https://github.com/maruf-pfc/php-mysql-project-run-in-linux

lampp linux mysql php xampp

Last synced: 7 days ago
JSON representation

Run PHP MySQL Projects on Linux

Awesome Lists containing this project

README

        

The problem involves restricted access to the /opt/lampp/htdocs directory, which is owned by the root user, preventing the user "maruf" from accessing it for development. The solution entails changing the ownership and permissions of the directory, allowing "maruf" to read, write, and execute files within it, enabling seamless development using Visual Studio Code.

To give your user "maruf" access to the `/opt/lampp/htdocs` directory and allow you to work with VSCode, you can change the ownership and permissions of the folder. Here are the steps:

1. **Change Ownership**: You can change the ownership of the folder to "maruf" using the `chown` command.
```bash
sudo chown -R maruf:maruf /opt/lampp/htdocs
```

This will give your user ownership of the directory and its contents recursively.

2. **Adjust Permissions**: If you also want to modify permissions, you can use the `chmod` command. For example, to give read, write, and execute permissions to the owner and group, and read and execute permissions to others:
```bash
sudo chmod -R 755 /opt/lampp/htdocs
```

3. **Add User to `www-data` Group (Optional)**: If the web server uses the `www-data` group, you can also add "maruf" to this group:
```bash
sudo usermod -aG www-data maruf
```

4. **Restart the Web Server**: If needed, restart your web server to apply the changes.
```bash
sudo /opt/lampp/lampp restart
```

After following these steps, you should be able to work on your PHP project in VSCode without permission issues.