Permissions Issue For Large Files Only (6GB+)

solarisguy

Guru
Joined
Apr 4, 2014
Messages
1,125
TS is a type of container for MPEG files. Thus just one last idea..., could you please rename your file from whatever.ts to whatever.mpg (just in case, no ts in the name) and retry the copy?

P.S.
Windows is actually way smarter than MS-DOS used to be, so it does not depend on the extensions for everything...
 

Sonny Williams

Dabbler
Joined
Oct 19, 2015
Messages
35
Do you think this might have something to do with copy protection? These are recorded using a cablecard through a TV Tuner. I don't typically record 30 minute long shows, but I always record in HD. The 30 minute shows are less than 6gb, but perhaps those channels have less copy protection? I don't understand why I can copy away to other machines, and across multiple platforms, but I cannot copy to FreeNAS. In fact, after upgrading to Windows 10, it kind of freaked out even worse. It gives the "You need to provide Administrator permissions" and when I clicked "Continue", it said that my "Y:\" drive was unavailable and just froze like that. I couldn't get rid of the screen error screen, but my Y: drive was still there and had no issues. Just in case it isn't apparent, my Y: drive is my main drive for the FreeNAS box. I went ahead and tried again, and I can still easily move these same files that are erroring over to other machines. I copied it over to my Mac over the network and it went fine.

If I could ditch the NextPVR backend, I would, but I like my live HD television. It only works in Windows though. :( Silicondust is building a full software DVR solution that runs on multiple platforms, including on certain NAS boxes. Does anyone know if FreeNAS is going to have an official plugin for Silicondust DVR from Silicondust?
 

solarisguy

Guru
Joined
Apr 4, 2014
Messages
1,125
What are the Windows permissions on a sample 6GB+ TS file? As compared to a smaller TS file?

Did you try to rename and copy?
 

Sonny Williams

Dabbler
Joined
Oct 19, 2015
Messages
35
Permissions are exactly the same. They are just recorded TS files, and they are in the same folder.

Sorry, I forgot to rename and copy. I did that, and it has the same issue. The weirdest part of it is that when I copy the file, it gets all the way up to 99%, then goes back to 0% and starts over, then when it gets to 99% again, it gives the permissions error. I've just never seen anything like that before, so I'm super lost.
 

solarisguy

Guru
Joined
Apr 4, 2014
Messages
1,125
I do not dance samba, however, I am still convinced that analyzing special Windows permissions (and ownership) of the files that fail and the files that are successful might uncover the root cause.

I would not only look at the Windows file properties (Properties, Security, Advanced, Effective Permissions) on your Windows machine, but also on the destination directory and successful files on the share (as seen from your Windows machine).

Also, on the FreeNAS, try lowering the maximum allowed SMB protocol. It should be at SMB2, but lower it anyway.

P.S.
You have some errors in the logs that were sent earlier. I cannot explain them (I do not dance samba), but they should be looked after.
 

solarisguy

Guru
Joined
Apr 4, 2014
Messages
1,125
@Sonny Williams, do you have a firewall on Windows? Turn it temporarily off. The same with any other security.

Does the network traffic travel only through a switch or there is some smart device involved?
 

Sonny Williams

Dabbler
Joined
Oct 19, 2015
Messages
35
So, I lost a couple posts when the FreeNAS forums died the other day, so I'll recap a few things that may or may not have been lost.

I have a lot of 6gb+ files in this share. I can also copy these exact files onto a Mac through the network, the same way I am transferring to the FreeNAS server. I can then successfully transfer it over the network from the Mac and onto the FreeNAS server using smb. I am not fully sure if that is the same as a mapped drive to be honest.

The connection is through a 12 port gigabit unmananged switch with 2gbps total throughout and Cat6 cables. Also, no firewalls anywhere in the LAN.

As for permissions, there are no special permissions on these files. They are created by NextPVR and are live TV recording containers. The smaller ones seem to move fine, but honestly it may have nothing to do with size. That was my original guess and after troubleshooting, I am now wondering if it is more of a DRM issue.

I have scheduled 5 HD recordings today that are going straight to the FreeNAS server. Some long, some short and on various different channels. If they work, then that solves my problem anyway, but doesn't address this weird permissions issue. It is still confusing why I can transfer them to other machines, be they windows, Mac or Linux, but cannot move to the FreeNAS.
 

Sonny Williams

Dabbler
Joined
Oct 19, 2015
Messages
35
Well it didn't help. In fact, it failed just opening up the container in the first place. As soon as it tried to create the TS file on the FreeNAS server, I received an invalid, generic error from NextPVR. I am going to just assume this is some sort of DRM protection issue. Not sure why I can copy it to other computers, and I'd love to get to the bottom of why FreeNAS is the only place that I cannot move it, but I am just going to add some post processing in for commercial skip and transcoding, and then have it auto copy over to the FreeNAS with the new format and with the DRM removed (if that is what is causing this issue).
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
A few thoughts:
1) Check to see if the large files have metadata written as 'alternate datastreams'. There is a limit to how large these can be. When an ADS is too large, it will fail to write to FreeNAS.
2) Your CIFS share has permissions set to 'UNIX' type. This is known to cause problems. I think it may be a good idea to create a dataset "/mnt/rz1/samba" with windows permission type and test the file transfer again. Delete the CIFS config for "media" share before testing and restart the CIFS service.
3) Disable "hostname lookups" in your CIFS config. This will make your logs more legible.
4) If (1) or (2) don't yield anything increase CIFS logging, reproduce problem, and upload /var/log/samba4/log.smbd.
 

Sonny Williams

Dabbler
Joined
Oct 19, 2015
Messages
35
I went ahead and recreated the share, and restarted the service. I have also disabled hostname lookups, and increased the logging. I went ahead and named my share back to 'media' and replicated the error a couple times and my new debug log file is attached.

So this is the weirdest thing.. I drag the file over to the share. It copies up to 100%. The file shows up in the share, and the copy starts over at 0%. While it is going through this second "copy" phase, I can pause the copy, and use the file up to that percentage. If it is 98% done, I can literally open it up from the NAS on any machine, but the moment it gets to 100% the second time, it throws a permissions error and deletes the file immediately. It does this from any Windows machine to the FreeNas server. I tried it with Windows 7, Windows 8.1 and Windows 10. however, from Mac and Linux machines, it doesn't seem to be an issue. However, just to reiterate a previous point, I can move it from Windows to Windows without any issue.
 

Attachments

  • log.zip
    20.2 KB · Views: 275

Sonny Williams

Dabbler
Joined
Oct 19, 2015
Messages
35
My issues seem to be getting more strange. Now, from time to time, I get permission errors simply by trying to drag something into my CIFS share. However, these are failing immediately. I rebooted the NAS, and then I updated it to the latest version. I don't have any errors or warnings in my NAS alerts.

When I drag a file over, it says "Destination Folder Access Denied. I can create files in here and add folders manually, but when I drag one over it just says permission denied. Then, out of nowhere, it will just magically let me drag and drop files. Then, after some seemingly random amount of time, it goes back to permission denied.
 

solarisguy

Guru
Joined
Apr 4, 2014
Messages
1,125
Possibly your FreeNAS server is not in the trusted zone. Can you add the entry
file://ip_address_of_your_FreNAS_system
to Advanced in Local intranet in Security in Internet Options in Internet Explorer ?

Going back to your original problem... Permissions are applied last, that is after copying has finished.
 

Sonny Williams

Dabbler
Joined
Oct 19, 2015
Messages
35
Possibly your FreeNAS server is not in the trusted zone. Can you add the entry
file://ip_address_of_your_FreNAS_system
to Advanced in Local intranet in Security in Internet Options in Internet Explorer ?

Going back to your original problem... Permissions are applied last, that is after copying has finished.

So, my system is having trouble setting permissions after the file copy is done? I have never had that issue before with previous NAS devices. I don't know much about the different types of shares, but is there something I can do to fix the issue?

Also, why would the trusted zone work when creating files on the NAS but give issues sporadically when copying files. The permissions issue that blocks me immediately is certainly sporadic and happens on nearly any file type. The permissions issue that happens after the copy is done is easy to replicate as it seems to happen with specific file types.

Edit: Also, thank you for the info about copy permissions being placed after a file copy. I am glad to know that now.
 

solarisguy

Guru
Joined
Apr 4, 2014
Messages
1,125
Possibly your FreeNAS server is not in the trusted zone. Can you add the entry
file://ip_address_of_your_FreNAS_system
to Advanced in Local intranet in Security in Internet Options in Internet Explorer ? [...]
Can you try that?
 

Sonny Williams

Dabbler
Joined
Oct 19, 2015
Messages
35
Of course. Sorry, I should have mentioned that in my previous post. I do not have the ability to try it right now, but I will most definitely try it tomorrow.
 

Sonny Williams

Dabbler
Joined
Oct 19, 2015
Messages
35
Well I had the opportunity to add the IP and the HostName of my FreeNAS server into the Trusted Sites zone in my Internet Options. I cannot really know if it will affect my previous instant failure issues unless it happens again, but it definitely didn't allow me to save the "ts" files. I still have that same issue. Again, it doesn't seem to be every "ts" file and it only seems to happen from Windows machines. All is lost! lol I feel like this is a highly unusual issue, and if it gets solved, someone definitely deserves a beer.
 
Top