I have the directory /var/app which I've set to be the home directory for the user 'isapp'. The owner of the folder is 'isapp' and the group is 'isapp'. I'm using Amazon's EC2 service, so when you login to SSH you use the user 'ec2-user'. How can I make it so I can access the contents of that directory via SSH? At the moment I get permission denied with and without sudo.
2
votes
2 Answers
4
votes
You can
- Create a group for the users that should be able to access this folder
- Add isapp and ec2-user to this group
- chgrp the /var/app folder to this group
- chmod the /var/app folder and allow read and execute access for the group
chmod g+rx /var/app
The fact that you cannot access this folder with sudo is more strange, sudo cd /var/app
is not expected to work but sudo ls /var/app
should.