WordPress.org

Ready to get started?Download WordPress

Forums

W3 Total Cache
Permissions Problem Deploying Plugin (9 posts)

  1. seadynamic8
    Member
    Posted 3 years ago #

    I see that certain files are installed after activating the plugin that unfortunately uses the Apache Web Server "user" to do so. I'm guessing it is using PHP, which is also the same "user" on my webserver. The files and folders I'm talking about are:

    /uploads/
    /w3tc-domain/
    advanced-cache.php
    db.php
    object-cache.php
    w3-total-cache-blognames.php
    w3-total-cache-config-domain-preview.php

    (replacing domain with the actual domain name)

    Unfortunately for me, I'm running a server which has a tighter security in place, so the ftp/cpanel user is a different user than the apache and php user.

    Therefore I can't deploy this plugin because I can't change the permission on these files, particulary (w3-total-cache-config-domain-preview.php), since using ftp, I'm a different user. And because I can't change the permissions, the plugin won't allow me to deploy it, since it can't access it as well because the permissions are too tight (I believe).

    I do have root access on the server and can change this manually by using ssh into my server, but this seems way too much work for me to deploy the plugin.

    I'm not willing to change the way my system handles the users since I believe it is better for security of my server.

    Is it possible that maybe you can add a check to see if is the same user and then ask for ftp credentials so that you can automatically update the script?

    Or is there any other workaround that doesn't involve me login into my server as root? Otherwise, the work involved to deploy each and every one of these plugins is too tedious and too error prone.

    http://wordpress.org/extend/plugins/w3-total-cache/

  2. Hmm. Can you delete the files (or have them deleted) and manually create BLANK ones as your ftp ID, and then change permissions?

  3. seadynamic8
    Member
    Posted 3 years ago #

    Yes I can. I downloaded a copy of the w3-total-cache-config-domain-preview.php file, then deleted on the server. I was able to upload the copy back and change the permissions of it.

    I can also upload a blank version if needed and change permissions.

    But the plugin still says I need to change the permissions to disable the preview mode. I'm guessing it is because it is a different user that it still can't access it. (I don't know too much about linux permissions, so I'm still guessing here.)

    Any ideas?

  4. Rename the file, and remove -preview from the name :)

  5. seadynamic8
    Member
    Posted 3 years ago #

    Great! Thanks. Such a simple solution.

  6. It doesn't resolve the problem, mind you, but it is a handy workaround when you can't write the files ;)

  7. Frederick Townes
    Member
    Plugin Author

    Posted 3 years ago #

    @seadynamic8, did you ever ask your host to see what challenges there might be? W3TC writes files with the same permission as PHP (apache), so perhaps there's something special on your server?

  8. seadynamic8
    Member
    Posted 3 years ago #

    Well, I've said this earlier, but I believe the problem is that in my host, the FTP user and the PHP(apache) user are different with different permissions, and they can't access each other very freely.

    This is put in place for security on my server and I like that because if someone gained access to my FTP user, he still couldn't change the apache files. I could change them to the same user, but I rather keep it that way so that it is harder for someone to hack my server.

    Or something like this, I'm not sure. Anyways, the workaround is all I need and I dont think most people's servers are as locked down as mine, so most people probably won't have the same problem.

  9. Frederick Townes
    Member
    Plugin Author

    Posted 3 years ago #

    I can appreciate that, but there is no workaround without your host adjusting permissions on your server. Sorry.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic