 readme  id drupal webfmmodule readmetxt the drupal webfmmodule presents a paradigm shift in file management for drupal this file manager is based on heirarchical directory structure unlike the traditional flat filesystem used to date webfm uses ajax to allow users to arrange files on the server in the same way they do with file managers on their personal systems this ability to heirarchically arrange files greatly enhances the managability of large collections of data webfm does not exclude the use of the uploadmodule or other modules that depend on the flat filesystem schema webfm uses the filemove and filecopy functions from fileinc bug reports can be sent to the email address in the credits area below installation unzip the archive and copy the webfm directory to your modules directory ie sites all modules alternatively copy the tarball to the module directory if you can unzip it on the server enable the module on drupal s admin modules page an install file updates the database with the necessary table additions configuration configure the module at admin settings webfm note the configuration assumes that the file system path is set in the usual way at admin settings filesystem all webfm directories are subdirectories of this file system path set download method radio to public since the module manages the download create the webfm root directory if this directory doesn t already exist the system will create it in the file system root multi directory root paths must already exist inside the file system directory set the directory permissions to 775 if the server is linux bsd the icon path allows the user to substitute their own gifs file names are hardcoded in the javascript so the icons will have to have identical names the maximum resolution for uploaded images input functions in the same fashion as the root uploadmodule the date format radio buttons set the day month order in the browser listing date field the display metadata title checkbox sets the browser to display metadata titles rather than the actual filename if the metadata tile exists renaming files that use the metadata title must be done via the metadata editor note that node attachments always display the metadata title if available default file permissions set the file level permissions for files inserted into the database the exception is file uploads that create a version overwrite whereby the new file inherits the permissions from the previous file roles that are granted the access webfm permission will receive additional configuration fields for root path extension white list max upload file size and max total upload size roles with the access webfm right but without a root directory cannot access the filesystem the webfm attachments section allows webfm to attach files to nodes attachment list properties sets the presentation of attached files the ie draganddrop normalization is a suboptimal solution for compensating for relative positioning in theme css this feature is only available to 1 user the webfm javascript debug checkbox is only useful for users interested in looking under the covers or who want to develop the module the webfm cron is a stored procedure used for database cleanup of file records that are deleted outside of the webfm interface ie os shell ftp this feature is only available to 1 user set webfm rights in admin user access per role administer webfm confers full rights to a role admins can see and operate on all files including files not in the database only admins can create directories and access admin settings webfm access webfm allows a role to download view files via the webfm browser only files referenced by the webfmfile table in the database are accessible only owners of a file and admins can move a file or modify it s metadata view webfm attachments allows a role to see files attached to nodes via webfm webfm upload allows a role with the access webfm right to upload files via the webfm browser the user who uploads a file is the the owner of that file admins and file owners can set the following file level permissions public download allows the file to be downloaded anonymously even if htaccess exists role view download allows users of the same role to view download the file role attach allows users of the same role to attach the file to nodes role full access allows users of the same role to delete rename move the file file permission edits are not allowed by role enable attachments in admin settings contenttypes type for each content type that will accept attachments default is disabled a htaccess file apache servers can be placed in the webfm root or subpath to secure file access webfm streams downloads and thus your browser doesn t require direct http access to the directories updating the menu cache by navigating to admin build menu may be necessary if upgrading from an earlier version of the module with different internal paths translations of the module require revising the string array at the top of webfmjs features applicationlike look and feel via ajax drag and drop moves of files and directories attachment of files to multiple nodes location independence allows dir restructuring to have no affect on attachment functionality drag and drop attachment ordering single file upload with version options for file overwrite file delete rename move attach metadata permissions menu options for admins or file owners file menu options for users with role access set by file permission file storeindb removefromdb admin menu options directory create rename delete admin menu options directory search for files that respects view privileges home directory per role with webfm access secure file download if htaccess file used metadata editor for admins or file owners fixed fields at this time debug window option for admin javascript development usage there are many ways to setup a file system hierarchy the rules of any given system must be applied carefully if security of data is important the basic rules for users in a role with access webfm rights the role root directory defines the domain and all subdirectories are accessible to the user the user cannot navigate above the role root directory only files in the webfmfile table are accessible files uploaded by the user are owned by the user and are automatically in the database only module admins can view operate on files not in the database the user has full control over files that he she owns that stay within an accessible role root domain file permissions can be locked down so that only the owner admins can see or operate on a file file permissions can be opened up so that anyone within the role can view or operate on the file users with access webfm rights cannot create delete move rename directories only module administrators users with administer webfm permission or 1 user can control the directory structure roles with access webfm rights can be subsets of other roles with access webfm rights or they can be exclusive users can be members of multiple roles and will consequently have a separate lefthand tree for each unique root directory roles can even share the same root directory it is difficult to foresee how diverse users of the module will choose to set up their systems but the following simple examples are typical arrangements both examples presume that the drupal filesystem directory is set to files the webfm module is installed and the webfm root directory is set to webfm example 1 the site requires 1 class of privileged users a to administer the file system and 2 classes of webfm users b c with access to file resources both roles will be able to upload files some webfm users are members of both b c while others are members of only one uploaded files are by default only accessible by the file owner and admins a site administrator will create 3 the roles a b and c role a will have the administer webfm permission set in admin user access b c will have the access webfm and the webfm upload permission set webfm settings will now have a fieldset for roles b c where the root directory for each role is set the root of b is set to b which automatically creates the files webfm b directory the root of c is set to c which creates the directory files webfm c a user who is a member of only one of b or c will see a single lefthand directory tree that contains their domain they will have no access to files within the other role domain users who are members of both b c will have two lefthand directory trees and have the ability to move files they own or control between the two domains role a s root directory is the webfm root directory and thus a users see only a single lefthand tree of the entire module filesys in webfm settings the default file permissions are configured with all checkboxes unset this combination of default file permissions means that files that are uploaded will initially only be viewable by the b or c user doing the upload owner and by a users individual file permissions are editable by the file owner or a user to permit other users to view attach modify the file one consequence of granting the permission role full access is that a nonadmin user with a single domain could lose contact with their own file if a dual domain nonadmin user moves it to the other domain example 2 the site requires 1 class of privileged users a to administer the file system and 2 classes of users b c with access to file resources c is determined to be a subset of b such that b can access it s own files as well as those of c c will not be able to upload files to the browser but will only be able to view download or attach files to nodes b will be able to upload files a site administrator will create 3 the roles a b and c role a will have the administer webfm permission set in admin user access b c will have the access webfm permission set b will also have the webfm upload permission set webfm settings will now have a fieldset for roles b c where the root directory for each role is set first the root of b is set to b which automatically creates the files webfm b directory next the root of c is set to b c which creates the directory files webfm b c since c is a subdir of b role b will have access to c but c will not be able to navigate above it s root to see b s files the lefthand directory tree will appear different for b c b s tree will start at b and have a c subdirectory and potentially other subdirectories as set up by a c s tree is a subset of b s tree role a s root directory is the webfm root directory in webfm settings the default file permissions are configured with role view access and role attach access set this combination of file permissions means that files that a b user uploads moves into the c realm will by default be viewable by c and be attachable to nodes that c creates a b file owner can manually modify the file permissions of each individual file to hide it or prevent it from being attached to content by a c user likewise the file permissions can be opened so that a c user can edit file attributes or move the file into another subdirectory of c in the above examples the site administrator may simply create the roles access rules and then let an a user configure webfm for b c to do flexible metadata scheme and standards based access for data mining api for content metadata search sort credits contact c 2007 web community resource networks 401 richmond st w suite 384 toronto on canada m5v 3a8 http webnet bug reports feature requests or other comments can be made on the project page at http drupalorg project webfm the author and maintainer of the module is rob milne andre molnar contibuted db queries and php paul shales assisted in the early development of attachment and context menuing a lot of the php source is based on the drupal upload module sources for the javascript are to be found all over the web i borrowed ideas from open source forums and modified to my needs the starting point was the drupalization of the mxfb project on sourceforge little residue remains of that gpl code but it gave me much inspiration the event handler is based on http ajaxcookbookorg creative commons attribution 25 license i cannot remember where all the icon gifs originated but their provinence is open source  