Author Topic: Permission issue www-data and Samba Share, temp. solution, what is better fix?  (Read 2942 times)


  • Regular Poster
  • **
  • Posts: 26
    • View Profile
Hi everybody,

This is an "older topic", and it seems that some people have found a solution to their individual problems and others did not (or did not provide feedback).
I have/had the problem that I could connect to my Samba/Windows Share. I could play & access the files on the MDs. However, I was unable to access them through the Web-admin interface when it is user-restricted. If I change the share to a public share (no username or password required), I could see it in the Web-Admin interface.
So I spent some (unfortunately most of my day) in solving this problem. It was obvious to me that it is a permission problem. After quite some time, I had the idea to check the apache2 error log and noticed that Apache2 reports "permission denied to use the stat command.
I added /usr/bin/stat to superdoers for the www-data user. This did not work. Then I added www-data to the group public because that is the group under which linuxmce mounts the Share. After a rebooted LMCE it finally worked. I could see all files & folders (I could actually create folders on the Share from the web admin interface, but I could not see them). This was the permission issue that I spent my day on. It seems that www-data also needs to be in group public to successfully execute stat.
I wanted to share my temporary solution, in case somebody else has the same problem, and I also want to ask for some feedback. Is there a better solution that I did not think of? I tried too many things, and I am tired (2:40am).
How wide did I open up my system? I know that www-data has gained some access (especially when your system is accessible over the internet). LMCE is very, very complex and I believe that adding www-data might be a great security risk.
I hope to get some feedback. Thanks

The Problem components consist of:
Openfiler with LDAP, user&password controlled
added to LMCE as Windows SHare CIFS