SMB shared video files from Windows to Linux So, this might be more of a general Linux question, but I've tried everything I can think of with permissions, andI'm having the issue in Drupal, so I'm hoping someone here has an idea.

What I want to do: Use the Video module to play video files from a shared network folder; the folder is on a Windows Server 2012 system. (I realize the Vide module is geared towards uploading files, but if I manipulate the uri in the file_managed tables, I can change it, so I'm going to use the module to add the content, then edit the uris accordingly.)

1) Video defaults to the files/default/videos/originals folder for storing uploaded videos
2) I mounted the network folder at files/default/videos/originals/movies
3) Then I changed the uri for the video file to point to the mounted network folder


Now, I can change the uri to other local directories, and it works fine (I even had a symlink at one point leading out to my own user directory), but whenever I try to play the file (with the DivX player, since it seems to be the only one I tried that gives me an error message, instead of just hanging), I get a 403 error.

I've set the group and user of all involved to apache (and using ls -l, that seems to have been set), and my mount command in /etc/fstab is listed below

\\192.168.0.3\movies /var/www/html/sites/default/files/videos/original/movies cifs uid=48,gid=48,ro,suid,username=userName,password=passWord 0 0


(I used uid and gid because if I tried user and group, nothing happened.)
I've been fighting with this for hours, and I have no clue. Thanks for any help.

Running the following code from within Drupal returns nothing, but running the exact same code after placing it in "file.php", and calling "php file.php", and it returns the files in the directory fine.

glob('/var/www/html/sites/default/files/videos/original/movies/*.*')


I could really use some help with this.
Found the problem! It has to do with SELinux. After looking at the folder with

ls -Z


And seeing that files that were accessible had a context that the folder didn't (httpd_sys_rw_content_t), I disabled SELinux with

sudo setenforce 0


and I was able to access the files. Of course, I have more work to do, and I don't intend on keeping it turned off, but this at least shows me where the problem is. Wu!