This study analyses legal barriers to data sharing in the context of the Open Research Data Pilot, which the European Commission is running within its research framework programme Horizon2020. In the first part of the study, data protection issues are analysed. The main focus is on the Data Protection Directive (95/46/EC) and its implementation in selected EU Member States. Additionally, the upcoming General Data Protection Regulation (2016/679/EU) and relevant changes are described. Special focus is placed on leading data protection principles. Next, the study describes the use of research data in the Open Research Data Pilot and how data protection principles influence such use. The experiences of the European Commission in running the Open Research Data Pilot so far, as well as basic examples of repository use forms, are considered. The second part of the study analyses the extent to which legislation on public sector information (PSI) influences access to and re-use of research data. The PSI Directive (2003/98/EC) and the impact of its revision in 2013 (2013/37/EU) are described. There is a special focus on the application of PSI legislation to public libraries, including university and research libraries, and its practical implications. In the final part of the study the results are critically evaluated and core recommendations are made to improve the legal situation in relation to research data.