简体   繁体   English

如何以Cyber​​duck的根身份在EC2中进行SSH?

[英]How to SSH in EC2 as root with cyberduck?

I have an EC2 instance with some php scripts running on Amazon. 我有一个EC2实例,其中有一些运行在Amazon上的php脚本。 The folder with the files has permission 755 (chmod 755 folder). 具有文件的文件夹具有权限755(chmod 755文件夹)。

Everytime I login I have to change the folder permissions to change anything to files. 每次登录时,我都必须更改文件夹权限才能对文件进行任何更改。

Question: Is it possible to login as root with cyberduck? 问题:是否可以用cyberduck作为root登录?

Note: I found this link How to use sudo over SFTP with CyberDuck? 注意:我找到了此链接如何在Cyber​​Duck上通过SFTP使用sudo? , but it is from 2010 and I don't know if that info is accurate or not. ,但这是从2010年开始的,我不知道该信息是否正确。

If it is a folder that your user should be able to read and write. 如果它是一个文件夹,则您的用户应该能够读写。 Give your user account permissions to it... 授予您的用户帐户权限...

1) Create a group 1)建立群组

sudo groupadd mygroup

2) Add your user account to that group 2)将您的用户帐户添加到该组

sudo usermod -a -G mygroup myuser

3) Change the permissions of the folder such that group has execute/modify 3)更改文件夹的权限,以使组具有执行/修改的权限

sudo chown -R current_owner:mygroup myfolder
sudo chmod 776 myfolder

It is odd you have to change permissions every time. 每次都要更改权限很奇怪。 If this folder is deleted and re-created by another process or user, you will need to set the environment variable umask to 776 before creating the files and folders in your script. 如果此文件夹已被其他进程或用户删除并重新创建,则需要在脚本中创建文件和文件夹之前将环境变量umask设置为776。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM