- Newest
- Most votes
- Most comments
It is possible that the directory where the file is placed does not have write permission for ec2-user.
I believe that this can be handled by adding ec2-user to the ownership group of the directory where you are trying to place the file or the file you are trying to replace, or by changing the owner of the directory or file to ec2-user.
For example, to add a group to ec2-user, execute the following command.
Replace "GroupName" with the name of the group that owns the directory or file.
sudo usermod -aG GroupName ec2-user
The group name can be checked with the following command.
ls -la
The results can be checked as follows.
UserName is the user who owns the file or directory and GroupName is the group that owns it.
drwxr-xr-x 1 UserName GroupName 4096 Mar 10 20:27 aws
Looking back at your question last week from the screengtrabs we can see that when you make an SFTP connection you are placed into the directory /home/ec2-user
- is that still correct today?
Is this the directory you're having problems writing files to?
If it is then double-check the permissions on the directory - connect to the host by SSH and ls -lasd /home/ec2-user
(or if it's not that directory which is giving you trouble then run the same command against the name of the directory in question).
When you're trying to upload a file, is there already a file of the same name in the directory that you're trying to upload to? And if there is a file that's currently there then what are the permissions on that file?
Relevant content
- asked 9 months ago
- asked 2 years ago
- asked a year ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 2 years ago