How to allow the root user to access the FTP server?

0
3

How to allow the root user to access the FTP server?

By default root user is blocked to access the FTP server. To allow the root user to access the FTP server follow the below steps.

  • Open the /etc/vsftpd/user_list file by # vim /etc/vsftpd/user_list command.
  • Go to root user line and comment on that line. For example # root (save and exit the file).
  • Open the /etc/vsftpd/ftpuser file by # vim /etc/vsftpd/ftpuser command.
  • Go to root user line and comment on that line. For example # root (save and exit the file).
  • Restart the ftp deamon by

# service vsftpd restart command in RHEL – 6

or

# systemctl restart vsftpd command in RHEL – 7

Even though we changed the above, the root user cannot access the FTP server because the home directory context is not added. we can solve this as follows.

  • # getsebool -a | grep ftp (to check the SELinux Boolean of the root home directory).
  • # setsebool -p ftp_home_dir on (to change the Boolean of the root home directory).

Now go to client system and try to login the FTP server as root user. Here we can access the FTP server.

Related Articles:

Follow the above 7 steps to allow the root user to access the FTP server. If you have any doubts related to this article please let us know.

LEAVE A REPLY

Please enter your comment!
Please enter your name here