How can I change the storage directory for a camera?

34 views
Skip to first unread message

James

unread,
Jul 2, 2024, 7:53:00 PM (4 days ago) Jul 2
to motioneye
I know how to input a new directory in the GUI. But when I try to change the location from the default /var/lib/motioneye/Camera1 to something like /home/<user>/<drive>, it doesn't seem to be able to save anything to that directory.

StarbaseSSD

unread,
Jul 2, 2024, 8:05:33 PM (4 days ago) Jul 2
to motioneye
Are you running the motionEye as root, or did you change it to run as a user? If you changed the user that you are running motionEye as, does that user have RW access to the folder you are trying to write to?

StarbaseSSD

unread,
Jul 2, 2024, 8:07:02 PM (4 days ago) Jul 2
to motioneye
Also, is the path /home/<user>/<drive> local or network?

James

unread,
Jul 3, 2024, 9:33:27 AM (3 days ago) Jul 3
to motioneye
I didn't change anything from default. I installed it using sudo on my main user account if that matters.

The /home/<user>/<drive> path is local, but on a different drive than the OS.

StarbaseSSD

unread,
Jul 3, 2024, 1:58:43 PM (3 days ago) Jul 3
to motioneye
In the setting, general, what do you have for:

motionEye Version

Motion Version

OS Version

What does 
>ls -la /home/<user tab show for permissions for the <drive> folder? For example one of my /home/<user>/local shows:
drwxr-xr-x 3 pi   pi    4096 Nov 20  2021 local (755)
for my NAS storage the permissions are
drwxrwxrwx 2 root root    0 May 21 06:26 Camera3  (777)

James

unread,
Jul 3, 2024, 2:40:11 PM (3 days ago) Jul 3
to motioneye
motionEye Version 0.43.1b1
Motion Version 4.6.0
OS Version Ubuntu 22.04

ls -la /home/toast/4tbBigBoy
total 52
drwxrwxr--+  7 toast  toast   4096 Jun 30 02:21 .
drwxrwx---+ 29 toast  toast   4096 Jul  3 10:05 ..
drwxrwxr-x   2 motion motion  4096 Jun 30 02:21 cctv
drwxr-xr-x  13 toast  toast   4096 Jun  5 16:41 DDriveClone
drwx------   2 toast  toast  16384 May  6 20:30 lost+found
drwxr-xr-x   5 toast  toast  16384 Jun  3 01:15 Movies
drwxr-xr-x  12 toast  toast   4096 Jun 16 02:01 TVShows

This drive has my media library, but I'm wanting to put the motion camera folders into the cctv folder here

StarbaseSSD

unread,
Jul 3, 2024, 2:51:19 PM (3 days ago) Jul 3
to motioneye
If you do:
sudo chmod 777 -R /home/toast/4tbBigBoy/cctv
a) does it stick (give drwxrwxrwx as permissions)
if you do another ls -la /home/toast/4tbBigBoy
b) does it work?

James

unread,
Jul 3, 2024, 3:18:13 PM (3 days ago) Jul 3
to motioneye
I got the permissions to stick, but motion still wont save to that folder. It also shows the Disk Usage as 0.0/0.0GB 0%.

ls -la /home/toast/4tbBigBoy
total 52
drwxrwxr--+  7 toast  toast   4096 Jun 30 02:21 .
drwxrwx---+ 29 toast  toast   4096 Jul  3 10:05 ..
drwxrwxrwx   5 motion motion  4096 Jul  3 12:14 cctv

ls -la /home/toast/4tbBigBoy/cctv
total 20
drwxrwxrwx  5 motion motion 4096 Jul  3 12:14 .
drwxrwxr--+ 7 toast  toast  4096 Jun 30 02:21 ..
drwxrwxrwx  2 toast  toast  4096 Jul  3 12:14 Camera1
drwxrwxrwx  2 toast  toast  4096 Jul  3 12:14 Camera2
drwxrwxrwx  2 toast  toast  4096 Jul  3 12:14 Camera3


image_2024-07-03_121733423.png

StarbaseSSD

unread,
Jul 3, 2024, 3:25:50 PM (3 days ago) Jul 3
to motioneye
If you are editing the Camera1 info, the path for root directory should be:
/home/toast/4tbBigBoy/cctv

James

unread,
Jul 3, 2024, 3:37:02 PM (3 days ago) Jul 3
to motioneye
It's showing the same thing when I set it to that path.
image_2024-07-03_123652858.png

StarbaseSSD

unread,
Jul 3, 2024, 3:54:12 PM (3 days ago) Jul 3
to motioneye
What does
df -h
show for the path for your 4tbBigBoy????

James

unread,
Jul 3, 2024, 3:58:48 PM (3 days ago) Jul 3
to motioneye
df -h /home/toast/4tbBigBoy
Filesystem      Size  Used Avail Use% Mounted on
/dev/sdc1       3.6T  815G  2.7T  24% /home/toast/4tbBigBoy

StarbaseSSD

unread,
Jul 3, 2024, 5:16:42 PM (3 days ago) Jul 3
to motioneye
try
getfacl -E /home/toast/4tbBigBoy
getfacl -E /home/toast/4tbBigBoy/cctv
getfacl -E /home/toast/4tbBigBoy/cctv/Camera1
Out of curiosity, what is your 4tb drive formatted as?


mario bruno grondana

unread,
Jul 4, 2024, 8:16:10 AM (2 days ago) Jul 4
to motioneye
Hi everyone, I'm a newbie to Linux. I take advantage of this open post for the same problem.
I installed Motioneye on Docker on Debian 12. I would like the video storage to be an ext4 USB disk which Debian sees as /media/usbdisk.
I log in as user, but I have RW permissions on the external disk and I am in the sudoers group.
In the Camera File Storage section on Motioneye I write as path /media/usbdisk, but Motioneye writes to /var/lib/docker/overlay2/b97c14acacefff5556cbb6e4542b770f6255cb3d6755e4806a745e18c40da959/diff/media/usbdisk. How can I indicate the exact route? Thank you and sorry for my english

James

unread,
Jul 4, 2024, 6:37:58 PM (2 days ago) Jul 4
to motioneye
$ getfacl -E /home/toast/4tbBigBoy
getfacl -E /home/toast/4tbBigBoy/cctv
getfacl -E /home/toast/4tbBigBoy/cctv/Camera1
getfacl: Removing leading '/' from absolute path names
# file: home/toast/4tbBigBoy
# owner: toast
# group: toast
user::rwx
user:plex:rwx
group::r-x
mask::rwx
other::r--

getfacl: Removing leading '/' from absolute path names
# file: home/toast/4tbBigBoy/cctv
# owner: motion
# group: motion
user::rwx
group::rwx
other::rwx

getfacl: Removing leading '/' from absolute path names
# file: home/toast/4tbBigBoy/cctv/Camera1
# owner: toast
# group: toast
user::rwx
group::rwx



This drive is formatted with ext4.

StarbaseSSD

unread,
Jul 4, 2024, 6:48:51 PM (2 days ago) Jul 4
to motioneye

I have a feeling that it's related to group and other permissions below:
# file: home/toast/4tbBigBoy
# owner: toast
# group: toast
user::rwx
user:plex:rwx
group::r-x <<<***<<<***
mask::rwx
other::r-- <<<***<<<***
To fix, try:
sudo chmod -R 777 / home/toast/4tbBigBoy
and do the
getfacl -E /home/toast/4tbBigBoy
again...

James

unread,
Jul 4, 2024, 6:58:51 PM (2 days ago) Jul 4
to motioneye
Just FYI, the first command you gave me was malformed. It started running that command recursively from the root of the filesystem because of the space between / and home/toast/4tbBigBoy. I probably should've caught that before running it but now I can't use sudo because of this error:

$ sudo chmod -R 777 /home/toast/4tbBigBoy
sudo: /etc/sudo.conf is world writable
sudo: /etc/sudo.conf is world writable
sudo: /etc/sudoers is world writable
sudo: no valid sudoers sources found, quitting
sudo: error initializing audit plugin sudoers_audit

Initial googling says that I need to reboot into recovery mode to fix this, but I also welcome any suggestions you have.
Reply all
Reply to author
Forward
0 new messages