User Tools

Site Tools


systems:media_server:create_the_basic_directory_structure_of_the_media_library

Systems - Media Server - Create the Basic Directory Structure of the Media Library

The directory structure should look like this:

mnt/media/
├── movies/
├── tv/
├── music/
├── books/
└── photos/

Create the Media Directories

sudo mkdir -p /mnt/media/movies /mnt/media/tv /mnt/media/music /mnt/media/books /mnt/media/photos

NOTE: All the media directories fall under the centralized /mnt/media directory.


Verify the Media Directories

ls -l /mnt/media

returns:

drwxr-xr-x 2 root root 4096 May 30 16:36 books/
drwxr-xr-x 2 root root 4096 May 30 16:36 movies/
drwxr-xr-x 2 root root 4096 May 30 16:36 music/
drwxr-xr-x 2 root root 4096 May 30 16:36 photos/
drwxr-xr-x 2 root root 4096 May 30 16:36 tv/

NOTE: The permissions of the media directories are root:root.


Change ownership of the directories

sudo chown -R peter:peter /mnt/media

NOTE: This ensures that the user has access to these directories.


Verify the ownership change worked

ls -l /mnt/media

returns:

drwxr-xr-x 2 peter peter 4096 May 30 16:36 books
drwxr-xr-x 2 peter peter 4096 May 30 16:36 movies
drwxr-xr-x 2 peter peter 4096 May 30 16:36 music
drwxr-xr-x 2 peter peter 4096 May 30 16:36 photos
drwxr-xr-x 2 peter peter 4096 May 30 16:36 tv

Grant Read, Write, and Execute to this user

sudo chmod -R 770 /mnt/media/

Verify the permission change worked

ls -l /mnt/media

returns:

drwxrwx--- 2 peter peter 4096 May 30 16:36 books
drwxrwx--- 2 peter peter 4096 May 30 16:36 movies
drwxrwx--- 2 peter peter 4096 May 30 16:36 music
drwxrwx--- 2 peter peter 4096 May 30 16:36 photos
drwxrwx--- 2 peter peter 4096 May 30 16:36 tv

systems/media_server/create_the_basic_directory_structure_of_the_media_library.txt · Last modified: 2025/05/30 16:42 by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki