1

I am trying to run camera.sh which I made executable by

chmod 755 camera.sh

It works okay, but when I run it I get the error...

root@raspberrypi:/home/pi/timelapse# ./camera.sh
-bash: ./camera.sh: Permission denied

I even logged in as root, but I still got the same error. I can't even run chown/chmod/owner commands to 777. It pretty much gives me a permission error for everything I do.

Permissions on file shown below:

root@raspberrypi:/home/pi/timelapse# ls -l camera.sh 
-rwxr-xr-x 1 root root 234 Jul 29 10:02 camera.sh 

I am running Raspbian and SSHing from my desktop.

Any ideas?

11
  • Is timelapse.sh a typo for camera.sh? What does ls -l camera.sh report?
    – joan
    Jul 29, 2014 at 12:08
  • @joan Yeh, it's a typo, timelapse.sh should be camera.sh. But that is the command I am running (Now edited the question)
    – Arjun Naha
    Jul 29, 2014 at 12:12
  • show us the output of ls -l camera.sh
    – askmish
    Jul 29, 2014 at 12:20
  • @askmish root@raspberrypi:/home/pi/timelapse# ls -l camera.sh -rwxr-xr-x 1 root root 234 Jul 29 10:02 camera.sh root@raspberrypi:/home/pi/timelapse#
    – Arjun Naha
    Jul 29, 2014 at 12:39
  • goto your non-root login. Then, try this chmod +x camera.sh. Do not prefix the command with sudo. Then try running it.
    – askmish
    Jul 29, 2014 at 12:45

1 Answer 1

1

The problem seemed to be a wrong fstab entry and a corrupted OS. See the comments and discussion in chat, between the OP and me, to troubleshoot such issues, in future.

2
  • if you answered your own question (or it got answered in the comments in this case), please select it as the answer when you can.
    – kolin
    Jul 29, 2014 at 14:33
  • @Askmish, can you go into the chat please
    – Arjun Naha
    Jul 29, 2014 at 17:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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