attachment fail - path issue? error "/usr/bin/file not found"

edited October 2011 in General
I installed statusnet at free-haven.org/status/
When anyone tries to attach a file, send a photo, etc., I get this error:

"Can't find file command "/usr/bin/file"" is not a supported file type on this server. Try using another can't find file command " format.

free-haven.org/status/file is set for 755 permissions, but, see...it's not /usr/bin/file, and I think this is the issue. The path is wrong. But I don't know where to alter this parameters. It's definitely not in config.php

Anyone?

Comments

  • I set the path in config.php, and now it uploads without error, but the link it posts doesn't work. Clicking on it brings up a download dialog for some "bin file", and there are no previews of photos, etc.
  • Okay, I got an attachment to work, but it doesn't preview the image, and the URL is weird (confuses FF, but chromium handled it, allowed me to view image).
    The following url is to a picture of Che Guevarra
    http://www.free-haven.org/status/file/tonybaldwin-20111010T064901-8j7uyqt.cantfindfilecommandusrbinfile

    Why is this .cantfindfilecommandusrbinfile at the end of the url, like a file extension?
    Is it because there is not "file" command on my server? (godaddy.com..no which, no file, lotso bash commands do not work...thank god they have vim, at least!)
  • I've determined that the real problem is that somewhere it's trying to use file (/usr/bin/file) to determine what the file is (my first clue was "cantifindfilecommandusrbinfile as the extension...brilliant, yes? only took me two days to figure that out...), but for no reason that makes sense to anyone with two brain cells, there is no /usr/bin/file on the godaddy's retarded CentOS shared server (wtf?! why no full gnu tools? morons)...

    So, if I could just find where it's trying to use file, I suppose I could alter it to just read the file extension, or something (nevermind whatever possible dangers there may be in trusting a file extension on files uploaded by users..).
    But I can't find where it's doing that...
    I have looked at ../status/actions/attachment.php, file.php, getfile.php, attachment_thumbnail.php, attachment_ajax.php...
    nothing...

    Anyone?
  • me too .. anyone ?
  • Did you figure this out?
  • Well, I moved to linode, where I have /usr/bin/file.
    There was nothing I could do with the crappy GoDaddy CentOS server, and they support SOPA, anyway. ;)
  • I am having this issue as well with my Windows server.
  • Probably because windows doesn't have /usr/bin/file

    My issue was hosting on GoDaddy's crappy, crippled CentOS server that was missing file and other regular UNIX tools that nobody in their right mind would exclude from any machine. I solved it by moving to linode and using a Debian server.

    I haven't even touched a windows system since about 2000, so the only solution I could recommend to you is "use a real (ie linux, and not godaddy) server".

    Sorry.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Google Sign In with OpenID