LinuxQuestions.org
Visit Jeremy's Blog.
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 09-07-2006, 03:57 PM   #1
ringding
LQ Newbie
 
Registered: Feb 2005
Distribution: RH9, RHEnt.
Posts: 23

Rep: Reputation: 0
Question user permissions to create files and directories via ssh


Stupid newbie question....
I am starting a new linux server (RHEL4) and the only user right now is root. The only person administering the box is myself (at least with root access).

There is one other person who needs access via SSH (which is setup) to change a few settings for our apache sevrer.

I created a user ID for this person and he can currently login via SSH but he cannot change any files that need to changed. I put him into the root group but still cannot change anything....I know I can have him "su" to root but that would be giving him root password....I do not want to give him root password. How can I change his user ID permissions so he can change files in the apache2 directory? OR is it possible to give him a temporary root password that I can disable later?

Thanks Much!

Last edited by ringding; 09-07-2006 at 04:27 PM.
 
Old 09-07-2006, 04:38 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,415

Rep: Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968
ok, well your main point of reference is possible sudo, which lets you customize the /etc/sudoers file to allow non-root users to edit root owned files without root password. alternatively change the ownership of the files and the directory they live in to be owned by another group or user that they do have access to. what directory do you mean by the apache2 directory? /var/www/html or something? with fles here, as long as the apache daemon user (which may be root, apache or somethign else) can read those files, it doesn't matter who owns them,
 
Old 09-07-2006, 05:10 PM   #3
ringding
LQ Newbie
 
Registered: Feb 2005
Distribution: RH9, RHEnt.
Posts: 23

Original Poster
Rep: Reputation: 0
AH!!....the sudo option sounds like the way to go!!!!
This way, once he is done modifying what he needs to I can simply remove it from the sudoers file and he will no longer have access.

Would he use the same password to authenticate as his normal user password?
i.e. sudo <enter>
then authenticate
then vi filename <enter>

OR

i.e. sudo vi filename <enter>
then authenticate

Oh and I think "apache2" directory which is /usr/local/apache2/....is created when you compile a new apache server from source....

THANKS ALOT!!!
 
Old 09-07-2006, 05:34 PM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,415

Rep: Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968
the first scenario you gave is closer to the su command, where you do need the root password, and compltely become root from then on. the second is correct for sudo, and they enter their own password (or none) as defined in /etc/sudoers.
 
  


Reply

Tags
permissions, user


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
vsFTPd local user can't create directories nuzzy Linux - Software 11 12-04-2011 11:45 PM
Apache user directories permissions Wordan Linux - Networking 9 07-14-2006 04:42 PM
permissions for group files/directories transferred from Netware mweil Linux - Newbie 1 07-01-2004 11:36 PM
How do I change permissions of files/directories? Okashira Linux - Newbie 5 01-12-2004 06:11 PM
Create an archive file which includes files in sub-directories? amaze Linux - General 1 09-26-2003 09:43 AM


All times are GMT -5. The time now is 01:55 PM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration