HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Users are unable to upload files

Using Vanilla 3.3

My users are unable to upload or attach files. (I am, when I'm logged into my admin user.)

Here's everything I've tried:

  • Switch themes.
  • Drag an image into the Rich Editor. It gives me this error: "Request failed with status code 403".
  • Change the permissions for the cache, config and upload folders to 777, making them writable.
  • Add these lines to my config.php:
$Configuration['Garden']['AllowFileUploads'] = true;
$Configuration['EnabledPlugins']['FileUpload'] = true;
  • In phpMyAdmin, change all the "0"s under Garden.Uploads.Add to "1"s in GDN_Permission.

None of it works.

Any suggestions?

Tagged:

Comments

  • Also, when I try to enable the Advanced Editor, it give me an error:

    Data truncated for column 'Plugins.Attachments.Upload.

  • I found in another thread that there is supposed to be an "Uploads" permission under Roles & Permissions.

    I don't have that:

    Does anyone know how to enable it?

  • It may be related to the plugin.

    I was able to get the Advanced Editor plugin to work, which shows the upload image button for regular users - but it won't allow them to upload files, producing the error "Unable to upload".

  • KasparKaspar Moderator

    Do you have this in conf/config.php


    $Configuration['ImageUpload']['Limits']['Enabled'] = true;

  • KasparKaspar Moderator

    You can find other parameters in

    Conf/config-defaults.php


    Do not edit that file but add parameters to conf/config.php instead

  • KasparKaspar Moderator

    Earlier I only saw your posts from today not your initial posts.

    I also pasted the wrong config line, sorry.

    I see you already have added the one I intended.


    Do you have pretty urls enabled for your forum?

    Covered to some extend here


    Could you setup up a test forum, cleaninstalled, to see if uploads work in that.


    Something here might help


  • manticore789manticore789 Australia New

    Why don't you wind back your system to a backup from a few days earlier. That always works for me.

  • MrCaspanMrCaspan
    edited May 2020

    My guess it is a pretty URL thing.. I have no clue why the application does not add this line to the config by default when installed if it's required to make it function. Its like right out the door break the app unless you have read the forums.....

    Try adding the line below to your conf/config.php file anywhere

    $Configuration['Garden']['RewriteUrls'] = true;
    


    Ottens
  • R_JR_J Ex-Fanboy Munich Admin

    As far as I know, you can configure if uploads are allowed in a category setting. So you might need to edit a category and search for upload permissions there

  • OttensOttens New
    edited May 2020

    Thank you all for trying to help!

    @R_J, I don't see category-specific upload permissions either.

  • OttensOttens New
    edited May 2020

    @MrCaspan, added that line to config.php, but no change. Members still get this error when they try to upload a file:


  • 403 FORBIDDEN

    The server understood the request but refuses to authorize it.

    A server that wishes to make public why the request has been forbidden can describe that reason in the response payload (if any).


    This seems like a permission error

  • your upload folder you said is chmod to 777 .. what user is Apache running as and what permissions does the Apache user have on the root folder of the site and your temp directory.. Most files are uploaded to a temp directory then get moved to the upload folder.

  • Couple more things I tried:

    • Delete the uploads folder. When I upload an image using my admin user, it recreates the folder.
    • Create another admin user. It can't upload files either.

    That led me to discover that in GDN_User there's an "Admin" column where only my original admin has a "1" and everyone else - including the new admin user I created - "0".

    I suspect this might be related to the fact that I imported an old punBB forum and this screwed up the permissions somehow.

  • KasparKaspar Moderator
    edited May 2020

    "1" means it is superadmin.


    Have no suggestion on how to fix it.

    @R_J ?

  • I got it to work! Here's how:

    In GDN_Permissions, find the column Garden.Uploads.Add and change values for:

    • Role ID 0 to "3"
    • Role IDs 8, 16 and 32 to "1"
  • Hi @Ottens, I have the same problem you had. I can't enable the Advanced Editor (Data truncated for column 'Plugins.Attachments.Upload.Allow' at row 1). How do you manage to get it work ? I imported an old punBB forum too.

    I try to update Garden.Uploads.Add values (update GDN_Permission set Garden.Uploads.Add = 1 where RoleID = 5;) without success : ERROR 1054 (42S22): Unknown column 'Garden.Uploads.Add' in 'field list'. But when i try this desc GDN_Permission this column is in the list displayed.

Sign In or Register to comment.