• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • Devaka Cooray
Saloon Keepers:
  • Ganesh Patekar
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • salvin francis
Bartenders:
  • Ron McLeod
  • Frits Walraven
  • Pete Letkeman

root file edit with an IDE  RSS feed

 
Ranch Hand
Posts: 135
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys I had a problem today at work using Netbeans, the IDE. (just doing research) I tried finding information online, but really there is nothing; maybe because people use VIM or sublime.

Anyhow, to code in PHP/Mysql I use VIM and I ususally need to #SU (go into root) in order to write and edit my index.php file under /var/www/html

however, I wanted to try using Netbeans but I can not open a new project under /var/www/html since it says it is unwritable. I can not just change the permissions in root, so how would I be able to add a project using IDE, netbeans in the /var/www/html directory?
 
Bartender
Posts: 19807
93
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You cannot use any editor to edit a file that you don't have permissions for, whether it's vi, emacs, or a full-blown IDE. The fact that it's in the root directory is immaterial.

You could start the IDE up under sudo and thus run with root permissions, but that does carry the risk that you'd forget and accidentally zap something important.

However, /var/www is often owned by the "apache" user group, and if you added your userid to that group, you'd be able to edit any file in there that allowed group users to write it.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!