chmod 无法更改权限

编程入门 行业动态 更新时间:2024-10-27 02:28:34
本文介绍了chmod 无法更改权限的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我遇到了一个烦人的问题.这很令人沮丧.我正在学校使用计算机来学习 Coursera Startup 课程.我正在尝试连接到 Amazon EC2 实例.我下载了密钥对.我检查权限.

I'm facing an annoying problem. It's been pretty frustrating. I am using a computer at my school to work on the Coursera Startup class. I am trying to connect to an Amazon EC2 instance. I downloaded the key pair. I check permissions.

mac5-library:startup roh21$ ls -l total 6 -rw-rw-rw-@ 1 roh21 108 1692 Jun 22 16:45 startup-class-key.pem

所以,它不安全.所以我需要更改权限.我试试:

So, it's not secure. So I need to change the permissions. I try:

mac5-library:startup roh21$ chmod 400 startup-class-key.pem mac5-library:startup roh21$ ls -l total 6 -r--r--r--@ 1 roh21 108 1692 Jun 22 16:45 startup-class-key.pem

仍然对所有人具有读取权限.只是为了演示会发生什么,我这样做:

Still has read permissions to everyone. Just to demonstrate what happens I do this:

mac5-library:startup roh21$ chmod 600 startup-class-key.pem mac5-library:startup roh21$ ls -l total 6 -rw-rw-rw-@ 1 roh21 108 1692 Jun 22 16:45 startup-class-key.pem

没有root权限就不能修改用户权限吗?如果能提供任何帮助,我将不胜感激.

Is it impossible to change permissions to the user without root permission? I'd be grateful for any kind of help.

推荐答案

我将文件复制到了我的 ~/.ssh 文件夹,然后使用 chmod 更改了权限.做到了.

I copied the file to my ~/.ssh folder and then changed the permissions with chmod. That did it.

只是为了提供更多信息,ssh文件夹的权限,

Just to provide more information, the permissions for the ssh folder,

drwx------ 8 roh21 108 272 Jun 26 17:26 .ssh

以及我最初使用的文件夹的权限

And the permissions to the folder I used initially

drwxrwxrwx 2 roh21 108 2048 Jun 23 06:32 startup

我很好奇为什么即使在多次尝试使用 chmod -R 选项后,我也无法更改对 startup 文件夹的权限.

I curious as to why I could not change the permissions to the startup folder even after multiple attempts with the chmod -R option.

另外,请注意我在学校图书馆使用的是 Mac OS X.

Also, note that I was using Mac OS X in my school's library.

更多推荐

chmod 无法更改权限

本文发布于:2023-10-23 06:17:57,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1520040.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:权限   chmod

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!