Unable to copy files from Kodi HTPC to FreeNAS server.

Status
Not open for further replies.

trebznas

Explorer
Joined
Jun 1, 2011
Messages
51
Hi All

It's been a while since I used Freenas so forgive me if I'm a bit out of date.

I'm running FreeNAS-9.3-STABLE-201509022158 on a HP Proliant Microserver with two 2TB HDD's, mirrored. I set it up two years ago but due to having a child etc I've only just turned it on and used it.

I'm running Kodi on my HTPC in the living room and want to copy the media from it onto my Freenas server. I can add the Freenas share to the Kodi File Manager as an additional source but when I use the Kodi File Manager to copy the files from the Kodi box to the Freenas share it fails. I'm guessing this is due to a permissions issue.

Does anyone have any idea as to why I can't copy files from the Kodi HTPC box to the Freenas box.

Thanks in advance.

Trebz
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
Ensure your FreeNAS sharing is set to allow guests. I'd also set the storage location up to ensure guest can write to the area.
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
Sorry, I didn't actually say set the directory permissions to 777.
 

trebznas

Explorer
Joined
Jun 1, 2011
Messages
51
Thanks for the pointers but:

I don't know how to set the storage location up to ensure guest can write to the area or set the directory permissions to 777.
 

Glorious1

Guru
Joined
Nov 23, 2014
Messages
1,211
I'm running Kodi on my HTPC in the living room and want to copy the media from it onto my Freenas server. I can add the Freenas share to the Kodi File Manager as an additional source but when I use the Kodi File Manager to copy the files from the Kodi box to the Freenas share it fails. I'm guessing this is due to a permissions issue.
I suggest you don't use Kodi File Manager to transfer files unless you have no other choice. I haven't really used it, but I imagine it is pretty kludgy and you can't tell what's happening if it fails.

Is the HTPC headless? Can you access both the FreeNAS and HTPC via some kind of sharing? If so, you could just drag and drop. Otherwise, can you log into them via ssh? Then you could log into one and use scp (a kind of ssh file copy) to copy the files from/to the other one. For instance, if you log into the FreeNAS, cd into the folder where you want to put the files then (just going by memory here):
Code:
scp <user>@<local IP of HTPC>:/path/to/media/files/* .
 

trebznas

Explorer
Joined
Jun 1, 2011
Messages
51
I can access both the HTPC and Freenas server from my Windows 10 PC. I have created a shortcut to the Freenas server and I can access the media folder via Windows Explorer. When I copy and then paste the media files to the Freenas server I get an access denied / permissions error.
 
Joined
Jan 7, 2015
Messages
1,155
Go into the sharing options for the dataset in question and look and see if "Allow Guest Access" is checked. This is done from the FreeNAS GUI, selecting "Sharing" from the bar at the top, then "Windows (SMB)" then select the particular share from the list. Then toward the bottom there is an "Edit" button. Then in the dialogs, look for "Allow Guest Access", and make sure its checked.
 

trebznas

Explorer
Joined
Jun 1, 2011
Messages
51
Thanks John, I already checked this a number of days ago, it's all set up as per your post.
 
Joined
Jan 7, 2015
Messages
1,155
The way I have always done it is not generally the best way, but it works. Its more or less based off of this POST where your Windows (or Unix, Mac) user has an account (same name, same group, ID) on the FreeNAS box and the dataset in question is owned by that user/group/ID. Have a read through that post. It has good info but is more focused on the aspect of FreeNAS plugins having permission issues. It is more or less the same thing, instead of a plugin you are dealing with a different machine. Me personally, all my media directories are owned by this user, so I can do whatever to the files/directories from any machine in my house. Be advised, if there are multiple persons using the shares and such, this is not the recommended way, when files are moved, changed or deleted, on accident or purpose, thats it, she gone. Be vigilant in that regard. Its just me here so it works great in my situation.
 

trebznas

Explorer
Joined
Jun 1, 2011
Messages
51
I tried: SOLUTION 1 - USER WRITEABLE and it doesn't work.

I'm thinking of installing Windows 7 onto my little server as it's been six days and I'm no closer to having this fixed. I can still see and connect to the 'Filestore' share I created on my Freenas box but I get a permission denied when I try and copy / paste files or drag and drop.

Surely it should be easier than this. How do you all manage. I followed some tutorials on how to build the Freenas serer, install the software, configure my disks and share but since then I've been unable to write data to the server. It's been well over a year since I built it and it's just sat there on a shalf laughing at me. It's not even been plugged into the mains until six days ago.

Everyone else seems to get on with this ok so why am I having such problems.

Ggrrrrr

People have these Freenas servers in their business's and they manage. I can't even copy a .jpg of my cat onto my Freenas server !
 
Last edited:

trebznas

Explorer
Joined
Jun 1, 2011
Messages
51
Ok, to add to my annoyance.

I just booted up my old Acer Revo unit which has Windows 7 installed. I browsed to my media centre then started to copy and paste the data from my media centre to the Freenas 'Filestore' share. It works perfectly with no error messages.

So:

1. Freenas is set up ok.
2. Windows 10 is unable to copy files to the server, when this is done I receive a 'Permissions Denied' error message.

Now, all we need to do is work out why Windows 10 does not have permission to Freenas when Windows 7 does.

P.S. I hate anything with a plug on it.
 

leenux_tux

Patron
Joined
Sep 3, 2011
Messages
238
Give WinSCP a try. Not the fastest but might get the job done if your struggling with SMB
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
Joined
Jan 7, 2015
Messages
1,155
Hmm. Windows 10. I have never had the "pleasure" of using it. I switched to Linux many moons ago so anything further from me would be guessing pretty much. +1 for SFTP and the like. THIS is a post I had a friend follow who is a Window user and apparently it worked ok for him, because I never heard back from him about it. Im not sure which Windows he was using even.
 

trebznas

Explorer
Joined
Jun 1, 2011
Messages
51
Hi again everyone.

Ok, so I didn't change a thing and I can now copy and paste the files I need from the Media Centre to the Freenas server perfectly. I can also access the Freenas server from my Windows 10 PC.

I now have a new problem. The Raspberry Pi in the living room running Openelec will not access the files on my Freenas server, this must be a permissions issue. Can anyone assist? I know this is not specifically a Freenas issue but I think the Raspberry Pi / Openelec unit needs permissions setup to access the Freenas unit and that config would be on the Freenas side of things.

Thanks in advance.

Trebz
 
Joined
Jan 7, 2015
Messages
1,155
I think you are correct. Look here. You might only need to add the user and password to the source string(s) in sources.xml file. This will be the user:pass from FreeNAS that owns these directories. Alternatively, when a source is added to Kodi and a user password combo is required it asks for these credentials and adds them to the sources for you. So adding or re adding your sources should clear this up. However this is not without a fairly large caveat. I do suspect your librarys will want to rescrape for all your media. See if editing sources.xml like the examples clears this up.

The sources.xml file for Openelec is easily accessed from Windows in Network Manager @ \\ipofraspberrypi\Userdata\sources.xml

Make edits as needed, then save, then reboot the Pi and see if that gets it done. I suspect you might not even need to reboot but I'm not sure.
 
Joined
Jan 7, 2015
Messages
1,155
One other thought I had was if you have multiple Kodi instances running the advancedsettings and sources.xml files can be edited once correctly and easily copied to all Kodi userdata folders. In the past I have also noticed a passwords.xml file. I think this is the generated file if Kodi prompts for user password. It should also be able to be copied should it be there.
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
I now have a new problem. The Raspberry Pi in the living room running Openelec will not access the files on my Freenas server, this must be a permissions issue.
Did this ever work with FreeNAS and this RPi?
What is the connectivity? (WiFi or Ethernet)
How did you fix the previous problem? If you set up guest access to solve it then this should not be an issue.
Describe exactly what you are doing on the RPi, including down to the error.
 

trebznas

Explorer
Joined
Jun 1, 2011
Messages
51
Hi everyone, me again. I'm now unable to copy and past files to the Freenas server again. I have some general media files I need to copy to it from my Windows 10 PC and I'm now getting the old 'You need permissions to perform this action' error message from Windows.

I've changed nothing on the Freenas box in the last year.
 
Status
Not open for further replies.
Top