Set up FTP and CIFS access on Linux


Server Build

  • SSH to the host
  • sudo su .
  • vim /etc/yum.conf
proxy=http://host:port
[ol6_latest]
name=Oracle Linux $releasever Latest ($basearch)
gpgcheck=1
enabled=1

User Configuration

  • groupadd fileshare
  • useradd administrator
  • useradd Administrator
  • passwd administrator
  • passwd Administrator
  • usermod -a -G fileshare administrator
  • usermod -a -G fileshare Administrator
  • smbpasswd -a administrator
  • smbpasswd -a Administrator
  • mkdir -P /some/dir/fileshare
  • chown -R administrator:fileshare /some/dir/fileshare

FTP Configuration

  • vim /etc/vsftpd/vsftpd.conf
anonymous_enable=NO
local_enable=YES
write_enable=YES
local_umask=022
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
xferlog_std_format=YES
listen=YES
pam_service_name=vsftpd
userlist_enable=YES
userlist_deny=NO
tcp_wrappers=YES
local_root=/some/dir/fileshare
anon_root=/some/dir/fileshare
userlist_file=/etc/vsftpd/user_list
  • vim /etc/vsftpd/user_list
    • append administrator and Administrator to the list
  • /etc/init.d/vsftpd start/stop
  • ftp://fileshare-host.com

SMB/CIFS Configuration

  • vim /etc/samba/smb.conf
  • Everything should be commented out except the following -
        [global]
        workgroup = MYGROUP
        server string = Samba Server Version %v
        netbios name = fileshare-host
        log file = /var/log/samba/log.%m
        max log size = 50
        security = user
        passdb backend = tdbsam

        [public]
        comment = Public Stuff
        path = /some/dir/fileshare
        public = yes
        writable = yes
        printable = no
        write list = @fileshare
  • /sbin/service smb start/stop
  • \\fileshare-host\public


Comments

Popular posts from this blog

An Ideal Boy

Automated Testing with vncdotool (Not Headless, but Hairless)

Install Guide for Pentaho BI Server 4.8 (Community Edition) with MySQL on Windows