I can not access images taken by webcam in raspberry pi 3. The specific software is called motion. When I try to open the image folder and get a message saying ‘Access Denied’.

  • 2
    Not Pi specific. The files will be owned by groups motion/adm. Use sudo to remove the images.
    – joan
    Apr 6, 2018 at 16:43

2 Answers 2


Welcome to stack exchange!

Use the sudo and chmod commands. to give the everyone(the default user) access to the folder, simply change into the directory(folder) the folder is in using the command line(terminal), and type

sudo chmod a+rwx foldername

replace foldername with the image folder. This should work, if it doesn't, let me know!

  • I would say it's better to add the user to the right group? sudo adduser pi motion. You are only change mode on the folder. What's about the files in the folder?
    – Ingo
    Apr 6, 2018 at 19:28
  • Thanks, I will try what you suggested, by the way I am biginer. Apr 7, 2018 at 11:08
  • @FarzadBazrafshan , as Ingo say's, there are other ways of changing the permissions, this is just one method that is almost sure to work. You could also access the folder by just using the sudo command, but you'd have to do that every time. Apr 7, 2018 at 14:56
  • Thanks i have done what you said and works i delete all images, thank you. Apr 10, 2018 at 14:57
  • @FarzadBazrafshan , please click the accepted button or check-mark next to my answer to accept it if it worked. Apr 10, 2018 at 14:59

For deleting you need to change into the folder

cd /var/lib/motion

Then you can remove all the files like so

sudo rm *.avi

Note change avi extension to whatever files you want removed

Your Answer

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

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