GazK
Posts: 7
Joined: Fri Apr 25, 2014 7:21 pm

Motion won't write video to windows share

Sat May 17, 2014 1:24 pm

I'm fairly new to *unix, I've made good progress but I'm not yet particularly unix-savvy. I have a problem that I'm guessing is related to user permissions.

RPi running Raspbian with an RPi camera, video works fine, motion works fine, records video to the RPi fine. I mounted a share to a network folder on a Win7 machine no problem using the following:

Code: Select all

sudo mkdir /mnt/Captures
sudo chmod 777 /mnt/Captures
sudo chgrp motion /mnt/Captures && sudo chmod g+rwx /mnt/Captures && sudo chmod -R g+w /mnt/Captures
sudo mount -t cifs -o username=admin,password=password,uid="motion" //192.168.1.166/Captures/RasPi001 /mnt/Captures
I can see the folder in SSH, and motion successfully writes to the shared folder.

I then edited fstab as follows:

Code: Select all

proc            /proc           proc    defaults          0       0
/dev/mmcblk0p1  /boot           vfat    defaults          0       2
/dev/mmcblk0p2  /               ext4    defaults,noatime  0       1

//DESKTOPPC/Captures /mnt/Captures cifs username=admin,password=password,file_mode=0777 0 0
After reboot the df -h shows this:

Code: Select all

Filesystem            Size  Used Avail Use% Mounted on
rootfs                7.2G  1.9G  5.1G  27% /
/dev/root             7.2G  1.9G  5.1G  27% /
devtmpfs              183M     0  183M   0% /dev
tmpfs                  38M  240K   38M   1% /run
tmpfs                 5.0M     0  5.0M   0% /run/lock
tmpfs                  75M     0   75M   0% /run/shm
/dev/mmcblk0p1         56M   19M   38M  34% /boot
//DESKTOPPC/Captures   54G  156M   54G   1% /mnt/Captures
but there are no files in the mounted directory. If you view the camera stream it works momentarily and then shuts down, which makes me think there is a permission problem for user "motion"? How would I test this?

GazK
Posts: 7
Joined: Fri Apr 25, 2014 7:21 pm

Re: Motion won't write video to windows share

Sat May 17, 2014 2:12 pm

update: the camera stream works fine until motion is detected, then it goes down.

Return to “Troubleshooting”