I cannot write files when I SFTP into site

0

I have a WordPress site that's AWS hosted running Ubuntu. I admit that I don't know as much about Linux as I should and I'm really struggling with this. When I SFTP into my instance, I cannot modify or add files. As far as I can tell the user that I log in as has ownership. I'm afraid to make changes because I don't want to break something. I should add that when I use puTTY to manage my site, I need to use the sudo command to make changes.

asked 2 months ago47 views
1 Answer
0

Sounds like your using the ec2-user to ssh into the box. You will not be able to modify files you don not have access too or do not own. This is standard linux permissions.

You should be able to upload files to your home directory, usually /home/ec2-user

From here you can use sudo to move/copy files to areas of the disk that needs elevated privilages. You can even use Sudo to change ownership of files.

https://www.oneidentity.com/learn/how-does-sudo-work-on-linux-unix-for-privilege-management.aspx#:~:text=Sudo%20allows%20regular%20users%20to,sharing%20the%20root%20account%20credentials.

profile picture
EXPERT
answered 2 months ago
profile picture
EXPERT
reviewed 2 months ago
  • Yes, I see that now. I can successfully copy a test file to the user directory. Is there another way to accomplish what I'm trying to do? Or is copying the files to the user directory and then copying them over to the proper directory the only way to go? And also, if I do that, will the permissions persist when I copy them to the right directory? Meaning will they inherit the correct permissions in the correct directory so that everything works as it should?

    Additionally, one of the other problems I was hoping to fix, since they seem to be connected, is the ability for Jetpack to be able to restore things. Currently it cannot as the user doesn't have those permissions.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions