You are not logged in.
Hello again, newbie corner folks!
I probably never noticed this because I used to run Arch mostly on my netbook with all partitions formatted to EXT4, while I kept the desktop running Windows for gaming and etcetera. I've been cracking my head for the past hour and just couldn't figure this out.
My /etc/fstab entry for the NTFS partition always worked with options set to defaults without any problems, I could read/write without even owning the /mnt/data folder (which I just did trying to figure this out, it was still root:root).
With partition unmounted:
klaus@void ~ % ls -l /mnt
total 4
drwxr-xr-x 2 klaus users 4096 Jan 6 15:34 data
With partition mounted:
klaus@void ~ % ls -l /mnt
total 24
drwxrwxrwx 1 klaus users 24576 Apr 17 18:12 data
Current entry on /etc/fstab:
UUID=7C76F10927DE59A4 /mnt/data ntfs-3g uid=klaus,gid=users 0 0
Already tried `uid=user1,gid=users,dmask=022,fmask=133`, `uid=username,gid=users,umask=0022` and some sane variations of those options and it still didn't work. I have ntfs-3g installed and mpd running on systemctl, so it seems to me like mpd is the one that's unable to write data.
I'd like to know how do I fix this and, if possible, an explanation as to why this is happening so I can better understand Arch.
Thanks!
Last edited by klaus (2015-04-19 07:57:15)
Offline
If you are running mpd as a global service, it will most likely run as the user mpd. Please verify if this is indeed the case.
If this is the case: The mpd user is in the mpd group (like your user klaus is most likely in the klaus group) and not in the users group, making mpd unable to write to your partition. A simple solution is to add mpd to the group users.
Offline
If you are running mpd as a global service, it will most likely run as the user mpd. Please verify if this is indeed the case.
If this is the case: The mpd user is in the mpd group (like your user klaus is most likely in the klaus group) and not in the users group, making mpd unable to write to your partition. A simple solution is to add mpd to the group users.
I'm running it as a user daemon like explained on the wiki article. Anyway, just tried adding mpd to users and it didn't work.
klaus@void ~ % sudo gpasswd -a mpd users
Adding user mpd to group users
klaus@void ~ % systemctl --user restart mpd
Offline
You mean the local configuration or the global configuration? As which user does mpd run?
In my previous post I overlooked the umask. 0022 will give read and execute permissions to the group, meaning that the group will still not be able to write to the folder. If the user is indeed mpd (as I assumed previously), fix the permissions so that the group can write as well (umask=0002, please check yourself). Just be careful with the groups when creating new users.
Offline
mpd is running on local configuration as user daemon. Still not working, am I missing something?
klaus@void ~ % ps -aux | grep mpd
klaus 6537 0.0 0.3 758404 29780 ? Ssl 07:00 0:00 /usr/bin/mpd --no-daemon
klaus 6690 0.0 0.0 10700 2272 pts/7 S+ 07:03 0:00 grep --color=auto mpd
klaus@void ~ % systemctl --user status mpd
● mpd.service - Music Player Daemon
Loaded: loaded (/usr/lib/systemd/user/mpd.service; enabled; vendor preset: enabled)
Active: active (running) since Sat 2015-04-18 07:00:23 BRT; 4min 50s ago
Main PID: 6537 (mpd)
CGroup: /user.slice/user-1000.slice/user@1000.service/mpd.service
└─6537 /usr/bin/mpd --no-daemon
klaus@void ~ % ll /mnt/data/Music/Lib
total 144
drwxrwxr-x 1 klaus users 0 Dec 10 23:11 5 a Seco
(...)
klaus@void ~ % cat /etc/fstab | grep /mnt/data
UUID=7C76F10927DE59A4 /mnt/data ntfs-3g uid=klaus,gid=users,umask=0002 0 0
Edit:
klaus@void ~ % cat .config/mpd/mpd.conf
db_file "~/.config/mpd/database"
log_file "~/.config/mpd/log"
pid_file "~/.config/mpd/pid"
state_file "~/.config/mpd/state"
sticker_file "~/.config/mpd/sticker.sql"
music_directory "/mnt/data/Music/Lib"
playlist_directory "~/.config/mpd/playlists"
audio_output {
type "pulse"
name "PulseAudio"
}
audio_output {
type "fifo"
name "Visualizer"
path "/tmp/mpd.fifo"
format "44100:16:2"
}
audio_output {
type "httpd"
name "Stream"
encoder "lame"
port "8888"
max_clients "5"
quality "5.0" # define only if bitrate is undefined
# bitrate "128"
format "44100:16:1"
}
Last edited by klaus (2015-04-18 10:12:36)
Offline
No, you are not missing anything as far as I know. The user is klaus, not mpd (as is the case with a global config), so the fix I proposed will not work. Sorry for the distraction.
What happens if you start mpd as a user (so without systemd)? Is it able to write the tags then?
EDIT: Does this also happen when you put the music on a different filesystem?
Last edited by runical (2015-04-18 11:57:21)
Offline
No, you are not missing anything as far as I know. The user is klaus, not mpd (as is the case with a global config), so the fix I proposed will not work. Sorry for the distraction.
What happens if you start mpd as a user (so without systemd)? Is it able to write the tags then?
EDIT: Does this also happen when you put the music on a different filesystem?
Nah, no problem, I appreciate you trying to help me out! By the way, no such luck trying to rename/retag files in ~/Music (I didn't copy them from the ntfs partition, they were created on the ext4 part.), and mpd doesn't log anything weird. I also tried killing the systemd user unit and running `mpd --no-daemon -v` -- no stderr output or logs indicating a writing fault of any kind...
Last edited by klaus (2015-04-18 12:32:52)
Offline
I think we need to take a look at your client. I just looked at the website and it states that writing tags is not part of mpd functionality (should have known that). Did you set your musicdir in the ncmpcpp config correctly? [1]
[1] http://ncmpcpp.rybczak.net/faq.php
Last edited by runical (2015-04-19 07:34:51)
Offline
I think we need to take a look at your client. I just looked at the website and it states that writing tags is not part of mpd functionality (should have known that). Did you set your musicdir in the ncmpcpp config correctly? [1]
Alright, I never felt so dumb. Haha. I bet this is on the FAQ because a lot of people assume ncmpcpp is nothing but a front end...
# Needed for tag editor and file operations to work.
#mpd_music_dir = /mnt/data/Music/Lib
Sorry if I wasted you time, dude, and thank you! There was nothing wrong with my permissions, then.
Thread marked as solved.
Offline
No problem. Mistakes are how we learn
Offline