/var/vmail as symlink

Discussion in 'Installation/Configuration' started by artinfo, Nov 17, 2014.

  1. artinfo

    artinfo New Member

    Hi... I have var/vmail symlinked and I found it doesnt work well.. I mean when I create account it gives to folders root priviliges and doesn't create subfolders. I also found that there's a checkpath function in config.inc.php that is probably responsibile for that. Can anyone tell me what parameter of that function in ispconfig should be set to make symlinks allowed? Thanks
     
  2. srijan

    srijan New Member HowtoForge Supporter

    Which tutorial you have followed to mend the server?????

    ISPConfig don't recognises the manula symlink files.
     
  3. till

    till Super Moderator Staff Member ISPConfig Developer

    Use a bind mount instead of a symlink:

    http://www.howtoforge.com/use_mount...ctory_of_a_ispconfig_server_to_a_new_location
     
  4. artinfo

    artinfo New Member

    symlink

    Thanks. I mede one mistake last mail.. the script I correctet to make everything works with symlink is:

    /usr/local/ispconfig/server/lib/classes/system.inc.php

    fragment pliku:
    ...
    function chown($file, $owner, $allow_symlink = false ){
    global $app;
    if($allow_symlink == false && $this->checkpath($file) ==
    false) {
    $app->log("Action aborted, file is a symlink:
    $file", LOGLEVEL_WARN);
    return false;
    }
    if(file_exists($file)) {
    if(@chown($file, $owner)) {
    return true;
    } else {
    $app->log("chown failed: $file : $owner",
    LOGLEVEL_DEBUG);
    return false;
    }
    }
    function chgrp($file, $group = '', $allow_symlink = false){
    global $app;
    if($allow_symlink == false && $this->checkpath($file) ==
    false) {

    $app->log("Action aborted, file is a symlink:
    $file", LOGLEVEL_WARN);
    return false;
    }
    if(file_exists($file)) {
    if(@chgrp($file, $group)) {
    return true;
    } else {
    $app->log("chgrp failed: $file : $group",
    LOGLEVEL_DEBUG);
    return false;
    }
    }
    }
    }
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    You should not disable the symlink check. The check was not added for fun, it is required to protect your server. So for everyone that reads the post above, do not disable the check, use the bind mounts instead if you want to move the /var/www directory or /var/vmail directory to another place.
     
  6. artinfo

    artinfo New Member

    Symlink

    Hi. Thanks again. I'm aware that is not for fun, but in my case my var/vmail is a symlink and I cant do anything to change it for now. Please tell me if that option can be DISABLED (I'm aware of consequences..)
     
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    You can disable it by changing the ispconfig sourcecode. But why you cant change the symlink to a bind mount, each symlink can be changed to a bind mount, so this should be no problem at all. A bind mount is just a symlink on filesystem level.
     
  8. artinfo

    artinfo New Member

    Link

    Hi. Thanks. I've done as You said and it works. Thanks for help.
     

Share This Page