Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

2.6K
Views
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?

over 4 years ago · Santiago Trujillo
3 answers
Answer question

0

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 .
over 4 years ago · Santiago Trujillo Report

0

This is basically caused when the current user doesn't have enough permission to read/write/execute the contents of that directory.

Here's how you can fix it:

To grant the user permission to just the current directory, you could do this:

sudo chmod 775 directory_name

OR

sudo chmod a+rwx,o-w directory_name

To grant the user permission to the current directory, it's subdirectories and files, you could do this:

sudo chmod -R 775 directory_name

OR

sudo chmod -R a+rwx,o-w directory_name

Note:

  • chmod means change mode or in a more literal sense change access permissions.
  • -R means change files and directories recursively.
  • a means all users
  • r means read permission
  • w means write permission
  • x means execute permission
  • o means others
  • + means add
  • - means remove.

So it means recursively add read, write and execute permissions to everyone, but then remove write permissions from others.

That's all.

I hope this helps

over 4 years ago · Santiago Trujillo Report

0

You don't have read permission on your folder.

Run chmod 775 application-name to allow read in your folder.

You'll find additional info about chmod at this link: https://kb.iu.edu/d/abdb

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!