Groups File Access

Groups File Access is a WordPress plugin that allows to provide file download links for authorized users. Access to files is restricted to users by their group membership.

Among the many possible use cases covered by this plugin, the most prominent are:

  • Provide file downloads for Premium Members.
  • Allow registered users to download files from your site.


Features

  • Restrict access to downloads to authorized user groups
  • Full multisite support (WordPress network installations)
  • File management area
  • Upload files via FTP and bulk import
  • File access notifications (customizable)
  • Flexible shortcodes: [groups_can_access_file], [groups_can_not_access_file], [groups_file_info], [groups_file_url], [groups_file_link], [groups_file_visibility], [groups_file_access_service_key]
  • Limited or unlimited number of downloads per user
  • Key authentication file access


Access to files is restricted by group membership. To be able to download a file, a user must be a member of a group that is assigned to the file. If an access limit has been set for the file, the user must also have accessed (downloaded) the file fewer times than the file’s access limit.

If you want to restrict access to a file to users that belong to a certain group, create the group, add the desired users to the group and assign the group to the files that the group should be able to access. More than one group can be assigned to a file.

Shortcodes are used on posts or pages to render links to files, provide information about files and conditionally show content to users depending on whether they are allowed to access a file.

For example, the [groups_file_link group="Premium"] shortcode renders links to files that members of the Premium group can click to download the files.

Download

Get the plugin here: Groups File Access

Documentation


Online Demo

226 comments

  • I want to give individual clients/users access to design files that I would upload. Would I need to create a group for every client? Is there a better way to handle this?

    • Creating a group for each client would be the appropriate way to do this. Let’s say ACME Corp is a client of yours and two people in their organization need to have access to the files. Create a group for that client, create a user account for each of them and assign them to that group.

  • How would I construct a shortcode to show ALL files the user has access to? This would allow a user to go to a page and access any of the files they are allowed. The example codes limit the listing to individual file IDs or groups.

  • Hi I am creating a membership site for my appointment setters/sales consultants.

    I want to create per-recorded webinars loaded in their marketing resources page so they can drive traffic to these links for different services, seo, mobile, text marketing etc. After the customer watches the video if they want to purchase the service then they can click the buy button, and the sales person gets the commission.

    I am confused on how to do that.
    I did watch the video on banners.
    Please help!
    Thx
    Armando

  • What I need to do should be simple, but it won’t work.
    I have a library of user guides for business telephone systems.
    I want to assign users to groups based on their system type and display only the relevant guides on the user guide page. There will be about 50 different groups to start with and I will be adding to it on an ongoing basis and I don’t want to have to update the shortcodes on the download page every time I add a group.
    The idea is to have the user go to a single page and only see the documents that are relevant to them without having to know what make, model and version of system they have.
    What I need the shortcodes to do for me is something like this:
    [groups_non_member group="{any/all groups}"]
    Please log in
    You must be a registered member to access the files available for download.
    [/groups_non_member]

    [groups_member group="{any/all groups}"]
    Downloads:
    [groups_file_link group="{any/all groups}" description="yes"]
    [/groups_member]

    I don’t know if I am explaining this very well but it is very frustrating not to be able to figure out how to do something that should be so simple.

  • When I use description=”yes” in the shortcode the bullet shows up on the line above the file information. When I do not use description=”yes” the bullet lines up fine.

  • Jaybe

    I would like more information about how, specifically and technically, files and assets are secured from direct access should someone discover the source URL/location.

    Does GFA handle managing that aspect?

    What about access keys, unique identifiers, etc. to track and ensure intended recipients and deter sharing, etc.?

    Thank you.

    • GFA serves files through its own handler. If you try to access a protected file without the proper credentials, you will get a 403 Forbidden. Users access files through their account, i.e. they have to be logged in to access a file.

      • Jaybe

        Are the actual source locations of the files protected to keep people from identifying where the files live and directly linking/accessing?

        Or would something like that be done with access rules and restrictions, allowing only localhost or the likes to access the files via the GFA handler?

        • These are protected, the links that allow to download files use a file identifier passed to a URL parameter.

          • jaybe

            I am looking to understand /how/ they are protected?

            Are they protected via .htaccess (for Apache) by the web server?

            What about users of Nginx, for example?

            How are the absolute, static links to the file/folder protected?

            What I am getting at is, … is there documentation explaining how to protect the contents of the secured directory and its files for Nginx, Apcache, etc.?

            Thanks again!

            • For Apache an .htaccess file is created that contains deny from all, where GFA uses its own handler to decide whether the request for a file should be granted or not.

              I’m not really Nginx proficient, but the equivalent for the .htaccess should do it.

              Thanks for mentioning this by the way, I think this should be added to the documentation (taken note to do that).

  • Jason

    I currently use your wonderful Groups and Groups for WooCommerce and want to restrict access to the downloaded products we are selling. It appears this will server my purposes just find for downloads, but I have a couple of questions.
    Can this be used with external files?
    Can this be used for progressive download files?
    I would like to host my files on S3 and embed my audio and video players directly on the page but restrict access to the source.

    Thanks

    • Hey Jason,

      It can’t be used with external files, the plugin handles downloads for files it controls on the server so for your case it wouldn’t really be an option … but the idea of it acting as a proxy to external files isn’t bad at all :)

  • david

    So can I use the members plugin by justin tadlock to create my group permissions? Or can I use the buddypress groups that I already have?

    I’d hate to have to install a 3rd software group system just to add in this ability. Does your plugin tie into any of the other group systems available for WordPress. (usergrups, roles, buddypress, etc)

    • It’s really an extension to Groups based on the framework it provides to build solutions like this one. I created Groups because I wasn’t satisfied with the way other plugins were designed and/or implemented, so it doesn’t make much sense to me to try to cover other solutions with extensions built on Groups.

  • Brenda

    I have customers that are retail and wholesale customers – I do not want my retail customers to see my wholesalers prices. Will this plugin allow me to restrict access to my prices? Set up how? Sorry a newbie here.

    • Hi Brenda,
      Did you get an answer to your question?
      I am looking for the same thing!
      Sarah

      • GFA is not suitable for that, it restricts access to . Groups is used to restrict access to content and pages, with its access restriction options you can restrict access to pages containing your prices to authorized users. You can also use it to restrict access to certain product pages if that’s what you’re looking for.

  • Erbol-uz

    HI, I am able see log file which user and how many time download any files?

    • You can get notifications when users access files, do you mean per-user stats on the back end or a shortcode? That’s not available in the current version (the data to do it is stored though) but I’m adding it as a good idea to the feature requests.

  • Linn

    Two questions:

    - Is there any way to insert line breaks or paragraph tags into the file description?
    - I’m using the shortcode to display all files a user has access to on a single page ([groups_file_link group="Premium"]). Can I sort this file list somehow? They seem to be ordered by ID with the lowest number at the bottom of the list currently. I’d love to be able to at least switch that order to have the lowest ID first, or even sort by title or filename.

    Thanks!

    • Linn

      Scratch the bit about sorting the file list – I think I’ve figured that out. Would still like to have linebreaks in file descriptions though :)

      • Ah, good :) Let me know if you think the other shortcode would be helpful for you, otherwise we can add an option to deactivate the filter on this one as well. An updated release is pending so it could be added then.

        • Linn

          Being able to use filter=”none” on [groups_file_link] would be fantastic! Since – correct me if I’m wrong – wouldn’t using the [groups_file_info] shortcode require a lot more work than [groups_file_link]? As in, the latter lists all of the files available to a specific user, whereas the former you’d have to use for specific files repeatedly to list all available files, right?

    • When you use the [groups_file_link] shortcode, it will filter these out. But you can use the [groups_file_info] short code indicating filter=”none”.
      Currently the list is ordered by name in ascending order, the shortcode could use some additional options for sorting the list of files though.

  • Luca

    Hi, I’ve successfully installed this plugin!

    Now I need to show all links of files that user can download.
    For example, something like that [groups_file_link group="ALL GROUPS"].
    This should render all links to files that members has access to.

    Thanks,
    Luca

    • Hi Luca,

      For example, you would use [groups_file_link group="Registered"] for all files that registered users can access. This will include all files in Groups > Files that have been added to the Registered group. Of course you can also do the same for different groups. You cannot use this to show files for all groups yet, you would have to place one for each of the groups. The capability to show files for all groups is going to be added, also see the call for feature requests for other features that will be available.

      Thanks for using the plugin :)

      Cheers

  • Beth

    I have installed and activated the Groups and Groups File Access plugins. I am able to go to the File page and upload a file, and I have verified via FTP that the files does upload… but it cannot be viewed on the “File’ Page. Any idea of why and how to remedy this. I do have the latest version of wordpress… I am using the u-design theme… and am browsing on a Mac via Firefox or Safari.

    • Beth

      problem = slideshow plugin.

    • I assume you mean the Groups > Files section in the back end. Are you saying after you have added a new file in that section (with the New File button on top) you cannot see it in the list of files? If that’s the case, do you have any filters set? The filter settings are ‘sticky’ – i.e. if you filter for example by Name and there is no result, then leave the page and come back, the filter will still be set.

  • Hi Kento!
    Just bought the groupsfileaccess plugin at codecanyon, and I have a request:
    Because I need to upload huge files to use with the plugin, it’s easier to do so by FTP transfer.
    Can you add the option to simply set the full file path manually ? (overriding the upload function from the admin panel?)

    Best regards.
    Carlos

  • Virgo

    If I click the upload button, is it possible to link large files uploaded via ftp? WordPress Standard Upload windows do that, but it’s not shonw in your screenshots, thanks.

    • An option to scan for new files would be great to have, this would allow you to upload files directly via FTP and then have the plugin scan for new files and include them automatically.

  • Ian

    Wow this looks like it’s the answer to my problems. Before i go to far I just wanted to check my thinking is right.

    Example: A company ABC has say 10 Departments. Each Department has a Director, Manager, Staff. Would the set-up be as follows:-

    ABC = Parent
    Department 1 = Child of ABC
    Director of Department 1 = Child of Department 1
    Manager of Department 1 = Child of Director of Department 1
    Staff of Department 1 = Child of Manager of Department 1

    Then so on for Department 2 etc..

    OR would it be that Director/Manager/Staff are all Child of Department 1

    Also, would ABC be able to post content that was visible to ALL Directors of ALL Departments, or ALL Staff of ALL Departments, if so how?

    • I assume this question is related to Groups in terms of how to set it up, but you want to grant access to files depending on where in a hierarchy a member is? You can set up pretty much any hierarchy, just like the one you are explaining. Just note that the actual user accounts would be group members, as you would assign the user account to one or more groups.

  • Ian

    Sorry, just had another thought pop into my head, following on from my last question;

    If I had the company then departments set up could I just designate the role of Director to a user and then assign them to a Department so that they could only see that Department? That would save having to add Director of Department 1, 2, 3 etc

  • Jose

    Hi,

    first at all, congratulations for your very usefull group plugin.

    I use “Groups File Access” plugin for manage some private PDF files.

    The client needs that users could open these files in a new tab (target=”_blank”), not download it.

    I tried with the following link but it doesn’t work:

    View pdf

    It is possible???

    Thanks in advance.

    • antonio

      Hi Jose,
      I can see the link, please use pastebin.com, this might be useful for others as well. (the code was stripped out to your comment).

      cheers

  • Hello,
    I’d like to know if it is possible to notify a group when a file deposited with it for?
    and I’d like to know if the next version will download statistics?

    If the modules are top

    cordially

    • antonio

      Hi Romain,
      currently no such option. You can do it manually with a newsletter plugin.

      cheers

      • damage, otherwise your solution is perfect. Too bad we can notify the administrator but not automatically groups

        • Actually the idea sounds good to me, this could certainly be added, i.e. notify group members when a new file has been made available for them, I can think of good use cases for that. Thanks for the suggestion Romain, I’ve added this to the list of feature requests to be implemented.

  • Makoto Morikawa

    File size to be uploaded has grown to 5MB, Is there a way to upload a file of 20MB?

  • Seems there is a UTF-8 problem when entering file descriptions. Works on file name text field.

  • Makoto Morikawa

    Thanks for the great plugin.
    If you want to display by uploading a PDF file, but I’d like to display inline in a browser, there is no way I would be?

  • Beth

    How secure is this program? I have a members only section for a non profit company, and need to ensure that their files remain secure… and only viewable by them when they are signed in.

    • It is as secure as your server is – GFA restricts access to the files and only authorized members will be able to access them. As long as your server is secured, GFA will be able to protect them.

  • Gareth

    Hi there – product looks great – I am looking something that will also allow us to track how many times a specific user downloads specific files

    Would this plugin have this capability – or is there anyway to do this in WordPress???

    Thanks! :)

  • I’m hopeful your plugin can resolve my problem.

    I have a public site with a Members Only section. Currently my user registration/login and content permissions (page/post access based on Roles) is handled by the Absolute Privacy Plugin. I naively thought the page/post access restriction covered all files uploaded to or linked to the page, but I recently learned that those files (PDFs, JPEGs, MSOffice docs, etc.) are accessible by anyone through their direct URLs (typed in or located by search engine).

    I understand your plugin works based on Groups and not Roles so, if I add all of my registered users to a group, will your plugin enable me restrict access to the files on my restricted pages so that only logged in group members can view and/or download them? Also, will I have to re-upload the dozens of files already on the site that need to be restricted or can the restriction be added to existing Media Library files?

    • antonio

      Hi,
      yes, this plugin is based in groups, and the files are protected from access direct.
      Sorry, but you need to re-uploads the files, and then assign to one group (or more), and add the users to respective group/s.
      It restricts all file types.

      cheers

  • fulla

    Can I show the file to download in limited time and after that it display

    • antonio

      Hi,
      you can control how many times you can download the files (in Groups->Files, Max# field)
      But you can control the period time.
      cheers

  • Max

    Hello,

    I purchased your plugin, and I’m having a serious issue:
    When an authorised user downloads a pdf, he gets a “Corrupted pdf” message when he tries to open it.
    Can you help?
    Thanks a lot!

    • Hi Max,

      Can you provide a link and user access to the site to have a look please?

      • Max

        Hi Kento,

        Thanks for your reply.
        On what email can I send you the link and access info?

        • Sure :) Please send it to support at itthinx dot com.

          • Max

            Hi,

            I sent you the website info the 31st of may and didn’t get a response from you. Can you tell me what’s wrong with the plugin?
            Thanks!

            • Hi Max,

              Sorry I must have missed that, I just tried to log in with the details but login is rejected. I also created an account but it doesn’t give access to the documents obviously, can you please send the current password or grant access to the itthinx user?

          • Max

            Could you try to connect again? It should work now…

            • Got it, thanks. I’ve managed to get the file, but it is effectively ‘corrupted’ because of the following Warning which appears in the file that is downloaded (quoting the message without the tags):

              Warning: set_time_limit() has been disabled for security reasons in /home/www/91018f06866fdd3615e609e7ed630184/web/wp-content/plugins/groups-file-access/lib/file/class-gfa-file-renderer.php on line 42

              After that, the actual PDF starts.

              Solutions:
              - As suggested e.g. here, try setting safe_mode=off in php.ini, or
              - as a temporary quick fix, comment line 42 in wp-content/plugins/groups-file-access/lib/file/class-gfa-file-renderer.php.

              In any case, doing the check for safe_mode would be a good idea to add before line 42, I’ll add that and release an update.

              Thanks for your patience and for reporting the issue you had, helps to make it better! :)

            • Seems to work ok now, I can see the PDF correctly.

        • Max

          Thank you so much!
          The fix did it! It’s really nice to see this nice plugin work like it should!
          Thanks again!

    • max

      Strange, I thought I had sent a reply… Can’t see it anymore

      It works now, the fix did the trick. thanks a lot for your help!

  • Hi there!

    Just about to get your plugins but need to know first if it is possible to assign a single file to be accesible to many groups, so I don’t have to upload a file per group… this is a mandatory requirement from our client.

    What they want is to share file1.pdf to group1 and group2 but file2.pdf only to group2…

    Cheers!

  • What I am trying to do is create a portion of my website where I sell image files to one group, but give those files away for free to another group. Would this plugin work for that? I have been banging my head against a wall for the entire day trying to find a good plugin for this. I have temporarily decided to use woocommerce and the groups plugin to create these different groups, but hoping that this plugin will work for the final peice of the puzzle.

    • Hi Mike,

      Yes that would work. Assuming you have two groups, Premium and Freebies, Premium pays to get access to the images, Freebies doesn’t but can access those same images as well. You would assign the files they should be allowed to access to both groups … voilà ;)

  • I just want registered users to be able to see products in cart so how do i make registered users a group?

    • antonio

      Hi,
      you can use [groups_member] shortcode in your cart page. For example with woocommerce:

      [groups_member group="Gold"]
      [woocommerce_cart]
      [/groups_member]

      cheers

      • ok i got that part – and i have a group called insiders which is my gold however it has no capabilities. capabilities seem to be more backend things …then view/checkout product in cart. help

        and then the options – how does that work -

        • antonio

          Hi,
          you can create a capability “isInsider”, and assign it to group “Insiders”.
          and restrict all pages related to the shopping cart (cart, checkout, …) to this capability.
          cheers

          • so i created the capabiltiy but it just says description not any restriction – what am i doing wrong – thought i’d then go to options but no way to link capability and options

            • antonio

              Hi,
              you must:
              1.- create the capability
              2.- Assign to a group (in Groups->Groups have the buttons above the table).
              3.- In Groups->Options->Capabilities must select the new capability.
              4.- In a post/page, in right sidebar you can select the necessary capabilities.
              cheers

          • totally missed the dropdown in 2. Thanks. alright now re 3 .- In Groups->Options->Capabilities must select the new capability – do access restrictions all get checked? i selected the capability insiders under capabilites but also have checks under the 4 user types in persmissions. Right or wrong?

            • You normally wouldn’t change the permissions on that screen unless you want any of the roles to have certain management capabilities related to Groups on the back end. The normal thing is to have them checked for the Administrator role and none checked for any of the other roles.

        • something still not adding up here …how do i take this off forums and get individual support

          • It seems your questions are more related to the Groups plugin itself. You should post your questions on the Groups plugin page unless they are directly related to GFA.

  • Hi..
    I’m using your plugin which I like very well.
    I’m moving a lot of files from one place to this new one I’m making with Groups and Groups File Access. Is there a way to copy bunch of files into one group instead of one at a time?
    Thanks,
    Anna

  • Michel

    I recently purchased the Groups File Access along with Groups and WooCommerce for replacing our new IT Training Video website.

    The files I need to add are much larger than 8MB. Heck I have PDFs that are larger than 8MB. How can I upload larger files into WordPress from the Group File Access option?

    Thanks!

    Michel

    • Michel

      Nevermind, I did an unrelated google search and found out that I needed to add something like this in my PHP.ini file:

      post_max_size = 150M

      Note: I would recommend putting this into your documentation for future users for how they can upload larger files.

      Michel

      • Hi Michel,

        There are two more that you should take into account: upload_max_filesize and max_execution_time. For example, add these to your php.ini:

        upload_max_filesize = 192M
        post_max_size = 193M
        max_execution_time = 300

        See also this post on WordPress hosting requirements.

        You’re right, it would be a good idea to add this in the documentation. Doing it right now, thanks!

        • Michel

          Thanks for the follow-up kento.

          Yeah, I had the others in my PHP.ini file except for the execution_time value, which I had added now. Thanks for the fast reply and the help.

          Michel

  • Thanks – another question :D
    Once I have uploaded files into groups, can I not link to them in the pages by using wp insert media?

    I need to list links to files on a page, where 5 links should appear under a headline
    F.e.

    Meeting june 2013
    - Program
    - Slides
    - etcc.

    Meeting may 2013
    - Program
    - Slides
    - etcc.

    What is the best way to do this… ?
    Anna

    • Hi Anna,

      You would rather use the [groups_file_link] shortcode (see Shortcodes in the documentation).

      For the cases you mentioned, I assume you have different groups. You can either link to specific files using the file_id parameter, or you can render links for the group using the group attribute specifying the group for which file links should be rendered.

      Cheers

  • Michel

    Hi,

    I’m having problems adding Files that are ~102MB even though it says “You can upload files up to 192 MB”. It doesn’t give me an error or provide any message. For example, when I click on “New File” and enter my description then I click on “Add”. From there it spins (assuming its uploading the file) for ~5-8 minutes then stops. I check the file list and it has not been uploaded. What do I need to do to solve this?

    I think it will be more efficient to upload all files via FTP which is faster then specify the file location. How can I do that without trying to upload through WordPress?

    Thanks!

    Michel

    • antonio

      Hi,
      maybe is max_input_time problem.
      One way to upload files via FTP, is creating a false file with the same name that the file you want upload (for example renaming a readme.txt file), and upload this throws Groups->Files.
      After you overwrite this file with the real file using ftp (in wp-content/uploads/groups-files-access).
      cheers

  • John

    Ahoy! Your plugin seems to be just what I need. I only have one question before I purchase it.

    I see where you can be notified via email when a document is viewed, and it tells you which viewer downloaded the file. Is that information stored anywhere? I’d like to be able to generate a report every month that lists how many times each user has viewed each file.

    Thank you!

    John

    • Hi John,

      It doesn’t store that information, it just sends out the notification when a file has been accessed. Close, but not exactly what you’re looking for ;) I’m adding it to the list of suggested features though.

      Cheers

  • I updated my site to VPS and now all my download links are broken. The file structure hasn’t changed, what might cause that do you think?

    • Hi Doug,

      The documentation has been updated with instructions on how to update so that new paths are taken into account. See the section Moving to another Server on the Setup documentation page.

      If file paths haven’t changed or you still have problems after the update, you can also create an admin account for us to have a look on the site directly (create one for support at itthinx dot com please).

      • Doug

        I figured it out. For some reason, the plugin saves filenames to the database with hyphens rather than underscores. I changed all underscores in my files to hyphens with a batch name changer and reuploaded them to the file. Problem solved.

        Also, there is a bug with the Export function. If you export then immediately import that file, it will delete all files in the folder without warning.

        Thanks for the help.

        • Many thanks for reporting the bug Doug, you’re right, I’ve just tested it (export then import => files deleted). A really silly but important bug, I’ve just submitted the fixed version to CodeCanyon.

          Regarding the changes in filenames, when you manually upload files it will modify the filenames to a uniform pattern, I think that’s what you saw there.

          I’m glad you got it working now, also the suggestion for the bulk import was really welcome, I’ve been missing that myself. If you can take the time to rate the plugin, I’d appreciate it :)

  • Erik

    Instead of uploaded files, could I choose what links to display based on group membership? A person who is in the Project Admin group can see one link to a project management site, but others cannot?

  • Clay

    Hi Kento, I’m using woocommerce to sell digital products. I would like to offer an option for my customers to purchase a membership so they can download any of the products on the website. Will the Groups plugin allow me to do this if so how?

    • Hi Clay,

      I assume you provide digital products which you would give access through GFA to members. Given that you use WooCommerce, the way you could approach it would be to use WooCommerce Subscriptions to sell the memberships along with Groups WooCommerce which assigns paying members to a specific group. This group could then be used to grant access to the files through GFA.

      If you do not require subscriptions (renewing membership through recurring payments), Groups WooCommerce alone would be sufficient as it allows you to sell membership based on a single payment for a limited or an unlimited amount of time.

      • clementp

        Hi Kento,

        I would like to the same thing that Clay. But I’m not sure to understand how we can give acess to all digital products to a customer. Firts, we need to assign members to a group, right.

        But ater ? We need to add GFA shortcodes in description product ?
        Or can we remplace “add to cart” button directly by files ?

        Regards.

  • SugarMags

    I have searched the docs and comments, haven’t yet found a reference to being able to categorize file downloads; I apologize if I’ve missed it, but would like to know before spending money :)

    Here is what I want to accomplish:

    I have four groups: Open, Basic, Standard, Premium – with increasing access to file downloads, including the files allowed for lesser groups.

    The files themselves are organized into categories and subcategories — about 5 deep, at present.

    In the examples I have seen on your site, downloadable files are displayed in a paragraph format. However, I want users to see the files in a categorized list, perhaps in a table-style layout, one item per line:

    Category:Subcategory

    File Name | Description | File Size | File Type
    File Name | Description | File Size | File Type
    File Name | Description | File Size | File Type

    Category:Subcategory:Subcategory2

    File Name | Description | File Size | File Type
    File Name | Description | File Size | File Type
    File Name | Description | File Size | File Type

    alternatively, a two-line-per-item display:

    File Name | File Type | File Size
    Description………………….

    File Name | File Type | File Size
    Description………………….

    File Name | File Type | File Size
    Description………………….

    Is this type of layout possible?

    Also, I would like the user to be able to drill down to a subcategory, and show only the files in that subcategory.

    Is this the right plugin to use, or should I be looking for something else? Thanks in advance.

    • Based on what you describe, if you would use GFA for this, I think you would need to customize some parts so that you can display things exactly the way you want it. The shortcodes it provides are quite flexible, but they wouldn’t allow you to display things exactly as you describe in the examples.

      Regarding the file groups, that would be easy because you can grant access to any file to one or more groups.

  • Jim Schofield

    I’ve purchased the single user licence to see if I can achieve what I want. I have a WordPress site that will be issuing course materials to delegates so I need to set up closed user groups that will enable them to log in and have access to these resources. They would not normally be WordPress users but If I need to set them up it’s not a problem but I wouldn’t want them to have access to the dashboard, just use their log in details for verification to render the page with access to the materials.

  • Yo Treves

    I have a Download site, want to implement access Premium but until now researched several plugins that manages the link and not the user. I want to manage the file will be downloaded and not the user. I want to host the file using either the plugin or not, what I want is that only the user that will have access to premium link, and if it passes it link to another user, that user can not download the file. In short I want a plugin that preteja the file will be downloaded so that the link will not be shared. And that is only possible if the user is downloading premium if he get the premium link and try to access another pc or browser, the link is blocked. And there can help me or indicate a plugin for worpress?

    Att Yo Treves

    • GFA requires the user who wants to download a file through the link to be authorized, i.e. even if you have the link, you still need to log in to be able to download the file. Sounds like that’s what you want?

  • Jussi

    I have a question on Groups and Groups File Access. I tried to find the solution from documentation without success.

    Let’s say I have GROUP_A as a parent group and GROUP_B as its child group. Then I have a user X that belongs to GROUP_A. I have added files through Groups File Access which are all included in GROUP_B. In a page, I am trying to list all files that belongs to GROUP_B with shortcode [groups_file_link group="GROUP_B" description="yes"]. But when user X (logged in) opens the page, the files don’t get listed.

    Am I doing something wrong? Or is there something with group hierarchy I don’t understand? My idea is to list documents of different categories using child groups. And user does not have to belong all those groups but only to their parent group.

    • Hi Jussi, GFA doesn’t take the group hierarchy into account in its current version. But I’d be happy to add that capability, note taken and should be available with the next release. Meanwhile the following approach can yield the same result: assign GROUP_A and GROUP_B to the files; use the shortcode [groups_file_link group="GROUP_B"] to display the files related to GROUP_B. Users in GROUP_A will also be able to access the files. The only difference is that you need to specify the parent group as well for each file (not for the shortcode).

  • One234

    Hi,
    i am using wc groups and want to protect images in the wp-content dir. I will write “premium” articles including images. These images should only be accessable, if the user is a premium member. Can Groups-file-access protect these images even if a non-premium-member knows the url of the image?

    TYI

    • antonio

      Yes, you can use Groups File Access for this purpose.
      An example:

      This show the image if the user have the correct permissions.

  • Lariza

    Hi,

    I’d like to translate Groups File Access to my language but I didn’t find languages folder or instructions how to do it. Please tell me how to proceed.

    • Hi Lariza, it’s prepared for translation but needs to have the plugin text domain loaded. I’ll update the plugin to take that into account and add a language template. You will see the update in a few days when it’s released.

      Thanks for using the plugin, please rate it if you haven’t done so already :)

  • Jussi

    It would be nice to have also Group filter in the Files section to help managing a large amount of files. Thanks, Jussi

  • Emma

    I’m not currently able to upload files for this anymore. When I go to the group-admin-files page in the dashboard I get the following message at the top of the page:

    Warning: Missing argument 2 for wpdb::prepare(), called in /home/XXX/public_html/wp-content/plugins/groups-file-access/lib/admin/files.php on line 472 and defined in /home/XXX/public_html/wp-includes/wp-db.php on line 992

    can you assist?

    • Yes, please update the GFA plugin to the latest version. This is due to a version conflict that came up when that function was changed in WordPress quite a while ago.

  • Emma

    Just updated and I’m getting this message on the Files page:

    Fatal error: Call to undefined function mb_strlen() in /home/XXX/public_html/wp-content/plugins/groups-file-access/lib/admin/files.php on line 542

  • burlesque

    I sell custom virtual products using WooCommerce. The client downloads the product when it’s ready. I want to upload the product using GFA and notify the client with a link to the specific product as well as all products the client has purchased. I have Groups installed but not Groups for WooCommerce. (I’m hoping it’s not needed.) I assume I need a group for each client. Can I get away with a single downloads page, or do I need a separate page (or post) for each client? How to set up this use case? Thanks in advance for your help.

    • Based on what you describe I think you can handle this perfectly without the need to install anything else than Groups and GFA. I would create a group for each client as you suggest, and then you can set up a single downloads page where all files are listed for users. An example for that page would be:

      [groups_non_member group="Registered"]
      Please log in to access your files ...
      [/groups_non_member]
      [groups_member group="Registered"]
      [groups_file_link group="*" description="yes"]
      [/groups_member]

      I hope that helps you setting it up, thanks for using the plugins :)

  • Honza

    Hi Kento,
    use a plugin is quite simple, but I can not find how I can show the type and size of file.
    Thanks for the advice

    Sorry for my “english” :-)

    • Hi Honza,

      You can show the size using the show attribute for example like this:

      [groups_file_info file_id="7" show="size"]

      See more on the usage of the shortcode in the Shortcodes section of the plugin’s documentation.

      The plugin does not have a direct way to display the type of the file, that would have to be added manually to the info.

  • Hey there Kento

    I bought this plugin and I can successfully hide my files from unregistered users (wohoo!)

    BUT! There is one problem… I have a page with a video player (self hosted video player that I got from Origin Page Builder plugin). If I want to put videos on my page, I only have to put the video file url in that video box and everything is ok.

    But if I tried to use my video file url that I uploaded in GFA, I cannot play the video.. even though I’m in the correct group.

    Strange enough, some videos are playable.. and some are not. Does it have to do with sizes?

    If you want to see it for yourself, give me your email, and I will give you the access to my website so you can see it for yourself

    • Hi Akmal,

      That might be related to video type and how it’s played back (pre-loaded vs. streaming?) – yes I’d be interested to see that page, please send the link to support at itthinx dot com.

  • Hello

    Great plugin it works as expected, I only need to let certain group or groups upload files. There is a capabilitie groups_admin_groups which does that bit it gives to much priviliges. I just want certain users to be able to upload to groups I allow.

    As I see it it would require a new capabilite for example: groups_allow_file_management.

    Ziga

  • With groups_admin_options the user can see the Groups menu and he can see Files option but the File option says access denied.

    With this capabilite user can als access Groups/Options, wich I don’t want!

    Ziga

  • Shortcode is not working for me. Tell me if i am doing anything wrong. First the files are uploaded as access to “Premium” group in the way written in support document then tried to add it to my page with the ID using the shortcode
    [groups_can_access_file file_id="6"]This is an example[/groups_can_access_file].
    I was expecting that this should be visible to admin as well as premium but is not the case. Codes used for non registered are working fine

  • It is not working on woo theme “canvas”. I have tried it on another site on same server with rocket theme gantry default, there it worked correctly.

  • I want to allow some documents to be available publicly while restricting others to various groups.
    Restricting documents works as described but how do you recommend managing public documents? I have not found the information yet.

    Thanks

  • Moonworks

    Is there a way to automatically add a user to a group after filling ion a Gravity form?

    I have a form where bloggers sign up to post on a specific date for a book tour, and I’m wanting to add a new section where they can automatically download the files they need from the site.

    Each book tour is on a separate form, and the additional section is a drop-down menu where they select the post type (guest post, interview or book excerpt). What I need to do, is if they sign up for a guest post on a specific book tour, they will then be added to a group for that, and will get to see the downloads which are available to them for the guest post, and the same for each of the other options.

    You can see an example of the form here:

    http://darkscreambooktours.com/seacrest

    Thanks :)

    • Almost perfect timing since I’m working on an integration for Groups and Gravity Forms :) Hope to have it out around next week. If you’d like to try it out let me know and I’ll give you access to the plugin after the most important tests have been done.

      • Moonworks

        That sounds perfect.

        I’m working on a dev site redesigning my site, so would be happy to use it to beta test if you would like me to.

        As soon as we can get this working, we can make it easier for our bloggers :)

  • Clayton

    Is there a way to view a protected pdf or jpg in the browser rather than forcing a download?

    • The current implementation uses the header Content-Type: application/octet-stream. Quoting from RFC 1341 (see also RFC 1521) :

      … The primary subtype, “octet-stream”, is to be used in the case of uninterpreted binary data, in which case the simplest recommended action is to offer to write the information into a file for the user. …

      I think it would be a good idea to allow to determine which content type is to be indicated in the header, so that a more flexible behavior is allowed based on the file’s content type. Note that how the file is treated at the receiving end is still the downloading user’s decision based on preferences set in the browser.

      Long story short … expect an update for GFA where you can choose the content type :)

  • Pam

    We have a list of pdfs that should be restricted to a particular group. When I am uploading the file, “enforce access” in the media library, only provides the “groups_read_post” option. Other access options are not provided.
    With the “groups_read_post” option selected for a pdf, non-group members with the url are able to view the pdf.
    Questions:
    - Is there another way to restrict url access to the pdfs? or am I doing something wrong during the upload.
    - How can I get other options to appear in the “enforce access” area?
    Thank you.

    • If you are using GFA, you will find a dedicated section to files that are protected by the plugin: Groups > Files.

      For your PDF files, you would create a Group, let’s call it PDF. Then upload the files under Groups > Files and assign each file to the PDF group.

      Only users in the PDF group will be able to download the files, even if someone knows the URL to a file, it must still be accessed while being logged in as a user that belongs to the PDF group.

      Note that this is different from the files that you upload through WordPress’ normal Media section.

  • Pam

    I think that I have had an “Oh, That’s What They Meant” epiphany.
    - In Groups/Capabilities I have created a category for each group. i.e. group1_download, group2_download
    - In Groups/Options, added the new categories as category options for media
    - Assigned the capabilities to specific groups in Groups/Groups
    - Assigned users and capabilities to Groups in Users/Roles
    - Assigned the group capabilities (i.e. group1_download) in the access_restrictions section of files in the media library

    Server thinks that I am still logged in, so can’t test that this worked (yet)

    Is there anything that I should be adding to this process in order to restrict media urls to specific user access?

    • Yes that would allow to hide the attachment pages for the files, but if someone knows the file’s URL, the file would still be accessible. In many cases the approach you have explained would be ok, but if you really need to protect access to the URLs, then you should rather use the protection through Groups > Files.

  • I am building a new WordPress site using Groups and Groups File Access. My primary issue is that if I attempt to use the File Import features to bulk update the files names, descriptions and groups for the 800 files I have, it always fails.

    The initial FTP upload of the files and the export/import process to recognize them worked fine.
    Then I edited a new export file in a spreadsheet and saved it as tab delimited text file and tried to import it again, with my new descriptions.

    The message I always get is something like:

    1 file updated
    82 lines skipped

    I thought maybe a bad character could be blocking the import like a quote mark, so I find/replaced any quotes to remove them.

    If I use the manual add and edit features in Groups File Access it works fine. But I cannot manually edit that many files, so I really hope this will work.

    Advice or known issues?

  • groups-file-access plugin issue

    after all installation, I click on “Files” and submit the first document, afterwards it shows nothing inside the files tab, tried deactivate and reactive groups-file-access and click on “Files” tab again, still blank. WordPress version3.5.2

    thanks!

    • This sounds like something’s going wrong during the upload process. Can you please activate debugging (with at least WP_DEBUG and WP_DEBUG_LOG set to true) and try to upload it again, then check the contents of wp-content/debug.log and post here if there are any errors displayed. Please use Pastebin if the content of the file is large.

  • alex

    Hi Kento

    Your plugins look great – I wasn’t sure if GFA will quite do what I need though, so I thought I ask you here and on Code Canyon.

    I use Download Monitor (1) and it’s companion plugin, Page Add On (2), to easily create a series of download pages (3), each of which link to a download file (4) and list stats such as links to previous file versions and number of times downloaded. These pages use the custom post type dlm_download.

    I would like to restrict access to download pages (e.g. 3) and download file URLs (e.g. 4). I would like to do this by specifying groups users with different levels of access.

    Is this possible with Groups and Groups File Access? If not is it possible with some modifications by you? If so could you put together a quote for such modifications?

    I use the webserver nginx – does your plugin require apache?

    Thanks very much and apologies for the long comment.

    (1)
    http://wordpress.org/support/plugin/download-monitor
    https://github.com/mikejolley/download-monitor

    (2)
    https://github.com/mikejolley/download-monitor/wiki/Page-addon

    (3)
    http://vps01.gunyon.co.uk/downloads-area/download-info/pig/

    (4)
    http://vps01.gunyon.co.uk/download/pig/

  • Martin

    Hi,
    I have created an e-learning package using Articulate Storyline and I’d like to manage access to the course (stored on my WordPress site) using the plugins Groups and GFA. The whole course package consists of about 650 files in four folders and total size is about 20 MB. The course is launched when the user clicks a file in the package called “story.html”. Can I use GFA to launch the course and protect the material? Thanks.

    • Basically yes but note that there are a couple of important points to take into account:
      - GFA uses a single directory to store all files it protects. The files you have in different folders must be located in GFA’s folder, even if you upload the folder structure via FTP, it will only use the ones directly within its folder. If there are any duplicate filenames in the folders, you’ll need to rename them.
      - The links in your story.html must be the links that GFA produces for each file, you will have to edit the links for each file in the course so that it points to the right file handled by GFA.

      • Martin

        Hi Kento,
        Many thanks for your quick response. I’d like to try your suggestion but I don’t seem to have access to the GFA folder using my FTP software. I am using FireFTP and my site is hosted by WP Engine. Do you have any idea what the problem could be?

        • Hi Martin,

          The folder where the files are stored should appear in Groups > File Access under “Uploads” … “Files are uploaded to the …”

          That’s the directory where you should upload the files to, maybe you need to get specific credentials from WP Engine to access the folder via FTP?

  • Kento/Itthinx,

    I’m a developer working on a pro-bono website for a Scout Troop based in the Midwest. They want a file share/downloads system that allows them to control who can upload and download files based on groups. So far the free Groups plugin has been very helpful in allowing me to delegate permissions and control over various parts of their WP site. I had though the Groups File Access plugin would fit for their document management needs. However, your document, website, nor settings (that I can figure out) allows me to set what groups can upload files and which can’t.

    How do I go about restricting or adding a capability to allow different groups to upload files? Is it possible to set up a moderated upload queue for certain groups?

  • Jay

    Hi, I’m just setting up and using the shortcode [groups_file_link file_id="2"] and do not have anything showing up on my page. It may be a simple error but I’m having great difficulty figuring it out. Please help.

  • Hey Kento,

    I’m currently running a membership website using s2member and in the process of switching over to woocommerce with the groups and subscriptions plugins along with your groups and groups file access plugins. I seem to be up against a wall with an option I wish to continue offering that I can’t figure out how to do with your software…

    S2member allows me to grant access to specific files a specific number of times in a specified amount of time. In my case that means that my free registered members can download 1 item from my site per day (any item), 1st level paid memberships can download 25 items (again, any item–video, pdf, etc.), 2nd level paid = 25 items/day, and 3rd paid level = 50/day.

    I need a solution that can grant access to all items in my site, but at different volume levels per day based on membership level. What do I need to do or what script do I need to write to tell Groups/GFA to do this?

    Thanks for your help.

    • Hi there,

      So basically we’re looking at something that allows you to say, for example:

      Silver group – 25 downloads max
      Gold group – 25 downloads per day max
      Platinum group – 50 downloads per day max

      That can be done with a slight extension of the GFA plugin. We already have the possibility to limit the number of downloads per file, we just need to extend the entity that controls the downloads so that it takes into account per user and per period limits.

      I can see two options for you here, #1 is that we add this to the plugin, I can’t promise an exact schedule for that but I think this is a very worthy addition to the plugin and that it should be added, #2 is you hire someone to implement it and we provide an extension hook within GFA which can be used to control download access.

      Let me know what you think would be best for your case, I’m very happy to help with that.

  • Hi, bought this plugin, been using it with woocommerce subscriptions to get access to a subscribers page to download PDF newspapers.
    I would like to as well on the page be able to display the pdf in a viewer so they can read on the webpage as well as download. Have google docs viewer installed. It however cannot seem to get access to the file to display. Tried a few codes..

    [gview file="[groups_file_link file_id="69"]” width=”600px” save=”1″]
    [gview file="[groups_file_url file_id="69"]” width=”600px” save=”1″]

    Tried a link direct to the file, nothing displays, it says it cannot find source. Any help?

    • Hi Trevor, what markup do the shortcodes that you have mentioned produce please? Can you provide a link?

      • Not exactly sure what you mean by markup. The gviewer displays an empty box saying it cannot find the pdf, ” Sorry, we were unable to find the document at the original source. Verify that the document still exists.
        You can also try to download the original document by clicking here.” The download link provided from the gviewer cannot find the file either.

        Can’t really provide link directly to it, the page is behind our subscribers pay-wall.

        Perhaps the plugin is just not able to display the protected content? Are there any pdf viewers that are able to display the group protected files on a page?

        Sorry for the double post question.

      • “The file to embed must first be publicly available somewhere on the internet, in order for Google to retrieve the document for conversion”

        Hmmm, ok seems that this will not work since google does not have access to file behind the group file access.

  • Ok, second attempt at this post. Not sure why my first didn’t get an answer. We have bought the plugin, and would like to use to to display PDF files on a subscriber page using google pdf viewer. But the short codes do not seem to be working. How do I get the file to display in gview?

  • Just a possible bug report – plug in is working fine, but was preventing me from deleting a sub-site until I deactivated this plug in.

    Error log entry:

    `PHP message: PHP Fatal error: Call to undefined method Groups_File_Access::cleanup() in /var/www/wordpress/wp-content/plugins/groups-file-access/lib/core/class-groups-file-access.php on line 99″ while reading response header from upstream, client: 131.96.186.205, server: insidelaw.gsu.edu, request: “POST /wp-admin/network/sites.php?action=deleteblog HTTP/1.1″, upstream: “fastcgi://127.0.0.1:9000″, host: “insidelaw.gsu.edu”, referrer: “https://insidelaw.gsu.edu/wp-admin/network/sites.php?action=confirm&action2=deleteblog&id=2&msg=You+are+about+to+delete+the+site+%2Ftechnology%2F.&_wpnonce=1a13f150c8″
    `

  • Chris

    I can upload files through the wp-admin and confirmed that they are actually on the server through ftp.
    somehow nothing shows up in the files page.

  • Chie

    I sent a message last weekend about Groups File access not working on my client’s site. Somehow, it didn’t post on this comments page.

    When users click on the file id, instead of automatically downloading, it just open a new blank window but nothing happens.

    What could be the problem.

    • Hi Chie, please enable debugging in WordPress and try to access a file. If there are any errors in wp-content/debug.log we can check if you need to adjust your setup or if there is any conflict with another plugin.

  • sarah

    Hi, does 404 Redirect work with this plugin? I’d like customers to see the same page whether being blocked from a pdf protected by groups file access or a post protected by groups/subscriptions. I don’t want them directed to a word press login under any circumstances – i have woocommerce so prefer they login using “my account” page.

    thanks

    • Hi Sarah,

      If access is denied to a file protected by GFA, it will result in a 403 Forbidden and the Groups 404 Redirect plugin does not get involved.

      If you place the link to a resource protected by GFA on a protected page, then you could achieve the result of getting a redirect when they try to access that page, but not to the resource itself as it’s a different case.

  • Rose

    We’ve found a bug in this plugin when it is used with MP3s in iOS devices. We have a large (20+ minute) mp3 file. If we bi-pass the plugin and put it directly in the upload directory and link to it then it works fine. The mp3 player starts on the iOS device, after a small download delay it shows how much total time there is and you can play the file to completion.

    On the other hand if you link to the same file with this plugin then the mp3 player starts but the total time never shows up on the player. Also, it only plays a few minutes before it resets to the beginning and starts all over again missing most of the content.

    I did a little poking at HTTP headers. It looks like when a direct (not plugin) link is made the server sends first a 206 partial content followed by a 304 that streams the data. On the other hand with the plugin you send a 200 OK. The other thing I noticed is that some size data shows up in the chrome network browser with out the plugin… but with the plugin the network browser shows a size of 0.

    This is a rather critical bug for my customer since he has a live site and some angry customers who can not access their mp3 subscriptions via their idevices.

    Thank you, Rose

    • Hi Rose,

      Can you please send access for a test account to support at itthinx dot com so we can have a look and give it a try? Please add a link to one of the files and a page where the player is embedded. Can you also send admin access there please to have a look at how you have things set up?

      Anyhow, one important thing to note here, if you use a link to a file that is protected by GFA then access is only granted if the user is logged in and belongs to the right group. If you want to access the file without the user being logged in, for example using an embedded player, then you can use links that include the service key. What makes me wonder though is that you seam to have it working for some cases and for others not.

  • Peter

    Is it possible to use Groups file plugin with WPML plugin?

    When a user is inside a page and tries to downloada a file, it would be served him the a.pdf if the user is browsing the page on the website’s default language and the file a-en.pdf in the english version.

    Thanks.

    • There is a possible solution which can be done using a conditional shortcode available through the WPML Shortcode Translator plugin (I’ve just found it, haven’t checked if it works but it looks like it should) and using different files depending on language or defining language-specific groups.

      Something like this should work, for example providing two different files, one for English and the other for German :

      [wpml_language language="en"]
      [groups_file_link file_id="123"]
      [/wpml_language]
      [wpml_language language="de"]
      [groups_file_link file_id="124"]
      [/wpml_language]

  • Ideahost

    Just a question before purchase: Can I (with a different plugin) create a new WP User Role, for example, “MyPeeps” and assign that role automatically to anyone who enters or is enrolled in a group? Not sure from your documentation if the default is “subscriber” or if selectable. I know you don’t control access via that means, but I really need a custom user to hook. Please let me know soon, thanks a ton.

  • ok, is there still no way to display a group file access protected PDF?

    Our subscribers can access the protected page, download the protected file, but some older users do not like downloading to view the file and want to view it online, full screen in their browser. This works when i link a pdf on that page that was uploaded to that page, but the link is not secure and can be passed to anyone to click on and read. When i enter the gfid=91 link or whatever it prompts the browser to start a download instead of opening an new window to view pdf. Anyway of displaying the protected file on a page in wordpress wihtout downloading?

    • The service key can be used for that. See the description of the [groups_file_access_service_key] shortcode in the Shortcodes section of the plugin’s documentation please. It can be used to construct the URL used by the PDF viewer.

  • For some reason this isn’t working for me…

    I have created 3 groups: Internal, Partner, Customer

    ThenI created files and assigned them to specific groups, some to multiple groups.

    Then I assigned users to just one group

    Then I placed these shortcodes on the page thinking that the user would only be able to see the files assigned to their group:
    [groups_file_link group="Internal Documents" description="yes"]
    [groups_file_link group="Partner Documents" description="yes"]
    [groups_file_link group="Customer Documents" description="yes"]

    My problem is that if a file is assigned to 2 groups (Internal and Customer), then the files appear twice on the page (under (Internal and Customer), even though the user is only assigned to “Internal.”

    Please help! This is very time-sensitive.

    • antonio

      Hi,
      the file appears twice because file is in Internal and Customer, so:
      - Appears in “Internal” because file is in this group and userCustomerA can see this file (because user is in this group).
      - Appears in “Customer” because file is in this group and userCustomerA can see this file (because user is in group Internal and the file is in Internal).
      You could use [groups_member] shortcode. E.g.

      [groups_member group="Internal Documents"]
      [groups_file_link group="Internal Documents" description="yes"]
      [/groups_member]
      [groups_member group="Partner Documents"]
      [groups_file_link group="Partner Documents" description="yes"]
      [/groups_member]
      [groups_member group="Customer Documents"]
      [groups_file_link group="Customer Documents" description="yes"]
      [/groups_member]

      cheers

  • Samatva

    Plug-in is working great, but have found a minor bug. If it is network activated, and one site on the network is deleted, the following error occurs:

    Fatal error: Call to undefined method Groups_File_Access::cleanup() in /var/www/wordpress/wp-content/plugins/groups-file-access/lib/core/class-groups-file-access.php on line 99

    Doing a network disable eliminates the message. The site being deleted has no protected documents….

    Thank you for your great plugins…

Leave a comment

Your email address will not be published. Required fields are marked *

*

Please follow the Support guidelines.

Premium Support is available for customers in the Forums.