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.


  • 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.


Get the plugin here: Groups File Access


Online Demo


  • 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!

  • 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_member group="{any/all groups}"]
    [groups_file_link group="{any/all groups}" description="yes"]

    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.


    • 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!

      • 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.


    • 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.


    • 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 :)


  • 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.

  • 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


    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, this might be useful for others as well. (the code was stripped out to your comment).


  • 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


    • antonio

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


      • 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

      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.


  • fulla

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

    • antonio

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

  • Max


    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


            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?

            • 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.

              – 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…


  • 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

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

      [groups_member group="Gold"]


      • 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

          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.

          • 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

              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.

          • 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?

  • 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?



    • 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.


      • 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.


  • 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

    Meeting june 2013
    – Program
    – Slides
    – etcc.

    Meeting may 2013
    – Program
    – Slides
    – etcc.

    What is the best way to do this… ?

    • 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.


  • Michel


    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?



    • antonio

      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).

  • 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!


    • 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.


  • 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 ?


  • 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:


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


    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

    File Name | File Type | File Size

    File Name | File Type | File Size

    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

    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?


    • 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


    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_member group="Registered"]
      [groups_file_link group="*" description="yes"]

      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.


  • 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!


  • 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.


  • 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:

    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.
    – 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


    • 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.





  • Martin

    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:, server:, request: “POST /wp-admin/network/sites.php?action=deleteblog HTTP/1.1″, upstream: “fastcgi://″, host: “”, referrer: “″

  • 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.


    • 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.


    • 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 language="de"]
      [groups_file_link file_id="124"]

  • 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

      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 group="Partner Documents"]
      [groups_file_link group="Partner Documents" description="yes"]
      [groups_member group="Customer Documents"]
      [groups_file_link group="Customer Documents" description="yes"]


  • 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…

  • Greg

    Hi Kento,
    Well done with this plugin.
    I’ve just about finished all configurations on our site bar one thing.
    Reading through previous comments there’s one with a similar request to what I’m trying to implement and that is when a GFA document link is clicked it opens in the browser’s pdf viewer for viewing online so that it does not have to be down loaded.(i.e. accessing from a mobile device)
    I’ve added and changed the shortcode from [group_file_link] to [group_file_access_service_key] which renders the user’s unique service key.
    How do I apply a shortcode on all GFA document links so that it uses the browser’s default pdf viewer?
    Any pdf’s I have on the site outside of GFA behave this way i.e. opens in a new tab in the browser using what I assume is the browser’s default functionality, tried this with Chrome, firefox and IE all behave the same.

    • Hi Greg,

      Are you using the latest version? You should have version 1.5.0 installed – please check the MIME types of the files under Groups > Files and make sure that these are reflecting the correct type. That will give the receiving browser the right ‘hint’ so it can treat the files according to the user’s preferences.

  • Tamara

    Hi Kento,

    First of all: I really like your plugin. But I have one question: I want to display all the groups of a user by name in PHP with the files of that group. So far it’s working, but I can’t figure out how I should display subgroups in the right parent group. The result I try to achieve is the following:

    Parent group
    — Subgroup 1
    — (All the files of Subgroup 1)
    — Subgroup 2
    — (All the files of Subgroup 2)
    Parent group 2
    — Subgroup x
    — (All the files of Subgroup x)
    — Subgroup y
    — (All the files of Subgroup y)

    Now it shows up like a mess (as in: all groups display by it’s name and there are no subgroups in the right parent). I filter the groups with the Groups_User class. What would be the easiest way to get the right result?



    • Hi Tamara,

      Can you please share the code you are currently using? I might be able to give hints on corrections.


      • Tamara

        Hi Kento!

        I managed to figure it out already :D What I did is the following: First I used Groups_User to get all the groups of the user. Then, I made a function with a loop in it to search for matching parents (by the group id). The function puts the results in a new multidimensional array and returns that. After that I made a function that searches for the right names for the groups by the group id and I used ksort to sort the names of the groups in alphabetic order. And at last I used a loop to get all the files that belong to the group with do_shortcode and the shortcode for groups_file_link.

        I hope that this helps others who are facing the same thing!

  • Is there a way to restrict access unless a visitor is the member of two groups? In other words, one group won’t be enough… they have to have two groups to access content. Possible?

    • Hi Robyn,

      The restrictions allow access to members of the groups that are related to a file, not the opposite. I would recommend to consider creating a specific group for those members that must be in two or more groups to have access to a file.


  • I have been using your groups plugin and it has been working great! Just purchased your groups file access and here is my scenario and question. We sell a custom Android TV box. We already control access to our IPTV stream by unique key. Each box has an unique key for stream access. The reason why I purchased the file access is to control access to a system recovery file. We are currently developing an Android application that would perform a system restore in the event necessary. We obviously want to control access to our system image. The user already has been provided the stream access key. I see in your documentation that a file can be accessed without logging in by Service key. What would be required to use our access key in substitution of the service key? What I am envisioning is the application prompting the user to input their access key and it is appended on the link providing access to our system image for download. Best wishes, David

    • Hi David,

      For the scenario that you explain, one solution would be to map the access key to the service key through rewrite rules. I assume that you consider using the access key to make it easier for the users so that they only need to use one of them. The Service Key is stored as user meta (meta key gfa_service_key). See also the method GFA_Shortcodes::groups_file_access_service_key() which is used to render the Service Key for the current user where you can see how the key is retrieved from the user meta given the user ID. This method also creates the key if it’s missing.

      You would have to create rewrite rules based on that, so that an incoming URL which carries a valid stream access key to append the Service Key as the service_key=... URL parameter.

      I hope that helps, let me know if you have any questions on that please.

  • I’m stuck on how this works.
    I am logged in with a user with the correct role/group assigned.
    When I attempt to open the link I get a 403 forbidden error.

    • This would happen because the user isn’t in a group that the file is assigned to, the file doesn’t have any group assigned or because the service key used to access it is incorrect.

      • David

        Just confirmed User is assigned Customer Role
        File is assigned to customer group
        Customer is assigned under Groups to read_private_forums I did not find a capabilities for file access?

        Any further ideas?

        • Thanks David,

          Customer role and group are not the same thing, I think that’s what’s missing. Also there is no relation to the capability you mention with respect to files. I’ll use another group name to give a clearer example.

          Let’s assume you have a group named Platinum and all members of that group should have access to a bunch of files. Note that I do not refer to a role but to a group. You must assign the files they should be able to access to the Platinum group.

  • sarah

    Hi, my files have all been working perfectly (thank you) until now – suddenly every file has an error and the absolute address of the file is incorrect.

    A similar thing happened yesterday when my backup plugin stopped working and the solution was to change the first part of the address from /hermes/bosweb26a/b1808/ipg.mywebsite to /home/users/web/b1808/ipg.mywebsite. (So i suspect my server has changed their address but i’m not certain.)

    Is there any way to change the file locations of these files? So from

    If not, and I have to reimport every file, can i import them over top or do i have to start from scratch? There are at least 80 files and i would have to redo the link for each one throughout my site. I’ve looked at the export function to modify existing entries in bulk but it doesn’t seem to address this issue.
    many thanks,

    • Hi Sarah,

      It seems that your whole site (site’s files) has been relocated. You should be able to follow this process to have the relocated files properly recognized:

      1. Go to Groups > File Import and under Export Files click the Export button to obtain the text file that contains the current data for the files.
      2. Replace the path prefixes in the file obtained with the new ones.
      3. At Groups > File Import use the Import Files section to import the modified file.

      The files should now be recognized at their new location.

      • sarah

        thanks – it’s very odd, they claim nothing has changed at their end but clearly something has!
        I did try exporting that file before posting but there doesn’t appear to be a path prefix – just the filename. So line 1 looks like this:
        A-Frogs-Life-Worksheet.pdf 1 A Frogs Life Worksheet 0 Registered,samples
        There’s also a comment on the import page that specifically says don’t include the full path. Should i add it in?

        • Thanks Sarah, no then it’s better to leave it like it appears in the exported file. Have you tried re-importing the files based on it? You can test it with one file only so you don’t ‘crush’ all the files in case it doesn’t yield the expected result. If you take the exported file, remove all lines except for one entry and give the import a try so it can recognize it.

  • sarah

    Hi, I’ve tried deleting all but the first line and reimporting and got the error – registered is not a valid group. I’ve made no other changes – it’s exactly as exported.

    Results after importing (test only) from groups-file-access-export-2014-11-13-03-16-57.txt :
    0 files would have been imported
    1 invalid line was detected
    Invalid lines: 1
    1 : Invalid group name “Registered

    Also, i’ve tried simply loading a new pdf to that record in the edit function and get this error:
    The file /hermes/bosweb26b/b1808/ipg.flyingstartbooks/wp-content/uploads/groups-file-access/A-Frogs-Life-Worksheet.pdf already exists but it is not related to this entry. The existing file is not replaced and the current file for this entry is maintained.

    thanks again

    • Hi Sarah,

      It looks like there’s a " in front of the Registered group name which shouldn’t be there. Can you please check the file you’re using and try again?

  • Hi,
    I have installed and activated the plugin but I get a “permission denied” if I try to upload any file by FTP. What’s up?

    • Also, when I try to upload a small file using Groups > File I get this error:
      Fatal error: Call to undefined function mb_strlen() in /home/dreambit/public_html/wp-content/plugins/groups-file-access/lib/admin/files.php on line 580

      • Which PHP version is your web server using? The plugin checks if the mb_substr function exists before using it and the mb_strlen must also be present in that case. The error you get would only occur if the first function is defined but the second isn’t and that shouldn’t happen as they are both in the same package.

    • Sorry, the error on an ftp uload is:

      Server said: Can’t open that file: Permission denied

      Error -160: could not start data transfer

      What could be wrong? I installed the plugin through upload of the zip. The owner of the dir. is the same as other directories. Changing permissions is also not possible.

      • If you can’t upload via FTP you need to log in as the user who is allowed to upload files or change the ownership or permissions on the folder where you want to upload to. This isn’t related to the plugin itself but to folder permissions and I would recommend to get in touch with your hosting provider in case you don’t know how to do this as they can help you on your particular server.

    • Hi Edwin,

      You should check that the folder wp-content/uploads/groups-file-access is writeable.

  • sarah

    Thanks for your help. I wanted to let you know that it worked perfectly second time. I had previously opened the file in excel and i guess that added some code in somewhere that i hadn’t noticed. All fixed now.

  • Hi,

    I am not sure if this plugin serves the purposes I intend:

    I am using Groups and Groups for WooCommerce with Woothemes Sensei to offer online courses by a “Tiered Membership” as outlined by Dan of Woothemes (see×540.png)

    How can I also restrict the access to images and media attachments in the Sensei lessons (or in the WordPress blog in general), namely the access to the links in the /wp-content/uploads folder?

    Second application would be to protect the links to the wp-content/uploads folder in a private WordPress blog, but in a way that allows to embed images and file links into posts.

    It is my understanding that this is a known leak in WordPress.

    Thanks a lot.

    • Hi Nicole,

      One way to restrict access is to use Groups File Access but note that it uses its own folder to store files that should be protected and it does not prevent to access the files that are uploaded via WordPress’ Media section (yet).

      You can see details on its usage on its Documentation pages.


  • Shaun

    Hi – I’ve just purchased GFA, and I’m looking for a shortcode (or other method) for listing ALL the documents that are available to a user. I’ve looked at the documentation and couldn’t see this.

    Many thanks for any help you can provide,

  • Greg

    Hi Kento, I’ve moved a site from the dev environment to the live hosting. I only have 5 documents currently uploaded which was for testing purpose and it would be easier to upload them again than to try run the SQL script.
    My question is, would it be ok to simply remove the documents from Files menu and upload them again? or Do I have to run the SQL script?
    I’ve check the upload location url in File Access and it looks correct for new uploads.

    • Hi Greg,

      In that case you should be able to just upload them again, I would recommend to double-check that the group assignments are correctly made also on the production site by using an appropriate test user account.

  • Didi


    Which is the new link for the demo? This does not work :(

    Thanks a lot!

  • Hello,
    I have a client that wants to use their ldap authentication for file serving. Is that possible with your plugin. The wordpress install and the ldap is on the same server.

    • Hi Kenny, thanks for asking but that’s not possible, the plugin serves files based on group membership or using a service key in the URL that authorizes access to a file.

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.