I am creating a module for a CMS. I found a PHP code in github that does some work for me. The author has not clearly stated the license for the code. Since it is in github and is publicly available, can I use the code in my module or should I get the author’s written permission? I am planning to sell my module for a small price.
3
Since it is in github and is publicly available, can I use the code in my module…
NO.
…or should I get the author’s written permission?
YES.
In all 166 nations that are signatories to the Berne Convention, copyright is granted to an author when the work is created. The author holds a monopoly on all copyright rights (creating modifications, creating and distributing copies, etc.). You — as someone who is not the author — have been granted none of those rights.
A license is a mechanism by which the rights-holder (here, the author) grants some set of rights to a recipient (here, you). You say that the author has not offered any license, which means by default that the author has reserved all of his rights. The fact that the author has made his code publicly viewable does not mean that you have been granted any rights beyond the right to view the code. The right to make derivative works and the right to redistribute the code are not rights that you currently have.
Since you mention that code is on Github, it’s worth mentioning that the Github TOS have this to say about material hosted on their site:
By setting your repositories to be viewed publicly, you agree to allow others to view and fork your repositories.
Hosting on Github means that the author grants others the right to “view” and to “fork” the repository. Here, “fork” probably just means “use Github’s fork feature”, which creates a repository clone, hosted on Github. I admit the Github’s use of the term “fork” here is ambiguous, but if my reading is correct, then in no way does this appear to grant you any right to:
- copy the code outside the context of a Github fork
- make any modifications to the forked code
- incorporate the author’s code into your own
The bottom line is: you don’t have the right to distribute this code. It’s possible that the author wants people to use his code freely, but neglected to include a license. Tell the author that the lack of a license has blocked your use of the code, and encourage the author to add a some mainstream OSI- or FSF-approved license to the repository.
Not all open-source software is free software.
In the absence of any specific license, under U.S. law the work is the copyright of its author, who reserves all rights. Especially if commercial use is involved, you must contact the author and ask them to provide you a written license; otherwise you are infringing on their copyright. That license may be a general free software license such as BSD or MIT, or it may be an individual license for your use only.
3
Just because it’s on the Internet and/or is open source, does not mean it’s free to use!
You need to find out what license the code is written under.
- It might be prohibited from commercial use (maybe unless you pay for it…).
- It may be an “copy-left” license which forces you to share that code, or all your code, with your customers.
-
It might simply be something that requires you to give credits to the original author/project.
-
.. or it might be public domain, which means DWTHYWWI (Do What The Hell You Want With It).
4
A license doesn’t tell you what you can’t do – a license tells you what you can do beyond what copyright law allows you to do. Since you can’t find a license, you are allowed what copyright law allows, nothing more, nothing less.
Copyright law doesn’t allow you to create “derived works”, like downloading this code and changing it, or creating a larger work containing this code.
What you should do – which is both perfectly legal, and much better for you: Read the code. Learn how it works. When you have learned it, write your own code.
Of course, offering money for a license is Ok as well. Your offer may or may not be accepted.
1
Under US law, you do not need a license to use a work if you lawfully acquired a lawfully-made copy of that work.
It is amazing to me how many people get this wrong. But if you think about it, it has to be this way. Otherwise, you couldn’t even read a book without a license. Most books don’t include licenses.
17 USC 106 sets out the particular rights that can be reserved to copyright holders. It does not include ordinary use. Note that you may not make further copies of the work or modify it unless that is reasonably required for the ordinary, expected use of the work.
8