![]() sudo chown -R currentowner:mygroup myfolder sudo chmod 776 myfolder. If you want to get really fancy, you could set up a git repository and use a post-receive hook to handle this all for you when you push. 3) Change the permissions of the folder such that group has execute/modify. Then from your dev machine, call the script: $ ssh -i ~/path/to/key.pem /home/ubuntu/copy.sh Sudo su #this will only work if sudo doesn't prompt for a passwordĬp -r /home/ubuntu/stage/* /var/www/html/ If you dont save your password, you will be prompted to enter it every time you try to make a file transfer. Create a /home/ubuntu/copy.sh script on the server like this: #!/bin/bash Give your user account permissions to it. You won't have to modify the system configuration this way, but you will have to do the file transfer in two steps.Ĭreate a staging folder in /home/ubuntu and copy the files there. 1 If it is a folder that your user should be able to read and write. the home folder of the cyberduck connected user). My preferred solution is to upload the files to the ubuntu home directory and then run a script as root that moves the files to the correct location. I upload the file with cyberduck to a folder where i can write to (e.g. This will allow you to operate your FTP client like normal. ![]() First create the user, then create a public/private key pair for non-interactive login. The first is to create a new user account specifically for FTP and give it permissions only to the necessary folders. ![]() I don't think the ec2-user account works on recent Ubuntu AMIs, which may explain the failed login.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |