Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

244
Views
pi raspbian buster apache2 www-data forbidden on different directory 2021

I have searched for recent posts on this, and older ones do not fix the issue. I have Rasbian Buster (2021) on a pi4. Apache2. The default /var/www/html works trying to move it to a hdd /media/pi/Data/www/html fails I have given it www-data user and group permissions for all folders. I have checked that it has this in GUI and console. Looking at the permissions on /var/www/html they are ROOT when apache2 is installed and this site works. BUT all documents say it should be www-data. Ihave not tried changing it as it will probably break it and is my reference. I have checked that apache2 envars APACHE_RUN_USER = www-data and APACHE_RUN_GROUP=www-data

So why does it install /var/www/html as ROOT but all documents (rightly) say www-data should have permissions then it still not work?

For example I followed https://pimylifeup.com/raspberry-pi-apache/ and logged ou etc and it still fails ith Forbidden :Yu dn'thave permission to access this resource. There seem to be varying ways to fix it, but not so only www-data has access, and I shouldn't need ROOT to have it as its very bad practice...so why does the default site have it?!

Wht is the correct fix to use adifferent directory for the website (eventualy it will be webdav but one simple step at a time!) Thank you

over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!