0

I installed proftpd using yum in CentOS7. I had an update on WordPress.

pam_env (proftpd: setcred): Unable to open config file: /etc/security/pam_env.conf: permission denied

I do not know how to fix the error. Please help me.

Jan 31 15:28:47 ip-172-31-16-53 proftpd: pam_env(proftpd:setcred): Unable to open config file: /etc/security/pam_env.conf: permission denied 
Jan 31 15:28:47 ip-172-31-16-53 proftpd: pam_systemd(proftpd:session): Failed to connect to system bus: permission denied
Jan 31 15:28:47 ip-172-31-16-53 proftpd: pam_unix(proftpd:session): session closed for user test

/]# yum --y install epel-release
/]# yum install -y proftpd proftpd-utils
setsebool -P ftpd-use_passive_mode on
setsebool -P ftpd_full_access=1
setenforce 0

$ cat /etc/proftpd.conf

#TraceLog             /var/log/proftpd/trace.log                 
#Trace                DEFAULT:0                   
ServerName            "ProFTP"                    
ServerIdent           on "FTP Server ready."      
ServerAdmin           root@localhost              
DefaultServer         on                          
#################################################     
MultilineRFC2228      on                              
ShowSymlinks          on                              
RequireValidShell     off                             
TimeoutNoTransfer     600                             
TimeoutStalled        600                             
TimeoutIdle           1200                            
Port                  21                              
PassivePorts          40001 40002                     
MaxClientsPerHost     5                               
MaxLoginAttempts      5                                         #
MaxClients            30 "Too many connections"                  
TransferLog           /var/log/xferlog                      
UseEncoding           utf8 cp949                            
TimesGMT              off                                   
SetEnv                TZ "Asia/Seoul"                     
AllowOverwrite        on                                  
################################################                 
DefaultRoot           ~ !root                                 
AuthPAMConfig         proftpd                                 
AuthOrder             mod_auth_pam.c* mod_auth_unix.c            
#PersistentPasswd     off                                        
UseReverseDNS         off                                        
User                  nobody                                     
Group                 nobody                                     
MaxInstances          50                                         
UseSendfile           off                                        
LogFormat             default "%h %l %u %t \"%r\" %s %b"         
LogFormat             auth    "%v [%P] %h %t \"%r\" %s"          

<Global>                                                         
  Umask                         022                              
  AllowOverwrite                yes                              
  <Limit ALL SITE_CHMOD>                                         
    AllowAll                                                     
  </Limit>                                                       
</Global>                                                        

What is the cause?

Daniele Santi
  • 2,529
  • 1
  • 25
  • 22
uknew
  • 1
  • 1

1 Answers1

0

It is not related to using AWS EC2 service. As You tried to do it with disabled SELinux, You should check the file system permissions. (The folder and file should be reachable und readable by everyone.)

What probably happens is, that the setcred fails and because of that (or another permission problem) the connection to dbus is not possible.

If first problem is fixed (access to mentioned file which should be easy as it can just be world readable) and the other problem persists, it get's a bit more complicated. (Check system logs / journal for dbus and other services, run Strace or Debug ProFTPD, update the system, reinitialize dbus.)

EOhm
  • 815
  • 3
  • 7