By shelly
HI there,
I’ve searched the forums, but haven’t found an answer to this problem. I’m running WordPress on Ubuntu 16/LAMP. A few months ago, I removed my root user and set a new user to handle everything, added in an SSH key, everything’s great.
However, last week, I had to wipe my computer and reinstall the OS (I’m on Mac Sierra) due to something really stupid I did that was 90% unadvisable :) The reinstall fixed the issue, and I went back in and reset my private ssh key to 600 permissions (because I knew that would be an issue).
So everything’s moving along fine, I can log into my spot easily, it takes my key perfectly fine. But all I can do is upload files via SSH/SFTP. I can’t delete, rename, move, change permissions - nothing else. Just upload. (same issue via Terminal commands as well as using Filezilla to do the transfers - I get a “Permission denied” message). I find this exceedingly weird.
I cannot log in as root anymore, either, because I locked the root user out when I made my new username. (It seemed like a good idea at the time, because using default login names is never a good idea for security purposes, but now I’m not so sure, because I think if I could log in as root, I could fix this.)
I’m 100% sure this has something to do with the fact that I wiped my computer and reinstalled. But other than changing the file permissions on my private ssh key, was there something else I needed to do? Or did I bork everything in a way that can’t be fixed?
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!
I think I got it :) It was a permissions issue. In Terminal, I was just forgetting to use “sudo” (you can thank the lack of coffee for that brainfart).
To make it work in my FTP program, I needed to set ownership to my username, not www-data. i.e. user:www-data instead of www-data:www-data.
Still need to be sure it works with the uploads folder (and updates for plugins, etc.) but at least I know what the issue is :)
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.