sobota, 28 sierpnia 2010

Fedora: Setting up FTP server

At work I heard about a utility called systemtap (a similar tool to DTrace but for Linux OS) and I wanted to check it on the similar to the production environment (RHEL). I decided to use Fedora as the closest one to the RHEL (RHEL was only available as 6.0 Beta when the article was written). The installation on the vmware went without any problems -> these came afterwards. First thing that came to me was that I need a FTP server in order to upload things onto my Fedora system but out of the box my Fedora 13 installation did not have it enabled. I would divide the procedure into two major steps:

1) installation and firewall setup - follow instruction on wiki page. To summarize - one needs to install the package (yum install vsftp) and setup the firewall rules so that the traffic is passed to the ftp port

2) configuration of access rights - in my case step 1 was still not enough. Each login access attempt as a normal user ended up with error:

500 OOPS: cannot change directory

In order to solve it I needed to change the SELinux boolean value of ftp_home_dir:


# getsebool -a | grep ftp
allow_ftpd_anon_write --> off
allow_ftpd_full_access --> off
allow_ftpd_use_cifs --> off
allow_ftpd_use_nfs --> off
ftp_home_dir --> off
ftpd_connect_db --> off
httpd_enable_ftp_server --> off
sftpd_anon_write --> off
sftpd_enable_homedirs --> off
sftpd_full_access --> off
sftpd_write_ssh_home --> off
tftp_anon_write --> off
# setsebool -P ftp_home_dir on

# getsebool -a | grep ftp
allow_ftpd_anon_write --> off
allow_ftpd_full_access --> off
allow_ftpd_use_cifs --> off
allow_ftpd_use_nfs --> off
ftp_home_dir --> on
ftpd_connect_db --> off
httpd_enable_ftp_server --> off
sftpd_anon_write --> off
sftpd_enable_homedirs --> off
sftpd_full_access --> off
sftpd_write_ssh_home --> off
tftp_anon_write --> off
#

Afterwards I was able to login/create directories/upload files via FTP as a normal OS user ;)

Brak komentarzy:

Prześlij komentarz