Mopidy Discourse

Mopidy-Local can't access folder

Hi!

Blockquote
Dez 27 07:16:09 lapt0p mopidy[1835]: PermissionError: [Errno 13] Permission denied: ‘/home/morta/Downloads/Music’
Dez 27 07:16:09 lapt0p mopidy[1835]: INFO 2020-12-27 07:16:09,498 [1835:Audio-2] mopidy.audio.actor
Dez 27 07:16:09 lapt0p mopidy[1835]: Audio output set to “autoaudiosink”
Dez 27 07:16:09 lapt0p mopidy[1835]: INFO 2020-12-27 07:16:09,828 [1835:SpotifyEventLoop] mopidy_spotify.backend
Dez 27 07:16:09 lapt0p mopidy[1835]: Logged in to Spotify in online mode
Dez 27 07:16:09 lapt0p mopidy[1835]: INFO 2020-12-27 07:16:09,986 [1835:SpotifyBackend-5] mopidy_spotify.web
Dez 27 07:16:09 lapt0p mopidy[1835]: Logged into Spotify Web API as stefan_l-ch
Dez 27 07:16:15 lapt0p mopidy[1835]: INFO 2020-12-27 07:16:15,789 [1835:SpotifyBackend-5] mopidy_spotify.playlists
Dez 27 07:16:15 lapt0p mopidy[1835]: Refreshed 37 Spotify playlists
Dez 27 07:16:15 lapt0p mopidy[1835]: INFO 2020-12-27 07:16:15,789 [1835:SpotifyBackend-5] mopidy_spotify.backend
Dez 27 07:16:15 lapt0p mopidy[1835]: Spotify private session activated
Dez 27 07:16:15 lapt0p mopidy[1835]: INFO 2020-12-27 07:16:15,789 [1835:MainThread] mopidy.commands
Dez 27 07:16:15 lapt0p mopidy[1835]: Starting Mopidy core
Dez 27 07:16:15 lapt0p mopidy[1835]: INFO 2020-12-27 07:16:15,797 [1835:MainThread] mopidy.commands
Dez 27 07:16:15 lapt0p mopidy[1835]: Starting Mopidy frontends: HttpFrontend, MpdFrontend, QueueManagerFrontend, IrisFrontend
Dez 27 07:16:15 lapt0p mopidy[1835]: INFO 2020-12-27 07:16:15,798 [1835:HttpFrontend-10] mopidy.http.actor
Dez 27 07:16:15 lapt0p mopidy[1835]: HTTP server running at [::ffff:127.0.0.1]:6680
Dez 27 07:16:15 lapt0p mopidy[1835]: INFO 2020-12-27 07:16:15,801 [1835:MainThread] mopidy_mpd.actor
Dez 27 07:16:15 lapt0p mopidy[1835]: MPD server running at [::ffff:127.0.0.1]:6600
Dez 27 07:16:15 lapt0p mopidy[1835]: INFO 2020-12-27 07:16:15,834 [1835:IrisFrontend-13] mopidy_iris.core
Dez 27 07:16:15 lapt0p mopidy[1835]: Starting Iris 3.55.4
Dez 27 07:16:15 lapt0p mopidy[1835]: INFO 2020-12-27 07:16:15,834 [1835:MainThread] mopidy.commands
Dez 27 07:16:15 lapt0p mopidy[1835]: Starting GLib mainloop

I cant access floder /home/morta/Downloads/Music or the subfloders!
even i do chmod 777 and chown 1000

Help me plz

Greetz

I assume you are running as a service, Mopidy as a service runs under the mopidy user. Permissions of parent directories also matter: https://unix.stackexchange.com/questions/13858/do-the-parent-directorys-permissions-matter-when-accessing-a-subdirectory

I did

sudo chown -R mopidy:audio /home/morta/Downloads/Music
sudo chmod -R ug+rw /home/morta/Downloads/Music
sudo find /home/morta/Downloads/Music -type d -exec sudo chmod ug+x {} \;
sudo gpasswd -a mopidy audio # add user mopidy to group audio
so should be correct?

mopidy.service - Mopidy music server
Loaded: loaded (/usr/lib/systemd/system/mopidy.service; enabled; vendor preset: disabled)
Active: active (running) since Sun 2020-12-27 13:26:56 CET; 3min 31s ago
Main PID: 2070 (mopidy)
Tasks: 22 (limit: 37772)
Memory: 110.6M
CGroup: /system.slice/mopidy.service
└─2070 /usr/bin/python3 /usr/bin/mopidy --config /usr/share/mopidy/conf.d:/etc/mopidy/mopidy.conf>

Dez 27 13:29:14 lapt0p mopidy[3131]: Scanned 0 of 0 files in 0.000s.
Dez 27 13:29:14 lapt0p mopidy[3131]: INFO 2020-12-27 13:29:14,935 [3131:MainThread] mopidy_local.commands
Dez 27 13:29:14 lapt0p mopidy[3131]: Done scanning
Dez 27 13:29:14 lapt0p mopidy[3131]: INFO 2020-12-27 13:29:14,954 [3131:MainThread] mopidy_local.storage
Dez 27 13:29:14 lapt0p mopidy[3131]: Cleaning up image directory
Dez 27 13:29:14 lapt0p su[3130]: pam_unix(su:session): session closed for user mopidy
Dez 27 13:29:14 lapt0p sudo[3126]: pam_unix(sudo:session): session closed for user root
Dez 27 13:29:14 lapt0p sudo[3123]: pam_unix(sudo:session): session closed for user root
Dez 27 13:29:14 lapt0p mopidy[2070]: INFO 2020-12-27 13:29:14,994 [2070:Thread-18] mopidy_iris.system
Dez 27 13:29:14 lapt0p mopidy[2070]: Completed in 0 seconds

Didn`t find any file but also no errors ?!

The precise rule is: you can traverse a directory if and only if you have execute permission on it.

Did your command address that?

+x stands for execute so all subfloders are executable, isn’t it?
Sorry i’m not very good with rights and permisson but i can’t get it running

No sound with spotify but MPD seems run properly, too.

[morta@lapt0p ~]$ mopidy config
[core]
cache_dir = $XDG_CACHE_DIR/mopidy
config_dir = $XDG_CONFIG_DIR/mopidy
data_dir = $XDG_DATA_DIR/mopidy
max_tracklist_length = 10000
restore_state = false

[logging]
verbosity = 0
format = %(levelname)-8s %(asctime)s [%(process)d:%(threadName)s] %(name)s\n %(message)s
color = true
config_file =

[audio]
mixer = software
mixer_volume =
output = autoaudiosink
buffer_time =

[proxy]
scheme =
hostname =
port =
username =
password =

[file]
enabled = true
media_dirs =
/home/morta/Downloads/Music|Music
excluded_file_extensions =
.html
.jpeg
.jpg
.log
.nfo
.pdf
.png
.txt
.zip
show_dotfiles = false
follow_symlinks = false
metadata_timeout = 1000

[http]
enabled = true
hostname = 127.0.0.1
port = 6680
zeroconf = Mopidy HTTP server on $hostname
allowed_origins =
csrf_protection = true
default_app = mopidy

[m3u]
enabled = true
base_dir =
default_encoding = latin-1
default_extension = .m3u8
playlists_dir =

[softwaremixer]
enabled = true

[stream]
enabled = true
protocols =
http
https
mms
rtmp
rtmps
rtsp
metadata_blacklist =
timeout = 5000

[spotify]
enabled = true
username = XXX
password = ********
client_id = XXX
client_secret = ********
bitrate = 320
volume_normalization = true
private_session = false
timeout = 10
allow_cache = true
allow_network = true
allow_playlists = true
search_album_count = 20
search_artist_count = 10
search_track_count = 50
toplist_countries =
ch

[mpd]
enabled = true
hostname = 127.0.0.1
port = 6600
password =
max_connections = 20
connection_timeout = 60
zeroconf = Mopidy MPD server on $hostname
command_blacklist =
listall
listallinfo
default_playlist_scheme = m3u

[mopify]
enabled = true
debug = false

[local]
enabled = true
max_search_results = 10000
media_dir = /home/morta/Downloads/Music
scan_timeout = 1000
scan_flush_threshold = 100
scan_follow_symlinks = false
included_file_extensions =
excluded_file_extensions =
.directory
.cue
.html
.jpeg
.jpg
.log
.nfo
.pdf
.png
.txt
.zip
.m3u
.sfv
directories =
Albums local:directory?type=album
Artists local:directory?type=artist
Composers local:directory?type=artist&role=composer
Genres local:directory?type=genre
Performers local:directory?type=artist&role=performer
Release Years local:directory?type=date&format=%25Y
Tracks local:directory?type=track
Last Week’s Updates local:directory?max-age=604800
Last Month’s Updates local:directory?max-age=2592000
timeout = 10
use_artist_sortname = false
album_art_files =
*.jpg
*.jpeg
*.png

[iris]
enabled = true
country = ch
locale = de
spotify_authorization_url = https://jamesbarnsley.co.nz/iris/auth_spotify.php
genius_authorization_url = https://jamesbarnsley.co.nz/iris/auth_genius.php
data_dir = $XDG_DATA_DIR/iris

[morta@lapt0p ~]$ mopidy local scan
INFO 2020-12-27 14:21:55,452 [2924:MainThread] mopidy.main
Starting Mopidy 3.1.1
INFO 2020-12-27 14:21:55,530 [2924:MainThread] mopidy.config
Loading config from builtin defaults
INFO 2020-12-27 14:21:55,531 [2924:MainThread] mopidy.config
Loading config from file:///home/morta/.config/mopidy/mopidy.conf
INFO 2020-12-27 14:21:55,531 [2924:MainThread] mopidy.config
Loading config from command line options
INFO 2020-12-27 14:21:55,563 [2924:MainThread] mopidy.main
Enabled extensions: file, mpd, iris, softwaremixer, spotify, stream, http, m3u, mopify, local
INFO 2020-12-27 14:21:55,563 [2924:MainThread] mopidy.main
Disabled extensions: none
INFO 2020-12-27 14:21:55,622 [2924:MainThread] mopidy_local.commands
Finding files in file:///home/morta/Downloads/Music …
INFO 2020-12-27 14:21:55,683 [2924:MainThread] mopidy_local.commands
Found 2039 files in file:///home/morta/Downloads/Music
INFO 2020-12-27 14:21:55,684 [2924:MainThread] mopidy_local.commands
Checking 1890 tracks from library
INFO 2020-12-27 14:21:55,902 [2924:MainThread] mopidy_local.commands
Removing 0 missing tracks
INFO 2020-12-27 14:21:55,974 [2924:MainThread] mopidy_local.commands
Found 0 tracks which need to be updated
INFO 2020-12-27 14:21:55,974 [2924:MainThread] mopidy_local.commands
Scanning…
INFO 2020-12-27 14:21:55,974 [2924:MainThread] mopidy_local.commands
Scanned 0 of 0 files in 0.000s.
INFO 2020-12-27 14:21:55,974 [2924:MainThread] mopidy_local.commands
Done scanning
INFO 2020-12-27 14:21:56,183 [2924:MainThread] mopidy_local.storage
Cleaning up image directory

[morta@lapt0p ~]$ mopidy config
[core]
cache_dir = $XDG_CACHE_DIR/mopidy
config_dir = $XDG_CONFIG_DIR/mopidy
data_dir = $XDG_DATA_DIR/mopidy
max_tracklist_length = 10000
restore_state = false

[logging]
verbosity = 0
format = %(levelname)-8s %(asctime)s [%(process)d:%(threadName)s] %(name)s\n %(message)s
color = true
config_file =

[audio]
mixer = software
mixer_volume =
output = autoaudiosink
buffer_time =

[proxy]
scheme =
hostname =
port =
username =
password =

[file]
enabled = true
media_dirs =
/home/morta/Downloads/Music|Music
excluded_file_extensions =
.html
.jpeg
.jpg
.log
.nfo
.pdf
.png
.txt
.zip
show_dotfiles = false
follow_symlinks = false
metadata_timeout = 1000

[http]
enabled = true
hostname = 127.0.0.1
port = 6680
zeroconf = Mopidy HTTP server on $hostname
allowed_origins =
csrf_protection = true
default_app = mopidy

[m3u]
enabled = true
base_dir =
default_encoding = latin-1
default_extension = .m3u8
playlists_dir =

[softwaremixer]
enabled = true

[stream]
enabled = true
protocols =
http
https
mms
rtmp
rtmps
rtsp
metadata_blacklist =
timeout = 5000

[spotify]
enabled = true
username = XXX
password = ********
client_id = XXX
client_secret = ********
bitrate = 320
volume_normalization = true
private_session = false
timeout = 10
allow_cache = true
allow_network = true
allow_playlists = true
search_album_count = 20
search_artist_count = 10
search_track_count = 50
toplist_countries =
ch

[mpd]
enabled = true
hostname = 127.0.0.1
port = 6600
password =
max_connections = 20
connection_timeout = 60
zeroconf = Mopidy MPD server on $hostname
command_blacklist =
listall
listallinfo
default_playlist_scheme = m3u

[mopify]
enabled = true
debug = false

[local]
enabled = true
max_search_results = 10000
media_dir = /home/morta/Downloads/Music
scan_timeout = 1000
scan_flush_threshold = 100
scan_follow_symlinks = false
included_file_extensions =
excluded_file_extensions =
.directory
.cue
.html
.jpeg
.jpg
.log
.nfo
.pdf
.png
.txt
.zip
.m3u
.sfv
directories =
Albums local:directory?type=album
Artists local:directory?type=artist
Composers local:directory?type=artist&role=composer
Genres local:directory?type=genre
Performers local:directory?type=artist&role=performer
Release Years local:directory?type=date&format=%25Y
Tracks local:directory?type=track
Last Week’s Updates local:directory?max-age=604800
Last Month’s Updates local:directory?max-age=2592000
timeout = 10
use_artist_sortname = false
album_art_files =
*.jpg
*.jpeg
*.png

[iris]
enabled = true
country = ch
locale = de
spotify_authorization_url = https://jamesbarnsley.co.nz/iris/auth_spotify.php
data_dir = $XDG_DATA_DIR/iris

[morta@lapt0p ~]$ mopidy local scan
INFO 2020-12-27 14:21:55,452 [2924:MainThread] mopidy.main
Starting Mopidy 3.1.1
INFO 2020-12-27 14:21:55,530 [2924:MainThread] mopidy.config
Loading config from builtin defaults
INFO 2020-12-27 14:21:55,531 [2924:MainThread] mopidy.config
Loading config from file:///home/morta/.config/mopidy/mopidy.conf
INFO 2020-12-27 14:21:55,531 [2924:MainThread] mopidy.config
Loading config from command line options
INFO 2020-12-27 14:21:55,563 [2924:MainThread] mopidy.main
Enabled extensions: file, mpd, iris, softwaremixer, spotify, stream, http, m3u, mopify, local
INFO 2020-12-27 14:21:55,563 [2924:MainThread] mopidy.main
Disabled extensions: none
INFO 2020-12-27 14:21:55,622 [2924:MainThread] mopidy_local.commands
Finding files in file:///home/morta/Downloads/Music …
INFO 2020-12-27 14:21:55,683 [2924:MainThread] mopidy_local.commands
Found 2039 files in file:///home/morta/Downloads/Music
INFO 2020-12-27 14:21:55,684 [2924:MainThread] mopidy_local.commands
Checking 1890 tracks from library
INFO 2020-12-27 14:21:55,902 [2924:MainThread] mopidy_local.commands
Removing 0 missing tracks
INFO 2020-12-27 14:21:55,974 [2924:MainThread] mopidy_local.commands
Found 0 tracks which need to be updated
INFO 2020-12-27 14:21:55,974 [2924:MainThread] mopidy_local.commands
Scanning…
INFO 2020-12-27 14:21:55,974 [2924:MainThread] mopidy_local.commands
Scanned 0 of 0 files in 0.000s.
INFO 2020-12-27 14:21:55,974 [2924:MainThread] mopidy_local.commands
Done scanning
INFO 2020-12-27 14:21:56,183 [2924:MainThread] mopidy_local.storage
Cleaning up image directory

Sound is now working with Spotify and pulseaudio configuration but still no local files…

I did
sudo chown -R mopidy:audio /home/morta/Downloads/Music
sudo chmod -R ugo+rwx /home/morta/Downloads/Music
sudo find /home/morta/Downloads/Music -type d -exec sudo chmod ugo+rwx {} \;
sudo find /home/morta/Downloads/Music -type f -exec sudo chmod ugo+rwx {} \;

And it’s still not finding files with local!!!
How it is possible more rights are not possible?!

Plz help

Thanks Guys!!!

I think maybe you also need to give +x rights to the paths of folders containing your music, i.e.

  • /home/
  • /home/morta
  • /home/morta/Downloads
1 Like

So what i did:

  • Move the MUSIC Folder to /home/MUSIC
  • chmod +x /home as root
  • chown -R mopidy:audio /home/MUSIC
  • chmod -R ug+rwx /home/MUSIC
  • find /home/MUSIC -type d -exec chmod ug+x {} ;
  • sudo mopidyctl local scan

So i did the work after lot of screaming and debugging of log files and studding tutorials!

Thanks to all which help me !

But why is all empty under My Music (Artist,Album etc.) ?

Had to do Refresh on every category and choose local… so it’s work perfectly after hard work!

I did a little bounty to James… Have a happy end of the year and also happy new year!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.