Closed brimwats1 closed 3 years ago
Did you enable any of the Nextcloud integration options in LibrePhotos? If so you should disable them. By default, nothing at all should be stored in /home/yunohost.app/librephotos/data/nextcloud_media
, and LibrePhotos should scan photos from /home/yunohost.multimedia/<username>/Picture
(/home/yunohost.multimedia
is a standard directory that many YunoHost packages use, it's set up almost exactly like you set up your /var/Multimedia
). You can change the scan path for each user from the admin panel
Did you enable any of the Nextcloud integration options in LibrePhotos? If so you should disable them. By default, nothing at all should be stored in
/home/yunohost.app/librephotos/data/nextcloud_media
, and LibrePhotos should scan photos from/home/yunohost.multimedia/<username>/Picture
(/home/yunohost.multimedia
is a standard directory that many YunoHost packages use, it's set up almost exactly like you set up your/var/Multimedia
). You can change the scan path for each user from the admin panel
Well I only enabled them in that I tried to fill them out in the previous page. But that doesn't work because it won't save the password. I've tried deleting it, presing cancel, etc, and all it does it automatically refill it
I would guess this is an upstream bug, you will want to report it there. You can remove your Nextcloud credentials from your account manually with:
sudo sudo -u librephotos bash
/opt/yunohost/librephotos/bin/librephotos-cli shell
from django.contrib.auth import get_user_model
User = get_user_model()
user = User.objects.get(username='your_username')
user.nextcloud_app_password = None
user.nextcloud_scan_directory = None
user.nextcloud_server_address = None
user.nextcloud_username = None
user.save()
exit()
exit
thanks! I'll try reinstalling
I tried reinstalling but still cannot change anything in admin area :(
What happens when you try? Can you post a screenshot?
Step 1
Step 2
Step 3. Refresh Step 4: it's still the same:
I then tried to make a symlink:
ln -s /home/yunohost.multimedia/briwats/Picture /var/Multimedia/Picture
then I tried "scan photos: and still nothing
Can the librephotos
user read the /var/Multimedia
folder?
I don't know, that's what I'm asking, what I missed because I feel like I did 😢
I did this
sudo su
usermod librephotos -a -G multimedia
# Set permissions
chown librephotos:multimedia -R /var/Multimedia
find /var/Multimedia -type d -exec chmod 0775 {} \;
find /var/Multimedia -type f -exec chmod 0664 {} \;
setfacl -d -m u::rwX,g::rwX,o::r /var/Multimedia
# Restart services
systemctl restart nginx
systemctl restart php7.3-fpm
systemctl restart php7.4-fpm
systemctl restart librephotos
but it's not working so I feel like I am missing something
I think it may be that in your setfacl
command you are not giving traverse permissions for directories to other
. To match the permissions of yunohost.multimedia
you want sudo setfacl -nR -m g:multimedia:rwX,g::rwX,o:r-X -m d:g:multimedia:rwX,g::rwX,o:r-X "/var/Multimedia"
You can always test with sudo sudo -u librephotos ls /var/Multimedia/Picture
sudo sudo -u librephotos ls /var/Multimedia/Picture
works! shows all the directories
I think it may be that in your
setfacl
command you are not giving traverse permissions for directories toother
. To match the permissions ofyunohost.multimedia
you wantsudo setfacl -nR -m g:multimediaA:rwX,g::rwX,o:r-X -m d:g:multimediaA:rwX,g::rwX,o:r-X "/var/Multimedia"
I tried this
setfacl -nR -m g:multimediaA:rwX,g::rwX,o:r-X -m d:g:multimediaA:rwX,g::rwX,o:r-x "/var/Multimedia"
setfacl: Option -m: Invalid argument near character 3
i noticed you had a cap A at the end of multimediA
, so I removed that it and reran. The terminal seemed to be thinking for a bit. I then restarted everything via services webadmin and still get the same problem
Maybe check journalctl
, or the logfiles under /var/log/librephotos
? Otherwise I am stumped
Nothing there except system starting stuff :(
One last thing to try:
sudo sudo -u librephotos bash
/opt/yunohost/librephotos/bin/librephotos-cli shell
from django.contrib.auth import get_user_model
User = get_user_model()
user = User.objects.get(username='briwats')
user.scan_directory = '/var/Multimedia/Picture'
user.save()
exit()
exit
!! for the first time it's doing something!
it seems to be working now, but there's almost 100k photos for it to go through, so I'll report back! Thanks so much for the help!
I have all of my media saved on
/var/Multimedia
subfolders. For example, music is at/var/Multimedia/Music.
Photos are saved at
/var/Multimedia/Photos
. I tried to let Librephotos know this by going to Admin area -> and setting the user storage to/var/Multimedia/Photos
. However, every time I saved it, it just resets to `/home/yunohost.app/librephotos/data/nextcloud_media'In the past for YNH apps I have fixed this by adding apps to a group called Multimedia. That looks like this:
However, this didn't seem to work in librephotos case. What am I missing?