Search code examples
phppermissionsftpjoomla3.0file-ownership

Joomla 3.2 installation file/directory ownership issues


I am trying to install Joomla 3.2 using the host provided by my university. So, I have available one mysql database with the username and pass and the ftp username and pass to transfer data, only. That is, no Cpanel installed or ssh available.

If I extract the file Joomla_3.2.0-Stable-Full_Package.zip and ftp the contents on the website, the owner of these files/folders is user "ftp_username". I can continue to install Joomla only if I set-up the ftp layer.

This works, except I get from time to time messages like --> JFTP: :rename: Bad response Rename failed More specifically I get this message when using kunena.

Moreover, I read online that the FTP layer shouldn't be used normally. Also, the tmp/cache/logs create permission problems.

If I remove the ftp layer (by editing the configuration.php) then I cannot modify anything since Joomla cannot modify the files (owned by ftp_username). Of course, I could change all permissions to 777, but that would be suicide...

I found a post explaining a bit the situation I'm here! Especially the advice on using "chmod 4770" is feasible but I don't know about how secure it is (haven't tried it).

Anyone has an idea how I can make this work?

cross-posted here

Thanks in advance


Solution

  • I found a way to bypass this problem. Not worth it if you have an alternative provider!

    1. I installed joomla with ftp layer
    2. I installed Extplorer plugin
    3. Used plugin to upload Joomla_3.2.0-Stable-Full_Package.zip on the server. Now the file is owned by the apache user.
    4. Deleted all the (joomla installation) files on the server except the zip file
    5. Uploaded a php script to unzip the file using php (http://php.net/manual/en/ziparchive.open.php). The installation folders/files are now owned by apache user
    6. Reinstall Joomla without the ftp layer.

    I guess I could have used some php uploader script instead of steps 1-4, but I already had Joomla installed with the ftp layer.

    That's it. Up and working. If you have an alternative provider, don't bother.