Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I was getting a strange Errno::EACCES error permission denied when I tried to upload photos.

Then I ran sudo chmod -R 777 /home/user/Projects/myApp/ on a rails project.This command did not solve my problem and now every time when I open a file I get prompted:

Do you want to run, or display its contents?

How can I make this go away?

share|improve this question

The command you ran messed up the files' access rights. Unfortunately, there's no easy way to restore the previous state exactly.

Removing the executable bit from the files you are trying to open will get rid of the message, though.

Warning: This command will remove the executable bit from all files in that directory and its subdirectories, so afterwards you might have to add the bit back for files that are supposed to have it.

find /home/user/Projects/myApp/ -type f -exec chmod -x {} +

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.