0
I restarted my Amazon EC2 instance and all of sudden when I log in from SSH via putty I get the error:
-bash: /etc/profile: Permission denied
-bash: /etc/bashrc: Permission denied
Previously I was able to log in via SSH but after restart I can not.
I do have access to Super User so I can change permissions.
I tried changing permissions on /etc/profile
like 770 and 771 but couldn’t fix the issue.
Permissions on both files is 750
.
why 700 and 600? – td512 – 2015-05-16T15:51:34.047
Its not the rc or profile files themselves that are the issue its that they don't have access to the ssh key which itself should be 600 in a parent folder toting a 700 – linuxdev2013 – 2015-05-16T16:00:19.230
true, but those two files mentioned above have
0665
as the permission – td512 – 2015-05-16T16:05:24.307why would you need ANY OTHER user but the user in question to have r/w or write /execute on YOUR file – linuxdev2013 – 2015-05-16T16:07:09.393
1it's not
~/.bashrc
and~/.profile
these are0665
on/etc/profile
and/etc/bashrc
– td512 – 2015-05-16T16:08:25.890which are read prior to ~/bashrc & ~/profile and I highly doubt a global access strategy to those files is desired either – linuxdev2013 – 2015-05-16T16:11:33.503
did not fix the error – deepakgates – 2015-05-16T16:14:54.780
I'm just putting the exact output or ls -l /etc/profile and /etc/bashrc – td512 – 2015-05-16T16:15:03.013