[mdlug] PHP programming with Netbeans IDE

JeremyBekka C jrchristophel at gmail.com
Fri Apr 7 10:33:05 EDT 2017


Hi Johnathan,

Thanks for your advice, and sorry for the delay in responding. My server is
just a localhost server on my laptop for me to learn on. I am following the
php tutorial on wschools.com and running the code there on my server to see
how it works. So, security is not really an issue since I don't have a
website on the Internet.

In order to get NetBeans to work with my localhost server I had to change
the owner of /var/www/html from root to my user account and then added my
user to the www-data group. I also changed the permissions to 755. Now I am
able to get NetBeans to connect to my server and edit files that I have
there.

Thanks for you help,

Jeremy

On Sun, Apr 2, 2017 at 8:53 AM, Jonathan Billings <billings at negate.org>
wrote:

> 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>
>
>
> _______________________________________________
> mdlug mailing list
> mdlug at mdlug.org
> http://mdlug.org/mailman/listinfo/mdlug


More information about the mdlug mailing list