Using CLI to change Plex library permissions
Sometimes when using transfer methods between devices, we run into permissions issues. This can include permissions issues after seedbox migration—incorrect Sonarr & Radarr permissions. For us to allow Plex to read our media files we must first log in using SSH and run a few short commands.
Lets Begin! 🚀
This guide is intended for advanced users with a history of using SSH. If you are uncomfortable using SSH, please reach out to a member of Rapid Seedbox Support using the Chat Feature on the bottom right-hand corner of your screen.
Here is a step-by-step guide for using the chmod command to give Plex permissions to access a library directory:
Open a terminal window.
Use the
cdcommand to navigate to the directory where your Plex library is located. For example, if your library is located in the directory/home/user/plex/, you would run the commandcd /home/user/plex/.Use the
ls -lcommand to view the current permissions for the directory. The output will show the permissions for the owner, group, and others.To ensure Plex has proper access, use the
setfaclcommand instead of chmod. For example, runsetfacl -R -m u:plex:rwx /home/user/plexto grant Plex full access.For new files, set a default ACL by running
setfacl -R -m d:u:plex:rwx /home/user/plex.
The first 7 (rwx) belongs to owner, second 7(rwx) belongs to group, third 7 (rwx) belongs to others. The permissions are given in octal format.
To check if the permissions have been applied correctly, you can use the
ls -lcommand again to view the updated permissions for the directory.
It is important to note that the Plex user will also need appropriate permissions for directory access. Using the setfacl command as described above is the recommended method for ensuring this.
I don't know what to do next...
If you need any assistance, let us know by opening a chat in the lower right hand corner of your screen. We're here to help 😄
