So i have a problem.
In order to free space from disk, i deleted my tmp folder, and then created another one. But when logging via ssh to my droplet, it promps this:
mktemp: failed to create file via template `/tmp/virtualenvwrapper-initialize-hook-XXXXXXXXXX’: Permission denied ERROR: virtualenvwrapper could not create a temporary file name.
How do I solve this?
Thanks!
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Accepted Answer
Hi!
You should verify permissions of your /tmp folder.
Execute following command, it will return information about permissions and ownership:
- ls -ld /tmp
Default out should be that it have 1777 - drwxrwxrwt permissions and ownership is set to root:root.
drwxrwxrwt 11 root root 20480 Sep 22 09:35 /tmp
If this is not the case, two simple command could help you:
- sudo chmod 1777 /tmp
- sudo chown root:root /tmp
Permissions explained:
1 is sticky bit. When set, only owner of file can rename or delete it.
777 means that owner, group and everyone else can read, write and execute.
So adding sticky bit to 777 -> 1777 would ensure only you can remove/rename files which you are owner
This comment has been deleted
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.