1

I have to change an RSA key file (.pem)'s permissions to 400 so I can use it to connect to an AWS EC2 instance but for some reason I cannot seem to do so. I am in the folder where the file is located and the command sudo chmod 400 3dcitydb.pem gives no output but has no effect on the file.

I even logged in as root and I still cannot do it:

root@ib:/media/isaac/Data/MOSS_application/aws_keys# sudo chmod 400 ./3dcitydb.pem 
root@ib:/media/isaac/Data/MOSS_application/aws_keys# ls -l
total 4
-rwxrwxrwx 1 isaac isaac 1692 Jul  4 21:13 3dcitydb.pem

Any idea of what this could be? Any time I try to search this I either get people mistyping the chmod command, people unable to do so on an external hard drive due to a different partition system or people who didn't realize they had to change the file permissions in the first place.

Ubuntu version is 16.04

wfgeo
  • 143
  • Is this on a NTFS drive? – Terrance Jul 04 '18 at 19:49
  • I am assuming this is on an external drive because it is mounted to /media/username. If you run blkid from a terminal window and find that mount the type= will tell you. NTFS is not affected by chmod as shown in the link. – Terrance Jul 04 '18 at 19:52
  • Is there an equivalent for doing so, or would it be significantly easier to just put it on the main drive? – wfgeo Jul 04 '18 at 19:53
  • Put it on the main drive if the security is that important for the file. – Terrance Jul 04 '18 at 19:53

0 Answers0