Best open-source questions in February 2011

Is C open source?

53 votes

This is probably a stupid question, but I've been wondering about this for a while. Does C (or any other low-level language, for that matter) even have source, or is the compiler the part that "does all the work", including parsing? If so, couldn't different compilers have different C dialects? Where does the stdlib factor into this? I would really like to know how this works.

The C language is not a piece of software but a defined standard, so one wouldn't say that it's open-source, but rather that it's an open standard.

There are a gazillion different compilers for C however, and many of those are indeed open-source. The most notable example is GCC's C compiler, which is all under the GNU General Public License (GPL), an open-source license.

There are more options. Watcom is open-source, for instance. There is no shortage of open-source C compilers, but without a doubt the most widespread one, at least in the non-Windows world, is GCC.

For Windows, your best bet is probably Watcom or GCC by using Cygwin or MinGW.

Building a download area with users and groups taken from an external database

5 votes

I'm searching for a free and open source document/content management system (web-based) to implement a download area, where some people can upload files, someother can download them, depending on permissions. It must be possible to create folders (for organizing the files) and to set permissions on both files and folders.

I already have database tables with users and groups of users (used in my main web application) and I would like to use the same users and groups in my new DMS webapp for granting permissions. Obviously avoiding to handwrite or to hardcode these data. In this way I could modify the data directly in the original DB in the future and it will remain up to date in the DMS.

Is there a DMS that allows to set where it has to retrieve users and groups data, also defining in which database, tables and fields? Or something else not so far from this.. like batch procedures that copy users and groups from my webapp DB to the DMS DB.


Here the products I already tried without success, grouped by the reason of discard.

Purpose problems:

Access control problems:

  • Jease: would be great (so simple and clear!), but it doesn't manage groups and permission for users are over entire folders (where users can do everything with the files, not only view them)
  • InfoGlue: good users and groups management, but permissions are only on folders and contents are not files but articles/images/templates/etc.
  • LogicalDoc (ex Contineo): great CMS, with revision management etc., but permissions are only on folders
  • jAPS: built for creating sites, with permissions only for groups, not for users
  • Joomla! with DOCman component: permissions can be granted only to 1 user or 1 group
  • Nuxeo DM: it's a good DMS, but for collaborative work (not so suited for a download area), but the main problem is that permissions are only on folders, not on files
  • Xoda, KRYSTAL DMS, yaDMS, PHP Navigator, DocumentManager: very simple, but permission only concerns global access to the system
  • MeshCMS, Kordil EDMS, Simple Document Management System: very simple, no groups, no access control on files/folders
  • eZimDMS: groups are not used for permissions on files/folders, but only for 3 global privileges
  • OpenDocMan: similar to what I'm looking for, but groups are treated as departements, DB tables miss primary keys and you can't create folders; I like its easyness, but globally it doesn't seem so well done

Platform problems:

  • Contelligent, Xinco DMS, jLibrary: its client is a desktop (not a web) application (for the second you have Java Web Start)
  • OpenKM: it's good, but it must work only inside jBoss and not in my Tomcat

Installation problems:

  • Apache Lenya: I don't know if it's ok because I could not make it work and demos doesn't work..
  • Owl Intranet Engine: it has bugs and I can't understand how it works
  • DocMGR: supports LDAP, but I could not make it work; moreover doesn't support IE7
  • Epiware: no free version for Windows (unfortunately I'm under Windows)

Reliability problems:

Thanks!

I found these possible solutions:

  • LetoDMS (ex MyDMS), written in PHP, has it's own users and groups tables, old-fashioned style, less user-friendly
  • Quotero, written in Java, with LDAP, Active Directory, Joomla authentication support; more custom authentication sources can be built (starting from this tutorial); it's project seems more active; it has the most user-friendly and modern layout

Even if it has some bugs, I've choosen Quotero, for the above reasons. It's extensibility (relative to what I need) surprised me.

How I installed (in Tomcat 6 on Ubuntu Server 10 and Tomcat 7 on Windows 7) and integrated it with my main webapp:

  • install MySQL, PostgreSQL, Oracle DB, SQL Server or another DBMS (the last requires customization)
  • download quotero-deployer-2.0.war
  • place quotero-deployer-2.0.war in Tomcat webapps
  • browse to http://localhost:8080/quotero-deployer-2.0 and use the wizard to configure your installation (see quick install tutorial)
  • the wizard will create the DB and 2 .war in webapps folder: QuoteroServer and QuoteroClient; users will use the latter
    • in Linux systems it will probably place these webapps in /usr/share/tomcatx/webapps folder; if you need them in /var/lib/tomcatx/webapps, just move them
  • write your custom classes for the authentication source, following Joomla15's example and this tutorial
    • org.coretechs.quotero.user.impl.AuthenticationSourceFoo (the main class; it handles also the parameters asked in domain creation)
    • org.coretechs.quotero.user.impl.factory.foo.FooUserFactory (interacts with users table)
    • org.coretechs.quotero.user.impl.factory.foo.FooGroupFactory (interacts with groups table)
    • org.coretechs.quotero.user.impl.factory.foo.FooDBManagerDB2 (interacts with the DB)
    • org.coretechs.quotero.user.impl.factory.foo.FooPasswordHash (implements custom password hash algorithm)
  • insert such classes inside an Eclipse (or similar IDE) project, setting the build path with all libraries you can find in QuoteroServer/WEB-INF/lib and QuoteroClient/WEB-INF/lib
  • generate a .jar and place it in QuoteroServer/WEB-INF/lib
  • place the .jar with your DB driver in the same folder
  • browse to http://localhost:8080/QuoteroClient, log in (default username is admin and password admin)
  • open Toolbox > Administration > Domains and add a new domain, choosing as Domain Type your custom authentication source and setting the parameters, such as DB URL, username and password

In this way you can log in with the accounts belonging to users and groups of your main webapp (or whatever application with users and groups tables in a DB!) and also permissions on files and folders of Quotero DMS can be referred to those ones. Other data, such as permissions, documents, tasks, workflows, user and groups belonging to classical domain, will remain in the Quotero DB. So you have 2 DB: one for the whole Quotero DMS and one (already existing) where Quotero retreives users and groups (no need to replicate these data).