I get this error warning when I select to copy project files from source folder to another location (my apache root: /var/www/html/) "The directory must be accessible via your web server at URL http://localhost/html/PhpProject2/". This ends up giving an error on running the project. I want to be able to create netbeans projects in apache root and run them from netbeans.


Run following command to, when you want to edit files. (This make file accessible/editable for all users)

sudo chown -R www-data:www-data /var/www/html/

sudo chmod -R 777 /var/www/html/

And to revert back, run following command (make file inaccessible/ to group and others)

sudo chmod -R 755 /var/www/html/

sudo chmod -R 644 /var/www/html/

  • Thanks Sagar that was really helpful, in addition to your answer the following configuration also made it happen: "Under name and location settings: Source URL=/var/www/html/netbeans-project-name/, and under run configuration: Project URL=localhost/netbeans-project-name". this helped me. Most grateful Sagar – George Udosen Oct 14 '15 at 14:19

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.