How to access to all websites folders with Samba without changing filesystem permissions

Discussion in 'Installation/Configuration' started by Max Brunazzi, May 21, 2018.

  1. Max Brunazzi

    Max Brunazzi New Member

    Hi to everybody!
    I'm using a Ispconfig 3.1 instance to manage a development server for multiple websites. The server is in my local network, I'm the only user, and I'd like to share with Samba the entire /var/www dir to edit files. Out of the box I can't: every website created in IspConfig has his own user (web1, web2...) and I'm trying to connect using the login created during the operating system installation (after creating a Samba password), and obviously i can't. The only solution I found until now is to change manually the permission using shell commands, but it's a little tricky.

    I tried two different approaches, but I still haven't figured out how to make them work:
    • tell Ispconfig to create all domains with the same system user (i.e. www-data), and login on samba with it
    • configure samba to give super user permission to a non root user (like a sudo after login)

    I can't use the subdomains solution (one single domain a several subdomains, but just one filesystem user) because I need to configure every domain with different options (different apache directives, different php versions).

    Anybody has any clue? Thank you in advance :D
  2. Max Brunazzi

    Max Brunazzi New Member

    Maybe I found a solution, giving to a samba user the admin permission in smb.conf:

       comment = Websites Folder
       browseable = yes
       path = /var/www
       printable = no
       guest ok = no
       read only = no
       create mask = 0700
       admin users = myuser
  3. nhybgtvfr

    nhybgtvfr Well-Known Member HowtoForge Supporter

    I have no idea about samba, but can't you use nfs instead?
    I'm using an nfs share, mounted at /var/www on 6 different ispconfig servers, and I can login to any one of those servers, su to root, and access any individual websites files without problems.
    you'd need to su to root or each websites user anyway, as each websites web folder only allows access to that specific webuser/client or root. a standard user account wouldn't have access anyway.

Share This Page