Joomla install on Centos 7 directory permission is unwritable

Discussion in 'HOWTO-Related Questions' started by sgugloth, Oct 1, 2014.

  1. sgugloth

    sgugloth New Member

    Hello,

    I recently bought virtual server and have centos 7 install. I install LAMP and Joomla 3.3.4 stable version following
    http://www.howtoforge.com/apache_php_mysql_on_centos_7_lamp
    http://www.howtoforge.com/how-to-install-joomla-on-centos-7

    The installation was done and i can access the site and admin page. But trying to upload templates i am getting following error:
    Warning
    Warning: Failed to move file!

    JFolder: :files: Path is not a folder. Path: /var/www/html/joomla/tmp/install_542b61271f5d0

    JFolder: :folder: Path is not a folder. Path: /var/www/html/joomla/tmp/install_542b61271f5d0

    JFolder: :files: Path is not a folder. Path: /var/www/html/joomla/tmp/install_542b61271f5d0

    JInstaller: :Install: Cannot find Joomla XML setup file

    From Joomla administrator console under system->system Information --> directory permission everything it show is unwritable.

    I tried googling and non of the resolution is working. Can some one help me on this.

    Is is problem with apache user not providing folder access permission?

    My installation location is /var/www/html/joomla
    and the folder and its content are assigned to apache:apache

    Regards,
    Sandeep
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Please post the output of:

    ps aux | grep http

    and check the apache error.log for errors.
     
  3. florian030

    florian030 ISPConfig Developer ISPConfig Developer

    You shoud also adjust the permissions. If evertyhing is not writeable, you can not install anything. The default-permissions afre 755 for dirs and 644 for files as described here.
     
  4. srijan

    srijan New Member HowtoForge Supporter

    Hi Sandeep,

    As the upload service is ftp so allow ftp across firewall-cmd in CentOS-7
    It should work
     
  5. srijan

    srijan New Member HowtoForge Supporter

  6. sgugloth

    sgugloth New Member

    Thanks for the reply.

    @till here is the output for ps aux | grep http

    [[email protected] joomla]# ps aux | grep http
    root 788 0.0 3.4 474576 17140 ? Ss 11:02 0:00 /usr/sbin/httpd -DFOREGROUND
    apache 2047 0.0 2.0 474576 10148 ? S 11:02 0:00 /usr/sbin/httpd -DFOREGROUND
    apache 2048 0.0 2.7 578656 13824 ? S 11:02 0:00 /usr/sbin/httpd -DFOREGROUND
    apache 2049 0.0 3.3 478456 16992 ? S 11:02 0:00 /usr/sbin/httpd -DFOREGROUND
    apache 2051 0.0 1.9 474576 9560 ? S 11:02 0:00 /usr/sbin/httpd -DFOREGROUND
    apache 2075 0.0 1.9 474576 9564 ? S 11:23 0:00 /usr/sbin/httpd -DFOREGROUND
    apache 2079 0.0 1.9 474576 9564 ? S 11:23 0:00 /usr/sbin/httpd -DFOREGROUND
    apache 2080 0.2 4.2 585860 21356 ? S 11:23 0:00 /usr/sbin/httpd -DFOREGROUND
    apache 2081 0.0 1.9 474576 9564 ? S 11:23 0:00 /usr/sbin/httpd -DFOREGROUND
    apache 2082 0.0 1.9 474576 9564 ? S 11:23 0:00 /usr/sbin/httpd -DFOREGROUND
    apache 2083 0.0 1.9 474576 9564 ? S 11:23 0:00 /usr/sbin/httpd -DFOREGROUND
    root 2110 0.0 0.1 112640 976 pts/0 R+ 11:26 0:00 grep --color=auto http

    @ florian030 i did verify directory permission and file permission accordingly.

    @srijan i get following for the command
    [[email protected] joomla]# firewall-cmd --permanent --zone=public --add-service=ftp
    FirewallD is not running

    @srijan cannot get to URL http://docs.joomla.org/AC

    I am also new to linux, guide me appropriately.
    I have opened threads in Joomla : http://forum.joomla.org/viewtopic.php?f=707&t=860505
    but no resolution

    Regards,
    Sandeep
     
  7. sgugloth

    sgugloth New Member

    @till here are the last attempt on uploading template from joomla and output from error_log;
    [Thu Oct 02 11:02:11.426402 2014] [core:notice] [pid 788] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
    [Thu Oct 02 11:50:14.416385 2014] [core:notice] [pid 784] SELinux policy enabled; httpd running as context system_u:system_r:httpd_t:s0
    [Thu Oct 02 11:50:14.436526 2014] [suexec:notice] [pid 784] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
    AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using localhost.localdomain. Set the 'ServerName' directive globally to suppress this messa$
    [Thu Oct 02 11:50:14.479041 2014] [auth_digest:notice] [pid 784] AH01757: generating secret for digest authentication ...
    [Thu Oct 02 11:50:14.480171 2014] [lbmethod_heartbeat:notice] [pid 784] AH02282: No slotmem from mod_heartmonitor
    [Thu Oct 02 11:50:18.423724 2014] [mpm_prefork:notice] [pid 784] AH00163: Apache/2.4.6 (CentOS) PHP/5.4.16 configured -- resuming normal operations
    [Thu Oct 02 11:50:18.423802 2014] [core:notice] [pid 784] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
     
  8. srijan

    srijan New Member HowtoForge Supporter

    I will suggest to make frewall ON for security purpose

    sorry the link was http://docs.joomla.org/Verifying_permissions

    Try to make SELINUX disabled, reboot and try the upload.

    If you want the SELINUX ON then add the FTP and http/https override addition in the SELINUX with targetted mode of SELINUX
     
  9. sgugloth

    sgugloth New Member

    @srijan

    I got it working. Thank you

    Here are the steps performed.

    1 - Edit /etc/selinux/config , change SELINUX=enforcing to SELINUX=permissive

    2 - Install FTP
    sudo yum install vsftpd
    systemctl vsftpd start
    chkconfig vsftpd on
    OPEN up /etc/vsftpd/vsftpd.conf in your favorite editor:
    anonymous_enable=NO
    local_enable=YES
    chroot_local_user=YES
    systemctl restart vsftpd

    3 - Add user and assign the user to a group
    useradd ftpuser
    passwd ftpuser
    usermod -d /var/www/html/joomla ftpuser//assign home dir to user
    useradd -s /sbin/nologin ftpuser
    groupadd www-users
    gpasswd -a ftpuser www-users //assign user to group
    gpasswd -a apache www-users //assign user to group
    usermod -a -G www-users ftpuser
    usermod -a -G www-users apache
    chmod 2775 /var/www/html/joomla
    chown -R apache:www-users /var/www/html/joomla
    chmod g+s /var/www/html/joomla
    systemctl restart httpd.service
    systemctl restart vsftpd.service

    4 - Modify httpd.conf
    change Groups apache to Groups www-users

    Regards,
    Sandeep
     

Share This Page