I'm having issues with SELinux not applying the correct file context for folders that I "cut" and move into a public share. The SMB share works great when I create files and folders directly within it, but when I cut folders from another location to paste into the share, I consistently have to use the 'restorecon' command to update their context. I have a file context rule set up with 'semanage fcontext -a -t samba_share_t "/media/share(/.*)?"'. Is there a way to stop this manual relabeling or to have the file contexts automatically update when I move files?
2 Answers
When you cut and move files, the SELinux context doesn’t automatically update to match the new location, which is by design. Instead, if you copy the files into the share, they will inherit the correct context. You might want to try using the command line and the 'cp' command instead of 'mv' to see if that makes a difference for you.
Just to add, when you’re moving files through something like the Dolphin file manager, it might be causing additional troubles. If you want to ensure everything works smoothly, give the command line a shot—use 'cp' to copy files over, and it should take care of the context issues automatically.

Related Questions
Can't Load PhpMyadmin On After Server Update
Redirect www to non-www in Apache Conf
How To Check If Your SSL Cert Is SHA 1
Windows TrackPad Gestures