Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

YT: Download no longer possible. URLError(error(13, 'Permission denied') #21084

Closed
acidstout opened this issue May 13, 2019 · 1 comment
Closed

YT: Download no longer possible. URLError(error(13, 'Permission denied') #21084

acidstout opened this issue May 13, 2019 · 1 comment
Labels

Comments

@acidstout
Copy link

@acidstout acidstout commented May 13, 2019

Checklist

  • I'm reporting a broken site support issue
  • I've verified that I'm running youtube-dl version 2019.05.11
  • I've checked that all provided URLs are alive and playable in a browser
  • I've checked that all URLs and arguments with special characters are properly quoted or escaped
  • I've searched the bugtracker for similar bug reports including closed ones
  • I've read bugs section in FAQ

Verbose log

Command: /usr/bin/youtube-dl --verbose --no-check-certificate --restrict-filenames --youtube-skip-dash-manifest -f 18 -o /var/tmp/test.mp4 ifoZBdhxoFY
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'--verbose', u'--no-check-certificate', u'--restrict-filenames', u'--youtube-skip-dash-manifest', u'-f', u'18', u'-o', u'/var/tmp/test.mp4', u'ifoZBdhxoFY']
[debug] Encodings: locale ANSI_X3.4-1968, fs ANSI_X3.4-1968, out None, pref ANSI_X3.4-1968
[debug] youtube-dl version 2019.05.11
[debug] Python version 2.7.5 (CPython) - Linux-3.10.0-957.5.1.el7.x86_64-x86_64-with-centos-7.6.1810-Core
[debug] exe versions: none
[debug] Proxy map: {}
[youtube] ifoZBdhxoFY: Downloading webpage
ERROR: Unable to download webpage:  (caused by URLError(error(13, 'Permission denied'),))
  File "/usr/bin/youtube-dl/youtube_dl/extractor/common.py", line 626, in _request_webpage
    return self._downloader.urlopen(url_or_request)
  File "/usr/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 2227, in urlopen
    return self._opener.open(req, timeout=self._socket_timeout)
  File "/usr/lib64/python2.7/urllib2.py", line 431, in open
    response = self._open(req, data)
  File "/usr/lib64/python2.7/urllib2.py", line 449, in _open
    '_open', req)
  File "/usr/lib64/python2.7/urllib2.py", line 409, in _call_chain
    result = func(*args)
  File "/usr/bin/youtube-dl/youtube_dl/utils.py", line 1140, in https_open
    req, **kwargs)
  File "/usr/lib64/python2.7/urllib2.py", line 1214, in do_open
    raise URLError(err)

Description

The above command fails with the error above when I try to execute it from a PHP script. The same command works fine, if I execute it directly from the shell. The user is the same (e.g. www-data both times). The folder /var/tmp is world writable (0777).

The youtube-dl cache has been cleared with

youtube-dl --rm-cache-dir

but it doesn't make a difference.

I have no idea if the URLError thrown by youtube-dl is related to the video URL or to a general permission issue on my server. The error message by youtube-dl is not clear about this. For me it sounds like an issue with the response of the YouTube server. But on the other hand the download from Bash should also fail then which is not the case.

Also I provided the default Firefox user-agent for testing purposes, because I believed YouTube maybe blocks requests with unknown UA. But that doesn't help either.

There was a time when youtube-dl worked flawlessly if run by a PHP script. So, I wonder what's been changed. The PHP script is unmodified since:

passthru('/usr/bin/youtube-dl --verbose --no-check-certificate --restrict-filenames --youtube-skip-dash-manifest -f 18 -o /var/tmp/test.mp4 ifoZBdhxoFY', $result_code);

Any suggestion or idea? Maybe I missed something.

@dstftw
Copy link
Collaborator

@dstftw dstftw commented May 13, 2019

Something blocks requests on your side, probably https://stackoverflow.com/a/28085075/4749894.
Nothing to do with youtube-dl.

@dstftw dstftw closed this May 13, 2019
@dstftw dstftw added the invalid label May 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.