xwp / wp-cli-ssh

[OBSOLETE] Seamlessly run WP-CLI commands on a remote server via SSH
157 stars 14 forks source link

/tmp/wp-cli.phar: Permission denied #18

Open davemac opened 10 years ago

davemac commented 10 years ago

Starting a new ticket from Issue #13 .

Documentation says:

Note that you do not necessarily need WP-CLI installed 
on your server to use this. If the wp command is not 
recognized on the server, the script will download 
the wp-cli.phar file and use that at runtime.

However, I have a VPS (not Vagrant), with several sites on it. When I run the wp-ssh command and connect to one of those sites, I get

$ wp ssh plugin status --host=production
Connecting via ssh to host: production
bash: /tmp/wp-cli.phar: Permission denied
Connection to {I removed host URL} closed.

So I can see it's looking in the root /tmp folder for wp-cli.phar when it should be looking in the home folder for my current site ie /tmp/wp-cli.phar and downloading the file to there if needed.

Is there a way to control which folder wp-cli.phar is downloaded to?

Or should I just upload it to /tmp/ and be done with it (assuming this would work for all sites on a VPS) ?

westonruter commented 10 years ago

Why is /tmp not writable?

davemac commented 10 years ago

I am connecting to the site as a user of one of the sites on the VPS, so ~/tmp is writeable as that's in my home folder. However /tmp is not writeable as thats in the root user's folder.

lkraav commented 9 years ago

I have the same issue. /tmp is writable, but won't allow application execution. Hosting guys claim it's for "security". Definitely need to have a way to specify something other than /tmp.

timneutkens commented 8 years ago

Fixed this issue in #28 Added an option called tmp_directory. It will fall back on /tmp when not specified. https://github.com/xwp/wp-cli-ssh/blob/master/wp-cli.sample.yml#L19