[mdlug] PHP programming with Netbeans IDE
Jonathan Billings
billings at negate.org
Sun Apr 2 08:53:49 EDT 2017
On Apr 1, 2017, at 7:48 PM, JeremyBekka C <jrchristophel at gmail.com> wrote:
> The problem I am having is that Netbeans does not have the privileges to
> access the root directory of the a website in /var/www/html, so I have to
> open Netbeans from the terminal with the "sudo" command. The Netbeans PHP
> tutorial
> <https://netbeans.org/kb/docs/php/configure-php-environment-ubuntu.html#checkInstallation <https://netbeans.org/kb/docs/php/configure-php-environment-ubuntu.html#checkInstallation>>
> tells me to change the root directory to my home folder, but I cannot get
> that to work.
This is pretty terrible advice if you wanted to actually run a production service, so I suspect that whatever distro you are using (the instructions say ubuntu), it isn’t working because the apache httpd package was built to be more secure than the authors of that document realized.
Most likely, if you want to have your user be able to edit the files in the apache httpd web root, you’ll need to add your user to the same UNIX group that the web server runs as. Once your user is a member of that group, that user will be able to edit any files or directories where it has group-write permissions. If it was a SELinux-based distro, you’d also have to fix the SELinux labels if you moved the web root or else the httpd wouldn’t be able to read the files.
--
Jonathan Billings <billings at negate.org>
More information about the mdlug
mailing list