All Collections
Backups
Solving the Error: /bin/bash: /tmp/tmpkfPQtf.sh: Permission denied
Solving the Error: /bin/bash: /tmp/tmpkfPQtf.sh: Permission denied

Learn how to quickly solve this error by going through this simple article.

Brent Sanders avatar
Written by Brent Sanders
Updated over a week ago

If you are getting an error when you run a backup that looks similar to:

/bin/bash: /tmp/tmpkfPQtf.sh: Permission denied

It is likely that your /tmp directory is mounted with the noexec option.

Our scripts take a couple actions and the first of which are to ensure that python PIP is installed and up to the correct version and secondly to install the AWSCLI package using PIP. PIP is installed using the open souce get-pip.py script which utilizes the /tmp directory.

A work around for this is to execute the command: mount -o remount exec /tmp before you execute a backup job. This should allow PIP and AWSCLI to be instlaled correctly. Once the backup is completed successfully, you can re-enable noexec on /tmp by executing the command: mount -o remount noexec /tmpΒ 

This should take care of the problem and not require these mount / remount actions again since PIP and AWSCLI will now be installed and re-installation won't be attempted.

If you have further issues where you can't execute a successful backup and are getting an error like "s3: command not found" you will want to verify that the aws binary is available, accessable and executable in your PATH. You can verify this by checking that the command which aws returns a path to the binary like /usr/local/bin/aws.

You may also need to add execution permissions to the binary with a command like:

chmod +x /usr/local/bin/aws

chmod +x /usr/local/bin/aws

Note: This is a common problem with MediaTemple VPS servers. They've put out their own specific help article on the issue which can be found here:

πŸŽ‰πŸŽ‰πŸŽ‰

We hope you find this helpful! If you need any further assistance, please contact us and we'll be more than glad to help you out.Β 

Did this answer your question?