Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ls: cannot open directory '.': Permission denied

I have my application running on an ec2 instance.

I can successfully ssh into my application but when I cd in to the correct folder and run ls I get the following error:

ls: cannot open directory '.': Permission denied

It seems like it has something to do with my user permissions because running the application also throws a 403 Forbidden error.

The permissions for my application folder are as follows:

d-wx-wx--x 17 ubuntu ubuntu 4096 Apr 20 10:53 application-name

Do I need to change this to something else to make it work? And how?

like image 928
anonn023432 Avatar asked Apr 20 '18 15:04

anonn023432


1 Answers

This error makes sense if you don't have enough privileges to read that directory. try changing the permissions for current user or change the access mode to global i.e 777 For example:

sudo bash
chmod 775 .
like image 56
Nahom Alpha Geek Avatar answered Oct 21 '22 15:10

Nahom Alpha Geek