LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (https://www.linuxquestions.org/questions/linux-security-4/)
-   -   user permissions to create files and directories (https://www.linuxquestions.org/questions/linux-security-4/user-permissions-to-create-files-and-directories-481356/)

ringding 09-07-2006 02:57 PM

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!

acid_kewpie 09-07-2006 03:38 PM

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,

ringding 09-07-2006 04:10 PM

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!!!:)

acid_kewpie 09-07-2006 04:34 PM

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.


All times are GMT -5. The time now is 03:44 PM.