Drupal - Take Control module

Take Control is an administrative module for the popular Drupal CMS created by me last year primarily for managing this very website. The module is currently in its 2.x series with major enhancements and features being introduced in its 2.0 release, notably featuring a full-fledged File Browser/Manager.

The original intent for creating the module was discussed by me in an earlier blog post:

The official page for the module on drupal.org is this:

The module package is available on the official module page listed above.

The current page you are viewing has been created as the permanent address for the module on my website, where I would provide updates on the module development status, and links to some other resources I have created for using the module. You can also use this for discussing with me any issues you face while using the module. However, please file all bug reports and feature requests at the official module issue queue.

You can find a video tutorial demonstrating the steps for installation of the module here:

I originally used FamFamFam icons for the File Browser, which I was not able to commit to the module's CVS because of licensing conflicts with Drupal. The module now ships with a default icon-set for the File Browser, that are GPL licensed. You can find addtional icon-sets for the File Browser here:

An online demo for the module is now available here:

Below are some of the screenshots for the module:

File Browser     Quick Permissions screenshot     Admin configuration


  • Jun 18, 2011 - Drupal 7 port of the module is now available. Please download and test the same from the official module page at drupal.org.
  • Apr 30, 2012 - A greatly enhanced Drupal 7 version of the module with ability to configure accessible paths per-role and per-user is now available. Please help test the latest dev version from here and report any issues you find to enable releasing a stable version with the new features:


Web 2.0: 


Rahul, let me be the first to say thanks for this module!  I can hardly wait to try it out on my site.  It's developers like you that make Drupal better every day.  Well done!

rahul's picture

Hi Colin, thanx for the feedback. I have just committed and created the 2.0-beta2 version of the module to the CVS. It is important that you download and install the latest version from the official module page.

Hi Rahul,

I installed Take Control earlier today and it's absolutely perfect. The instructions were clear and very easy to follow. Thanks again, and keep up the awesome work!


rahul's picture

Thanx again Colin for the feedback, you probably might be interested in another of my modules that I would release on drupal.org over the next few days. That module is basically for documentation sites, allowing authorized users to attach and rate custom reference links to documentation pages.

One important thing while using Take Control is to remember not to abuse Drupal's design. I created this module because I was suffocated on how Drupal completely alienated me to my site's own files directory. But it is equally important to remember that Drupal does this for security reasons. You should keep custom permissions on the files directory only for the minimum duration for which you want to access it from your FTP or Hosting panel, and should be immediately restored to Drupal defaults after your task is complete.

Equally important to remember is not to change .htaccess in the files folder, and not upload executable code files (e.g. with .php extension etc) into the files folder using this module's Upload feature.

Great module.  Can I change it so it deosn't display the entire file system.  I would like to use this with staff and I want them to only see a folder I specicify.

rahul's picture

Hi Chris, the module out of the box does not support what you want, you will need to go into the code of the module and customize it for your needs.

Thanks for the response.  Again I love your module.  Any chance you can point me in the right direction so I can easily change the home folder users see when they access your module. 

rahul's picture

Hi Chris, I think you can control the entire experience from the fb/get-files.php file. It should have a method to return the root folders, that you can easily customize even for user-specific root folders.

Please note I am out for some days, so the next reply if you post another comment can take sometime.

Once again thanks for your response.  We were able to modify the code to point to a different root folder.  Essentally allowing us to control what parts of the file system Take Control provides access to.  We know find this to be a great tool for allowing users to access files through drupal like a cloud based file server.  Private files is protecting file properly but our only issue is that Take Control is only available to users with the admin role.  Do you know how we can change this to allow different roles access to this module?

rahul's picture

Hi Chris, I have this in my to-do list for this module. Doing so would need some changes to module architecture, which I plan to make soon. Maybe you can add this as a feature request in the official issue queue for the module at d.o. and I will have a go at this as soon as I can.

I will further appreciate if you can provide links to where you are using this module so I can update the same on the project page for this module as a demonstration of the capabilities of the module.

rahul's picture

Hi Chris, major enhancements have been committed for the 7.x-2.x branch of the module. The module now provides new permissions, enhanced administration options (including a demo mode option). The killer feature is ability to control accessible folder paths per-role and per-user.

Please download the latest dev release of the module from here and help test it:


So,i have a problem to change the root folder in get-file.php files.

I've changed the document_root and $rootfolder variable but i always have the message error :"You are not authorized to perform this action".

can you help me to fix this problem.
Thank you in advance.

rahul's picture

Hi tracy, I am running an awful schedule these days. I won't have much time, I can try giving a quick look to see what's wrong (if you can email me the FTP details and User Id 1 credentials for your setup together with site url).

Hi rahul,

I 've seen the comment of christ named " Module acess". He said that : "We were able to modify the code to point to a different root folder. "

So i just wanna know what line of the code i must modify (in get-files.php file) to point to my "C:/" directory. (for the filebrowser bloc).

I am new in drupal 7 but i've experience in the 6 version and i see one module in 6 version that can do this: that's FileBrowser module.  website: http://drupal.org/project/filebrowser

Thanks in advance. it's really a good module. good job.

rahul's picture

Hi tracy, look for the method _take_control_fb_validate_path in get-files.php. That's pretty simple PHP code, and you should be able to modify it to point the directory to C:\ or whatever you need.

hello rahul,

I were able to modify the php code in get-files.php.

Thanks a lot for your help.


Many thanks for this wonderful module. It's great and much easier work. Thank you.


awesome module,

however my upload is not working, the progress bar keeps moving but the files are not uploaded am i doing someting wrong?

rahul's picture

Please verify the Max Upload Size PHP setting for your installation, and ensure that the file you are trying to upload falls within the allowed size.

It keeps telling me it couldn't find the json_encode() function, no matter what I try.

rahul's picture

The module requires PHP 5. Please verify your PHP version.

Hello, you can create a space reserved for each user and ensure that you can not leave his room?


rahul's picture

Hi Luca, please consult the module's README.txt. In its current version, the module is meant for admins. For a future version, I might look for allowing per user home directory, but that is NOT something I am looking for in the shorter term.

Great app!

I am trying to upload a node template and it keeps on uploading. The file is 50Kb so the size can´t be the problem.

Other files do work.
Regards, Jose

rahul's picture

Hi Jose, I am not sure what could be the reason. Please verify that the directory you are trying to upload to is writable by Drupal (i.e. by your web server account). Currently, I cannot imagine any other reason for your issue. However, even in this case, the module should probably timeout and return an error.

I use IIS and Drupal 6.16.
I have installed the module Take Control like you showed in the video tutorial.
When I access the Take Control module I get a error message. Please see the attached screen shot . Can you help me?

rahul's picture

Hi Francisco, the screenshot resolution is too small, but from what I see, I think it relates to clean urls not being enabled (particularly because you are on IIS).

Currently, the module needs Clean Urls enabled to work properly. It's high on my list of priorities to get the module work even with clean urls disabled for the next version.

Thank you for your attencion.
You are sure, I don´t have Clean Url and I think that is impossible in IIS and my enterprise doesn´t let me install Apache.

rahul's picture

Hi francisco, you can have clean urls enabled with IIS 7 with its Url rewrite module enabled. Check the following link for more information:

I am not sure for IIS 6 and earlier, but people have had success trying to do so. Check for example:

A google search for "IIS Drupal clean urls" should give you many links that might be of help. 

Hi there! 

Thanks for your "take control" module. It surely looks great. Unfortunately, I am not quite ready to use it yet, because everytime I try to use the file browser, a window pops up saying, "Action Failure. You are not authorized to perform this action."

I believe I have followed the installation instructions properly. Do you have any suggestions on how to solve this issue?

Thanks in advance, 


rahul's picture

Hi Christian, this issue was reported earlier through the issue tracker at Drupal. The issue has been fixed and committed to CVS earlier. The fix is available in the dev snapshot of the module downloadable at the project page (http://ftp.drupal.org/files/projects/take_control-6.x-2.x-dev.tar.gz).

The dev snapshot is stable and suitable for production use.

Thanks for your answer. Being a Drupal beginner, I wasn't aware of the issue tracker. Looking forward to install the developer snapshot. 

Take care and keep up the good work!



Hi Rahul, thank you for this GREAT module !

I've been adapting it to the needs of my company but I think they plan to upgrade to Drupal 7 so I'm wondering if you'll release an upgrade for this version of Drupal.

If not, I think I would be able to do myself but I'm sure you'll do a much better work than me on this.

Thank you,


rahul's picture

Hi Pierre, yes a D7 version is planned. But it might be atleast 2-4 weeks away...

hello, i'm using this module  in a intranet enviremont.

But it does'nt display nothing i've installed the module and the extjs version is 4.0.2. but i don't see anything happen when i go to take control file browser.

what maybe worng?

rahul's picture

Hi Marc, I will update the module's official home page conveying this, but please note that this module uses ExtJs 3.x. Any version of ExtJs 3.x should be good with this module.

Hi, I believe I installed correctly per your instructions. The module components are showing as enabled in the modules UI and I uploaded the extjs library as /sites/all/libraries/extjs/3.4.0. as my version is 3.4.0. But I don't see the Take Control section under Administration>Configuration. I'm using Drupal 7 version of your module on drupal 7.

Thanks for any help!

rahul's picture

Hi cascadia, in addition to Take Control module, please also enable the File Browser and Quick Permissions modules.

Already did that and they're showing as enabled.

I added the libraries after I installed and enabled the module though; could that be the issue? If so, I could uninstall and reinstall the module to see if that causes the Take Control section to show in the configuration page. Let me know your thoughts on this. Thanks!

rahul's picture

Hi cascadia, sorry for the delayed reply. I do not recall exactly but I think that could well be the issue. However, if you visit the module's configuration page, it would search the disk again for ExtJs library versions and should be able to detect then. Disabling and reenabling should also help.

EDIT: I just checked the module's code. It tries to detect the ExtJs library when you visit the File Browser page also, and you need not disable/enable the module. So if this is not working for you, I will visit the module's configuration page and ensure that atleast one ExtJs library version is listed there in the drop-down and save the settings.

Thanks! I'll try that. Cheers

Hi, congratulations for the development, it seems to be a great app.

I've a problem in the activation of the module. I did follow all the steps correctly. The error is:

  • Notice: Undefined index: file in take_control_menu_build_first_item() (line 43 of /home-local/cpc/sites/all/modules/take_control/includes/common.inc).
  • Notice: Undefined index: file in take_control_menu_build_first_item() (line 50 of /home-local/cpc/sites/all/modules/take_control/includes/common.inc).

Thanks in advance.

rahul's picture

Which version of the module you are using? I think it might have to do with clean urls as earlier versions of the module needed Clean Urls to be enabled.

EDIT: Okay I can see the issue. Can you file this as a bug on the official issue queue for the module at d.o.

Hi Rahul, first of all thanks for developing such a great module for drupal.

I am trying to upload the small file but I get "Failure " error  but after reloading the page I can see uploaded file. files are getting uploaded but I can see those only if I reload the page. Plesae advise.


rahul's picture

Hi Shrutika, I am not sure. Can you please provide more details (Drupal version, module version)?

I have intalled this module with no errors but the comprasion of a folder is not working properly when i check sites folder and click compress it only compress empty site folder and subdirectories and files are not compressed. the uncompress feature works perfectly.

one other thing that it gives me the notice when after running database update on my site.

NoticeUndefined indexfile in take_control_menu_build_first_item() (line 43 of /var/www/sites/all/modules/take_control/includes/common.inc

finally thanks for this great module.

rahul's picture

Hi Fawad, please ensure that the web-server account has read/execute access for the folders you are trying to compress and write access to the destination directory where the compressed file would be created.

Can you please report the other issue (Undefined index) on the official issue queue for this module so it remains on my list of to-dos.

Hi Rahul,

I  have same problem , compression of one deirectories +files inside it works fine but if directories has subdirectories inside, it compress only 21kb and  subdirectories  looks like file after compression .

I Have given read / write permissions to all the directories and destination directory but it dosen't work.

if i try to compress through linux command it compresses fine.

btw thanks for the nice module.

rahul's picture

Hi Jony, I think the web server account would also need execute permission on the directories. Can you please check that. If the problem still persists, please report it at the official issue queue of the module at d.o. and I will have a look when I get back to this module.

hello and thanks Smile

i have more or less the same problem on files under directories not ziped if they are more than one folder level.

i have tried in drupal 7.17 and 7.18 with your dev version and not other modules.

i try to explain the best that i can with my bad english Embarassed

in the folder files/styles there are created several subfolders for each image style that you create in drupal (this is in core). like


i uploaded several images with styles and when i compress with your module or folder, only images that are in the folder are zipped, but images that are in subfolders or the subfolders arent zipped. the zipped folder has an empty file with the name of subfolders.

i have tried also with permission 777 to all folders and files (with your module), but there is not diference.

i have also created a folder with your module and upload a zip with folders and images into it and unzipped and then zipped it, and there is the same problem.

the unzip works perfect, by the way :)

any tip that you can give to me it would be a big help.

thanks a lot Smile