文件模式无法更改权限 [英] chmod unable to change permissions

查看:201
本文介绍了文件模式无法更改权限的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我现在面临一个恼人的问题。它已经pretty的沮丧。我使用的是计算机在我校工作的Coursera启动类。我试图连接到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 选项。

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.

这篇关于文件模式无法更改权限的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆