darickc / MMM-BackgroundSlideshow

MIT License
138 stars 79 forks source link

chown not permitted #98

Open 68267a opened 3 years ago

68267a commented 3 years ago

I have a remote folder full of files that I want to use. I don't trust the pi to maintain them, and this pi is not the only system that accesses them so it's read-only..

chown: changing ownership of '/opt/magic_mirror/modules/MMM-BackgroundSlideshow/wallpapers/mount/a.jpg': Operation not permitted
[13.05.2021 23:17.42.751] [INFO]  BACKGROUNDSLIDESHOW_NEXT_IMAGE
[13.05.2021 23:17.42.752] [INFO]  BACKGROUNDSLIDESHOW: reading path "modules/MMM-BackgroundSlideshow/wallpapers/local//a.jpg

I don't think the module should be trying to chown anything. o+r permission should be sufficient.

drwxrwxr-x 2 1001 1001  679 Mar 24 03:15 mount
-rw-rw-r-- 1 1001 1001 319K Jan 30 20:25 mount/a.jpg
drwxr-xr-x 2 pi pi 4.0K May 14 03:26 local
-rw-rw-r-- 1 pi pi 319K Jan 30 20:25 local/a.jpg
darickc commented 3 years ago

What comes before the chown in the log? The other two lines come before it even tries to read the file, so if the chown was part of the FileSystemImageSlideshow.readFileSync or the resize call, then I would expect that error to come after it writes those out to the log. I'm not trying any chown calls, so I'm not sure where it is that it would be calling it. I'm also not much of a nodejs developer either. It is using fs which I believe is a built in library to nodejs. Or if you are resizing the image it is using the sharp library (https://sharp.pixelplumbing.com/api-resize).