LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 08-24-2019, 09:46 AM   #1
Winanjaya
Member
 
Registered: Sep 2003
Posts: 239

Rep: Reputation: 32
How to make 2nd root with limited root access


Hi All.

How to make 2nd root that only has access to:

His own home and /var/www/hrml/hisdomain ?
But he can start/restart httpd service.

I am running CentOS 7

Please help

Thanks
 
Old 08-24-2019, 10:18 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,753

Rep: Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983
Quote:
Originally Posted by Winanjaya View Post
Hi All.
How to make 2nd root that only has access to:

His own home and /var/www/hrml/hisdomain ?
But he can start/restart httpd service.

I am running CentOS 7
You don't make a 'second root', with limited access. Having a root account says they have UNLIMITED access to everything; that's what the root account is. After working with Linux and Apache for SIXTEEN YEARS now, you should be well aware of what the root account is, and how it works.

Why don't you add a user to the sudoers file, giving them rights to run "service apache2 restart", and group access to whatever directory you want to have their HTML files in. You could also enable the "FollowSymLinks" directive in Apache, and have their web files in their own home directory, with a symlink to the /var/www/html/<something> folder.
 
Old 08-24-2019, 10:19 AM   #3
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,883
Blog Entries: 13

Rep: Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931
Quote:
Originally Posted by Winanjaya View Post
Hi All.

How to make 2nd root that only has access to:

His own home and /var/www/hrml/hisdomain ?
But he can start/restart httpd service.

I am running CentOS 7

Please help

Thanks
There's only one system root.

Make a new account with the privs you need using useradd.

Use sudo for any privileged operations.
 
1 members found this post helpful.
  


Reply



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
[SOLVED] shell script to give root access to user for limited time? rakrr786 Linux - Newbie 9 05-31-2012 12:08 AM
getting a 2nd tty out of a 2nd serial port nass Linux - Embedded & Single-board computer 3 09-13-2011 09:27 AM
Encrypt 2nd drive without 2nd boot time passphrase: How? gargamel Slackware - Installation 15 05-30-2009 02:50 PM
Slackware as 2nd os on 2nd hdd chd_lad Linux - Newbie 7 04-05-2008 03:43 PM
Added a 2nd Sata Drive installed Fedora Core 5, BIOS Doesn't See 2nd Drive. mtmcc1 Linux - General 3 12-03-2005 04:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 10:10 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