LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to give a user only ftp server privilege using sudo? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-give-a-user-only-ftp-server-privilege-using-sudo-681088/)

dolceinter1 11-04-2008 01:10 PM

How to give a user only ftp server privilege using sudo?
 
I'm the root I'm trying to give user Mike only ftp server rights using sudo.

For example, The user joe may only su to operator:

joe ALL = /usr/bin/su operator

Now, what to do to give user mike only ftp servers rights?


Please help!!!

cygnal 11-05-2008 07:56 AM

You can either use the startup script in /etc/init.d:

Code:

mike ALL=/etc/init.d/NAME_OF_FTP_SCRIPT start, /etc/init.d/NAME_OF_FTP_SCRIPT stop, /etc/init.d/NAME_OF_FTP_SCRIPT restart
or, if you have Fedora or RedHat, you can give him permission to use the 'service' command:

Code:

mike ALL=/sbin/service FTP_SERVICE_NAME start, /sbin/service FTP_SERVICE_NAME stop, /sbin/service FTP_SERVICE_NAME restart, /sbin/service FTP_SERVICE_NAME status
The above will give him permission to start, stop, restart, and check the status of the ftp server daemon. FTP_SERVICE_NAME will be whatever the name of the ftp service is, depending on which one you have installed (most likely vsftpd). NAME_OF_FTP_SCRIPT will also likely change depending on which ftp service you have installed.

Remember to use the visudo command to edit the /etc/sudoers file, it locks the file from being accessed by anyone else while being edited and provides syntax error checking.


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