LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 01-31-2015, 10:45 PM   #1
kb2tfa
Member
 
Registered: Oct 2006
Location: New Jersey
Distribution: CentOS
Posts: 175

Rep: Reputation: 18
root login to edit vhost with netbeans or eclipse on centos


Right now, I have my document root for a vhost in /var/www/html/mysite.com
I would like to do away with remote root log in. Would it be better if I moved the document root to a user home directory? That way I can login as a user to edit, and not need root. Any thoughts?
 
Old 02-03-2015, 12:56 AM   #2
QYInst
LQ Newbie
 
Registered: Jan 2015
Posts: 17

Rep: Reputation: Disabled
You can login as user, and then use
Code:
su
or
Code:
su - root
to get the root privilege.
 
Old 02-03-2015, 09:36 PM   #3
kb2tfa
Member
 
Registered: Oct 2006
Location: New Jersey
Distribution: CentOS
Posts: 175

Original Poster
Rep: Reputation: 18
Quote:
Originally Posted by QYInst View Post
You can login as user, and then use
Code:
su
or
Code:
su - root
to get the root privilege.
I didn't know you could 'su' in Netbeans IDE or Elcipse IDE thank you, I'll look into it.
 
Old 02-03-2015, 11:41 PM   #4
QYInst
LQ Newbie
 
Registered: Jan 2015
Posts: 17

Rep: Reputation: Disabled
Quote:
Originally Posted by kb2tfa View Post
I didn't know you could 'su' in Netbeans IDE or Elcipse IDE thank you, I'll look into it.
If it does not work.
You can also add your user to the group owner of the file, and grant the read/wirte privilege to the group using chmod.
In this case you do not need to login as root.
 
Old 02-04-2015, 12:28 AM   #5
kb2tfa
Member
 
Registered: Oct 2006
Location: New Jersey
Distribution: CentOS
Posts: 175

Original Poster
Rep: Reputation: 18
Quote:
Originally Posted by QYInst View Post
If it does not work.
You can also add your user to the group owner of the file, and grant the read/wirte privilege to the group using chmod.
In this case you do not need to login as root.
like chown -R ron.ron /var/www/mysite
 
Old 02-04-2015, 02:11 AM   #6
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,344

Rep: Reputation: 2746Reputation: 2746Reputation: 2746Reputation: 2746Reputation: 2746Reputation: 2746Reputation: 2746Reputation: 2746Reputation: 2746Reputation: 2746Reputation: 2746
Just FYI, 'su' just logs you in as root, BUT with your original env . You need the '-' to get root's env eg 'su - ' (default target is root user if no other specified)
 
  


Reply

Tags
centos, eclipse, netbeans, root, vhost


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Netbeans IDE not installing on CentOS as root user harunaadoga Linux - Newbie 2 10-03-2014 02:08 PM
Netbeans Or Eclipse nesrail Programming 1 01-28-2009 08:25 AM
script to edit all vhost at once. (cp a file into all of them) permalac Linux - Newbie 0 11-11-2008 04:33 AM
Eclipse or Netbeans? koyi Programming 16 09-01-2006 03:49 PM
LXer: Netbeans attempts to eclipse Eclipse LXer Syndicated Linux News 0 04-17-2006 09:54 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 06:39 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration