Skip to main content

Cloudlinux and custom virtualhost

Comments

5 comments

  • cPanelMichael
    This vhost is executed with user1 permissions. We need this vhost/user have access to /home/*/public_html dirs via web (read and write files there). Is this possible and how can be achieved if possible?

    Hello, I believe you would have to first exclude the user from CageFS for this to work. Documentation on how to do that is documented at: CloudLinux Documentation However, note that it's not generally a good idea to have one user write files to multiple accounts. We could provide you with potential alternatives if you provide some information about what you are attempting to do with this user. Thanks!
    0
  • rahnev
    I know it's not a good idea to have such user but it's needed for a project that need that access. That host/user will have to write some files in customers' public_html dirs based on some requests.
    0
  • cPanelMichael
    That host/user will have to write some files in customers' public_html dirs based on some requests.

    How will the user write the files? For instance, will it happen through a PHP script? Thank you.
    0
  • rahnev
    How will the user write the files? For instance, will it happen through a PHP script? Thank you.

    Yes it will happen through a PHP script. What alternative can you offer?
    0
  • cPanelMichael
    Hello, You could setup a custom script that runs as root to process the requests, and then make the changes via a script running as part of root cron job. Otherwise, you're likely to encounter several issues, similar to what's discussed on threads like this: sharing directory for users /home/scripts Access files ouside a user's folder using a symlink Thank you.
    0

Please sign in to leave a comment.