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

youtube-dl works under root, but not under www-data #6605

Closed
UltimateBrent opened this issue Aug 18, 2015 · 2 comments
Closed

youtube-dl works under root, but not under www-data #6605

UltimateBrent opened this issue Aug 18, 2015 · 2 comments

Comments

@UltimateBrent
Copy link

@UltimateBrent UltimateBrent commented Aug 18, 2015

I'm automating some downloads, and I can't get it to download right. When doing it under root, everything is fine, but if not, I get a 403 forbidden error. All I can assume is that youtube-dl is temp downloading the manifests somewhere www-data doesn't have permission? The local directory is 777...

$ ./youtube-dl --verbose -o "fart.%(ext)s"  https://www.youtube.com/watch?v=xWIKQMBBTtk --no-progress
[debug] System config: []
[debug] User config: []
[debug] Command-line args: [u'--verbose', u'-o', u'fart.%(ext)s', u'https://www.youtube.com/watch?v=xWIKQMBBTtk', u'--no-progress']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2015.08.16.1
[debug] Python version 2.7.3 - Linux-3.2.0-60-virtual-x86_64-with-Ubuntu-12.04-precise
[debug] exe versions: ffmpeg N-39499-g12292f3, ffprobe N-39499-g12292f3
[debug] Proxy map: {}
[youtube] xWIKQMBBTtk: Downloading webpage
[youtube] xWIKQMBBTtk: Downloading video info webpage
[youtube] xWIKQMBBTtk: Extracting video information
[youtube] {22} signature length 40.42, html5 player new
[youtube] {43} signature length 40.42, html5 player new
[youtube] {18} signature length 40.42, html5 player new
[youtube] {5} signature length 40.42, html5 player new
[youtube] {36} signature length 40.42, html5 player new
[youtube] {17} signature length 40.42, html5 player new
[youtube] {137} signature length 40.42, html5 player new
[youtube] {248} signature length 40.42, html5 player new
[youtube] {136} signature length 40.42, html5 player new
[youtube] {247} signature length 40.42, html5 player new
[youtube] {135} signature length 40.42, html5 player new
[youtube] {244} signature length 40.42, html5 player new
[youtube] {134} signature length 40.42, html5 player new
[youtube] {243} signature length 40.42, html5 player new
[youtube] {133} signature length 40.42, html5 player new
[youtube] {242} signature length 40.42, html5 player new
[youtube] {160} signature length 40.42, html5 player new
[youtube] {140} signature length 40.42, html5 player new
[youtube] {171} signature length 40.42, html5 player new
[youtube] xWIKQMBBTtk: Downloading DASH manifest
WARNING: [youtube] xWIKQMBBTtk: Skipping DASH manifest: ExtractorError(u'Could not download DASH manifest: HTTP Error 403: Forbidden (caused by HTTPError()); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.',)
[debug] Invoking downloader on u'https://r3---sn-p5qlsnsk.googlevideo.com/videoplayback?mv=u&sparams=clen%2Cdur%2Cgcr%2Cgir%2Cid%2Cip%2Cipbits%2Citag%2Ckeepalive%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cnh%2Cpl%2Crequiressl%2Csource%2Cupn%2Cexpire&mt=1439925950&ms=au&requiressl=yes&ip=54.235.33.208&mn=sn-p5qlsnsk&mm=31&pl=19&id=o-ADNr2r2lZnlSaVdLwqofu7fzhvEEBnkTIo5OGfEkyz3d&gcr=us&fexp=9407992%2C9408513%2C9408710%2C9409069%2C9415052%2C9415365%2C9415435%2C9415485%2C9416023%2C9416126%2C9416337%2C9416520%2C9417707%2C9418153%2C9418702%2C9418958%2C9419042%2C9419311&expire=1439947944&dur=323.120&ipbits=0&sver=3&nh=IgpwcjAxLmlhZDI2KgkxMjcuMC4wLjE&key=yt5&gir=yes&mime=video%2Fmp4&itag=137&clen=69775704&source=youtube&upn=tQryq51x7hA&lmt=1434109100969571&keepalive=yes&signature=83E8CB9DC435ED25553AEBB23B7CD32470508AFE.5776531D55F224CCC4EFCE86C22D4451AC5970AE&ratebypass=yes'
ERROR: unable to download video data: HTTP Error 403: Forbidden
Traceback (most recent call last):
  File "./youtube-dl/youtube_dl/YoutubeDL.py", line 1579, in process_info
    partial_success = dl(fname, new_info)
  File "./youtube-dl/youtube_dl/YoutubeDL.py", line 1527, in dl
    return fd.download(name, info)
  File "./youtube-dl/youtube_dl/downloader/common.py", line 342, in download
    return self.real_download(filename, info_dict)
  File "./youtube-dl/youtube_dl/downloader/http.py", line 60, in real_download
    data = self.ydl.urlopen(request)
  File "./youtube-dl/youtube_dl/YoutubeDL.py", line 1860, in urlopen
    return self._opener.open(req, timeout=self._socket_timeout)
  File "/usr/lib/python2.7/urllib2.py", line 406, in open
    response = meth(req, response)
  File "/usr/lib/python2.7/urllib2.py", line 519, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/lib/python2.7/urllib2.py", line 444, in error
    return self._call_chain(*args)
  File "/usr/lib/python2.7/urllib2.py", line 378, in _call_chain
    result = func(*args)
  File "/usr/lib/python2.7/urllib2.py", line 527, in http_error_default
    raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
HTTPError: HTTP Error 403: Forbidden```
@dstftw
Copy link
Collaborator

@dstftw dstftw commented Aug 18, 2015

Duplicate of #6451. Remove cache with youtube-dl --rm-cache-dir on behalf of www-data.

@dstftw dstftw closed this Aug 18, 2015
@UltimateBrent
Copy link
Author

@UltimateBrent UltimateBrent commented Aug 18, 2015

Thanks!

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.