1 [[!meta title="Access Control Lists"]]
3 On Gentoo, [[MPD]] runs as `mpd.audio`, and it creates playlists with
4 644 permissions (`-rw-r--r--`). However, I wanted other members of
5 the audio group (i.e. me), to also have read/write permissions. This
6 would allow me to sort/shuffle/create/etc. playlists from the command
7 line without going through MPD.
9 Browsing around, I ran across [Access Control Lists][ACL] ([nice
10 howto][howto]). The solution is to add a default ACL to the playlist
13 $ setfacl -d -m g:audio:rw- playlist
14 $ getfacl --omit-header playlists
20 default:group:audio:rw-
24 after which new files created in playlist will have `audio` read/write
27 $ getfacl --omit-header playlists/xyz.m3u
29 group::rwx #effective:rw-
34 Several other utilities have special ACL handling (see `acl(5)`). For
35 example, `ls` shows the presence of an ACL with a `+`:
37 $ ls -l playlists/xyz.m3u
38 -rw-rw-r--+ 1 wking wking 0 Dec 11 17:41 playlists/xyz.m3u
40 [ACL]: http://en.wikipedia.org/wiki/Access_control_list
41 [howto]: http://wiki.kaspersandberg.com/doku.php?id=howtos:acl