Dealing with RO file systems and indexing
I'm pretty freakish about security on my system, so let me explain my subsonic layout. This is a Linux system, btw.
All my mp3 file are in /mp3 which is a read-only file system. Before I make changes to tags or whatever, I remount as re-write, make my changes, then remount it read-only. This aids in quickly restarting the system from any sort of crash due to not having to fsck the file system.
All the mp3 files are owned by me with rw permissions, and group mp3 with r permissions only. There are no permissions for other. That means only myself or members of the "mp3" group have access to the music files.
Subsonic is installed in /home/subsonic and is in the mp3 group.
This means my music and OS is pretty safe should there be any sort of issue with subsonic because at no point is it running as root, and at no point does it have write permissions to any of my files.
Now, the problem comes when it's time to index the files and attempts to create an album art. As you can imagine, this generates a lot of write errors.
The only solutions I can think of are to have a standalone index module that can be run by a root cronjob that will:
Change the file system to read/write temporarily
Index the files as root user to allow for writing the files with album art
Change the file system back to wo
Anyone have a better suggestion?
All my mp3 file are in /mp3 which is a read-only file system. Before I make changes to tags or whatever, I remount as re-write, make my changes, then remount it read-only. This aids in quickly restarting the system from any sort of crash due to not having to fsck the file system.
All the mp3 files are owned by me with rw permissions, and group mp3 with r permissions only. There are no permissions for other. That means only myself or members of the "mp3" group have access to the music files.
Subsonic is installed in /home/subsonic and is in the mp3 group.
This means my music and OS is pretty safe should there be any sort of issue with subsonic because at no point is it running as root, and at no point does it have write permissions to any of my files.
Now, the problem comes when it's time to index the files and attempts to create an album art. As you can imagine, this generates a lot of write errors.
The only solutions I can think of are to have a standalone index module that can be run by a root cronjob that will:
Change the file system to read/write temporarily
Index the files as root user to allow for writing the files with album art
Change the file system back to wo
Anyone have a better suggestion?