funkwhale_ynh
funkwhale_ynh copied to clipboard
Permission errors for album cover
Hi, I know there are some already open issue with permission error, but I think mine is different: I have an error only for the cover. It works fine importing the music.
To be more specific, I have created a link:
ln -s /Data/Music/Catalogue_MusicBrainz /var/www/funkwhale/import/Catalogue_MusicBrainz
Then I source the virtual environment:
source /var/www/funkwhale/code/virtualenv/bin/activate
export $(cat "/var/www/funkwhale/code/config/.env" | grep -v ^# | xargs)
Finally, I import the music:
export LIBRARY_ID="long-number..."
python /var/www/funkwhale/code/api/manage.py import_files $LIBRARY_ID "/var/www/funkwhale/import/Catalogue_MusicBrainz/a/**/**/**/*" --recursive --noinput --in-place
Import went well for the music, but not the cover:
Permission denied: '/var/www/funkwhale/media/albums/covers'
I check the ownership of this folder:
drwxr-xr-x 3 funkwhale funkwhale 4096 Nov 11 10:24 .
I also try to add the write permission, but this add a new permission error:
PermissionError: [Errno 13] Permission denied: '/var/www/funkwhale/media/__sized__/albums'
Here I stop changing the permissions of this file to write this issue 😄
Does someone have an idea about this ?
when you do your import, why don't you use the Funkwhale user? https://kb.iu.edu/d/amyi
su funkwhale -c "mycommand"
Asks for a password
Le 2020-04-06 13:12, Aeris One a écrit :
su funkwhale -c "mycommand" Asks for a password
try sudo su funkwhale -c "mycommand"
This account is currently not available
EDIT: Solved
(virtualenv) admin@16469:/var/www/funkwhale/code$ sudo su funkwhale -c "python api/manage.py import_files $LIBRARY_ID "/home/funkwhale/Music/Music/*" --recursive --noinput"
Traceback (most recent call last):
File "api/manage.py", line 2, in <module>
import django
ImportError: No module named django
This account is currently not available
EDIT: Solved
Should be: sudo su funkwhale -c "mycommand" -s /bin/bash