These forums are archived

See this post for further info

get_iplayer forums

Forum archived. Posting disabled.

How do I mount a network share to use for my output directory?

user-2145

Hi,

I'm using Xubuntu and have installed get_iplayer without any issues but I now want to redirect the downloads to a folder on my QNAP.

I have tried changing the output location as below:

get_iplayer --prefs-add --output smb://qnap.local/files/get_iplayer_downloads/

The result is a folder called "qnap.local" is created under the home directory?

I've tried a few variations on the above (including using ip address) and the result is that each time a folder with the initial part of the string is created under the "Home" directory. I can browse to the Qnap no problem in the file explorer using smb://qnap.local and access all the shares?

I'm sure i'm doing something wrong (i'm very much a Linux beginner) but can't figure out what?

Thanks, Jon

user-1503

You will need to mount the shared folder on your main machine, rather than using the SMB path.

in the home directory create a folder called "iplayer_downloads"

To do this open a "terminal window" and try the following command:

Code:
mkdir ~/iplayer_downloads
This creates an empty folder (so you can link the NAS folder so that your Linux machine sees it as a local folder.)
Then:
Code:
sudo mount -t cifs -o username=admin,password=admin //qnap.local/files/get_iplayer_downloads/  ~/iplayer_downloads
replace "admin" and "password" with your NAS logiin details. You will loose the link if you reboot the linux machine, This is just to test to see if you can link it.

If it works then a permanent link can be created easily.

user-2145

Hi, thanks for helping me out. I created the directory but there is an issue when trying to mount:

jon@XubuntuQNAP:~$ sudo mount -t cifs -o username=*****,password=*********** //qnap.local/files/Get_iplayer/Downloads/ ~/iplayer_downloads
mount: wrong fs type, bad option, bad superblock on //qnap.local/files/Get_iplayer/Downloads/,
missing codepage or helper program, or other error
(for several filesystems (e.g. nfs, cifs) you might
need a /sbin/mount.<type> helper program)

In some cases useful info is found in syslog - try
dmesg | tail or so.

user-1503

(25-04-2018, 12:27 PM)Hi, thanks for helping me out. I created the directory but there is an issue when trying to mount:

jon@XubuntuQNAP:~$ sudo mount -t cifs -o username=*****,password=*********** //qnap.local/files/Get_iplayer/Downloads/  ~/iplayer_downloads
mount: wrong fs type, bad option, bad superblock on //qnap.local/files/Get_iplayer/Downloads/,
      missing codepage or helper program, or other error
      (for several filesystems (e.g. nfs, cifs) you might
      need a /sbin/mount.<type> helper program)

      In some cases useful info is found in syslog - try
      dmesg | tail or so.

try without the " -t cifs "
Code:
sudo mount -o username=admin,password=admin //qnap.local/files/get_iplayer_downloads/  ~/iplayer_downloads

user-2145

I managed to get the mount to work after installing cifs-utils but I now get an error when get_iplayer attempts to write the file:

ERROR: Cannot open (write): /home/jon/iplayer_downloads/Alphablocks_Series_3_-_18._Book_b01py6g1_original.video.ts

I also can't create any new folders or documents within it.

I assume it is a permissions issue due to the folder being created as sudo but haven't been able to fix it yet, even running Thunar as sudo does not seem to allow me to change the permissions.

user-1503

Sorry for the delay.

Not too familiar with QNAP devices.

Check to see if you can give "guest" or "anonymous" user read/write privileges to the required folder.
Or you could try creating a qnap user with the exact same username and password as your linux machine. Give the new qnap user full privileges to the shared folder then use that login instead of the admin one.

user-2145

Hi,

I realized I could write to the share as the root user but not as a regular user so for that reason I don't think it is the QNAP permissions that are the issue (no root user specified on the QNAP permissions).

I'll try adding the mount in permanently in fstab, there seems to be more cmds you can apply when adding that way to specify which users have access. I'll post back here how I get on.

user-2145

It appears I had to explicitly enter the user and group permissions in the cmd (uid & gid):

sudo mount -t cifs -o username=*****,password=*****,uid=jon,gid=jon //qnap.local/Get_iPlayer/ ~Get_iPlayer

Thanks for the help :)

user-2145

Just in case this is useful for others to make this permanent I added the following lines to fstab located at /etc/fstab

//qnap.local/Get_iPlayer /home/jon/Get_iPlayer cifs username=****,password=****,uid=jon,gid=jon

Thanks again for the help

These forums are archived

See this post for further info