Hello,
First of all, thank you for aaPanel — it’s a perfect tool for me to start learning the world of web hosting.
I’m facing an issue when trying to use git. I just want to clone a repository into the wwwroot folder, but I always get a permission denied error.
Some context:
• I’m new to web hosting, but i have over 8 years of experience in web programming.
• I’m running aaPanel on a dedicated server.
• I followed this video to secure my server: First steps to secure your server
• My user is not root, but it belongs to the sudo group.
• I understand that wwwroot is usually managed by root or the www user.
• I don’t think it’s a good practice to run git clone with sudo for the future (especially with a Symfony project).
I connect via ssh with a key as recommended in the video, and I also tried running the command from the aaPanel terminal, but the issue remains.
My question is: what is the proper and recommended way to clone a git repository into wwwroot?
should I always use sudo, or is there a better practice to set this up?
Thank you in advance for your help!