Author Topic: Webserver (www-data) reading samba shares  (Read 2966 times)

acesuares

  • Zen Apprentice
  • *
  • Posts: 35
  • Karma: +0/-0
    • View Profile
Webserver (www-data) reading samba shares
« on: April 08, 2013, 07:05:18 pm »
For some reason the webserver needed to read a specific samba share.

I tried force group www-data in samba.conf, and force user too, didn't work.

Anytime a regular user created a file, it had
username __USERS__
as owner....

The following:

1. rename www-data to www-data2 in /etc/passwd and /etc/group
2. added a new samba user through the webinterface called 'www-data' and added to the share
3. chown where needed.

Of course, had to enable PAM first in LDAP settings.

wbinfo -u listed www-data
id www-data worked

now the webserver can read the share!

Is there any reason not to do it this way, are there securiy concerns, etc?

Cheers!

ace

Marcus

  • Forum Moderator
  • Zen Samurai
  • *****
  • Posts: 395
  • Karma: +12/-0
    • View Profile
    • Professional IT Service
Re: Webserver (www-data) reading samba shares
« Reply #1 on: April 22, 2013, 05:07:45 pm »
Hello acesuares,

You would be better off installing suPHP...

Best,

Marcus