[mythtv-users] mythlink.pl for 0.28

Robin Gilks g8ecj at gilks.org
Sat May 7 03:31:03 UTC 2022

> On Tue, 3 May 2022 11:11:50 +1200, you wrote:
>>Making progress - seems like the perl file had trailing spaces where it
>>shouldn't!! No idea how that came about...
>>Next problem is that the show title needs to be quoted somehow if it has
>>embedded spaces:
>>mkdir /mnt/backups/links/1 News At 6pm: Permission denied at
>> ./mythlink.pl
>>line 493.
>>Here is the code snippet where the problem occurs:
>>   # Create the link
>>        my $directory = dirname("$dest/$name");
>>        unless (-e $directory) {
>>            mkpath($directory, 0, 0775)
>>                or die "Failed to create $directory:  $!\n";
>>        }
>>        symlink $show->{'local_path'}, "$dest/$name"
>>            or die "Can't create symlink $dest/$name:  $!\n";
>>        vprint("$dest/$name");
>>I haven't done anything with perl for over 25 years - forgotten how to
>>drive it!
> I just ran mythlink.pl on my test machine and it runs fine - there are
> no problems with file names with spaces in them.  So your permissions
> problem is likely from the directory where it is attempting to store
> the links.  The message is mentioning "1 News At 6pm" only because
> that is the first link it was trying to create.  So you might like to
> try using it like this:
> mkdir /tmp/mythlink
> chmod a=rwx /tmp/mythlink
> /usr/share/doc/mythtv-backend/contrib/user_jobs/mythlink.pl --verbose
> --path /tmp/mythlink
> The last command of the 3 is all on one line - my email client wraps
> longer lines.
> Or you could just run it as root.

Well spotted - that is exactly what the issue was. Thanks Stephen

Robin Gilks

More information about the mythtv-users mailing list