As others have said this is file permissions.
Use Microsoft's "xcacls" (a downloadable tool by Microsoft for Windows sysadmins) because I believe it's a Windows issue. I used to see this on Windows Servers sometimes when the ACL (Access Control List) is borked.
Take ownership of everything (important) and then assign 'full control' access level.
You shouldn't have to do it each time.
You have to make sure that the user plex
has access not only to the drive, but the folder that the drive is mounted in. After a lot of tinkering I wound up going this route:
Edit the Mount Options (Disks -> "More Actions" (the two gears under the "Volumes" map) -> Edit Mount Options) such that:
nosuid,nodev,nofail
is in the area for storing the options in the /etc/fstab file (the textbox under "Symbolic Icon Name")
and set the Mount Point to be:
/media/<user>/<HDD Name>
and remount your HDD so that it will appear in the specified location.
Next, add yourself to the plex
user group by going to the Terminal and enter:
sudo adduser "$USER" plex
Now, you can modify the ownership of the relevant files and directory so that they are owned by ${USER}:plex
. You can give plex read-access to the drive by going to the Terminal and enter:
sudo chgrp plex "/media/${USER}/"
sudo chmod g+rX "/media/${USER}/"
sudo chgrp plex "/media/${USER}"/<HDD Name>/
sudo chmod g+rX "/media/${USER}"/<HDD Name>/
It may also be necessary to ensure that ACL permissions are properly configured, so the following might also be necessary:
sudo setfacl -m g:plex:rx /media/<user>/
FYI: If a file/directory displays a +
symbol as part of its permissions (e.g. drwxr-xr-x+
) that means that ACL controls are active for that file/directory.
Now that Plex has access to the drive, you need to make sure that it has access to all files in the relevant directories. This can be done by repeating the following for all of your media library folders:
chmod -R g+rX /media/<user>/<HDD Name>/<Library Folder>
This solved my issues for the two extra drives I've added to my HTPC. Hope it helps.
PS: As @douggro mentioned, Plex has a good article on the subject, but they changed up the structure of their site, so it took me a while to find it from his link, so here's a more current link to the page: Plex Linux Permissions Guide
Best Answer
Using
cp -b
will make a backup of the destination files, i.e. where you are copying to. I do not think you are trying to do this?The most common use is by using
-R
, which allows a recursive copy of the source to the destination. Perhaps this would be more appropriate?You might also consider using
rsync
(i.e.rsync -avz $SRC $DST --delete
), which would allow you to perform smaller backups each time, i.e. it will only transfer what changed`It may help if you provided details on the external disk, i.e. what filesystem it is using, etc.