Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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 designers.js.coffee, or display its contents?

How can I make this go away?

share|improve this question

1 Answer 1

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

 
discard

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.