[GH-ISSUE #1154] Can Cypht 2 work on a cPanel account? #588

Closed
opened 2026-02-25 21:35:26 +03:00 by kerem · 24 comments
Owner

Originally created by @rr10 on GitHub (Aug 9, 2024).
Original GitHub issue: https://github.com/cypht-org/cypht/issues/1154

Originally assigned to: @Shadow243 on GitHub.

Hi Cypht team,

I am interested in using Cypht Version 2 on a cPanel hosting account. Could you please confirm whether Cypht 2 is compatible with cPanel? If there are specific configurations or limitations that I should be aware of, I would appreciate the guidance.

Thank you!

Originally created by @rr10 on GitHub (Aug 9, 2024). Original GitHub issue: https://github.com/cypht-org/cypht/issues/1154 Originally assigned to: @Shadow243 on GitHub. Hi Cypht team, I am interested in using Cypht Version 2 on a cPanel hosting account. Could you please confirm whether Cypht 2 is compatible with cPanel? If there are specific configurations or limitations that I should be aware of, I would appreciate the guidance. Thank you!
kerem closed this issue 2026-02-25 21:35:26 +03:00
Author
Owner

@marclaporte commented on GitHub (Aug 9, 2024):

Yes, it will install with manual instructions: https://www.cypht.org/install.html

If your cPanel has a one-click Tiki installer, you get Cypht within Tiki: https://doc.tiki.org/Cypht

<!-- gh-comment-id:2278321937 --> @marclaporte commented on GitHub (Aug 9, 2024): Yes, it will install with manual instructions: https://www.cypht.org/install.html If your cPanel has a one-click Tiki installer, you get Cypht within Tiki: https://doc.tiki.org/Cypht
Author
Owner

@rr10 commented on GitHub (Aug 10, 2024):

Thank you so much for your quick response and assistance. I really appreciate the support!

I'm currently having some difficulties proceeding with the installation of Cypht. I created a script that performs various tasks, such as checking PHP and Composer versions, managing files and directories, installing Composer dependencies, and creating the necessary directory structure. The script seems to work correctly, and after it's completed, I can see the application's login page.

However, I'm unsure of which credentials to use for logging in. I tried running php ./scripts/config_gen.php, and it seems to work without errors. However, when I run php ./scripts/setup_database.php after entering the correct values for DB_HOST, DB_USER, and DB_PASS in the .env file, I continuously get database connection errors like this:

Attempting to connect to database ... (6/10)
Attempting to connect to database ... (7/10)
Attempting to connect to database ... (8/10)
Attempting to connect to database ... (9/10)
Attempting to connect to database ... (10/10)
Unable to connect to database

It seems that the script is unable to correctly read the values from the .env file. I have double-checked the .env file, and everything seems to be in order. I also tried running the command manually, but without success.

Below is the script I created and used:

#!/bin/bash

# Script for checking PHP and Composer versions, managing files and directories,
# installing Composer dependencies, creating an hm3 directory structure, and setting permissions.

# Colors for output
RED='\033[0;31m'
GREEN='\033[0;32m'
NC='\033[0m' # No Color

# Get the current directory
CURRENT_DIR=$(pwd)

# Get the user's home directory
HOME_DIR=$HOME

# Calculate the relative directory path
RELATIVE_DIR=${CURRENT_DIR#$HOME_DIR/}

# Replace slashes with underscores for safe directory naming
SAFE_DIR=$(echo "$RELATIVE_DIR" | tr '/' '_')

# Define the full path for the hm3 directory
HM3_DIR="${HOME_DIR}/Cypht_${SAFE_DIR}_hm3/hm3"

# Define the subdirectories under hm3
SUBDIRS=("attachments" "users" "app_data")

# Display directory paths
echo "Current directory: $CURRENT_DIR"
echo "User's home directory: $HOME_DIR"
echo "hm3 directory path: $HM3_DIR"

# Flag to track any errors
error_flag=false

# Function to compare versions
version_compare() {
    if [[ "$1" == "$2" ]]; then
        return 0
    fi

    local IFS=.
    local i ver1=($1) ver2=($2)
    for ((i=${#ver1[@]}; i<${#ver2[@]}; i++)); do
        ver1[i]=0
    done
    for ((i=0; i<${#ver1[@]}; i++)); do
        if [[ -z ${ver2[i]} ]]; then
            ver2[i]=0
        fi
        if ((10#${ver1[i]} > 10#${ver2[i]})); then
            return 1
        fi
        if ((10#${ver1[i]} < 10#${ver2[i]})); then
            return 2
        fi
    done
    return 0
}

# Preliminary step: Fetch and download the latest Cypht release
echo
echo "Fetching the latest Cypht release information..."
LATEST_RELEASE=$(curl -s https://api.github.com/repos/cypht-org/cypht/releases/latest)
LATEST_TAG=$(echo "$LATEST_RELEASE" | grep -oP '"tag_name": "\K(.*)(?=")')
DOWNLOAD_URL="https://github.com/cypht-org/cypht/archive/refs/tags/$LATEST_TAG.zip"

read -p "Do you want to download and unzip the latest Cypht release (version $LATEST_TAG)? (y/n): " download_choice
if [[ "$download_choice" =~ ^[Yy]$ ]]; then
    echo "Downloading the latest Cypht release..."
    curl -L "$DOWNLOAD_URL" -o latest_cypht_release.zip
    
    echo "Unzipping the downloaded file..."
    unzip latest_cypht_release.zip
    
    # Find the unzipped directory (e.g., cypht-2.1.0)
    UNZIPPED_DIR=$(find . -type d -name "cypht-*")
    
    # Move contents to current directory, including hidden files
if [ -d "$UNZIPPED_DIR" ]; then
    echo "Moving files from $UNZIPPED_DIR to $CURRENT_DIR..."
    shopt -s dotglob  # Include hidden files in wildcard matches
    mv "$UNZIPPED_DIR"/* "$CURRENT_DIR"
    shopt -u dotglob  # Reset the dotglob option to its default state
    rm -rf "$UNZIPPED_DIR"
    echo -e "${GREEN}Files moved successfully.${NC}"
else
    echo -e "${RED}Error: Unzipped directory not found.${NC}"
fi

else
    echo -e "${GREEN}Proceeding with the assumption that the files are already downloaded and unzipped.${NC}"
fi

# Check PHP version
echo
echo "Checking PHP version (>=8.1 required)..."
PHP_VERSION=$(php -r 'echo PHP_VERSION;' | awk -F '.' '{print $1"."$2}')
REQUIRED_PHP_VERSION="8.1"

version_compare "$PHP_VERSION" "$REQUIRED_PHP_VERSION"
COMPARE_RESULT=$?

if [[ "$COMPARE_RESULT" == 2 ]]; then
    echo -e "${RED}Error: PHP version is $PHP_VERSION. Version >= 8.1 is required.${NC}"
    error_flag=true
else
    echo -e "${GREEN}PHP Version: $PHP_VERSION (OK)${NC}"
fi

# Check Composer version
echo
echo "Checking Composer version (>=2.0.0 required)..."
COMPOSER_VERSION=$(composer --version 2>/dev/null | awk '{print $3}' | awk -F '.' '{print $1"."$2}')
REQUIRED_COMPOSER_VERSION="2.0"

version_compare "$COMPOSER_VERSION" "$REQUIRED_COMPOSER_VERSION"
COMPARE_RESULT=$?

if [[ "$COMPARE_RESULT" == 2 ]]; then
    echo -e "${RED}Error: Composer version is $COMPOSER_VERSION. Version >= 2.0.0 is required.${NC}"
    error_flag=true
else
    echo -e "${GREEN}Composer Version: $COMPOSER_VERSION (OK)${NC}"
fi

# Check installed PHP extensions
echo
echo "Checking installed PHP extensions..."
PHP_MODULES=$(php -m)

# Check required extensions
REQUIRED_MODULES=("openssl" "mbstring" "curl")
for MODULE in "${REQUIRED_MODULES[@]}"; do
    if ! echo "$PHP_MODULES" | grep -qi "$MODULE"; then
        echo -e "${RED}Error: PHP extension $MODULE is not installed.${NC}"
        error_flag=true
    else
        echo -e "${GREEN}PHP extension $MODULE installed (OK)${NC}"
    fi
done

# Only proceed if no errors were detected
if [ "$error_flag" = false ]; then

   # Check for latest_cypht_release.zip file
echo
echo "Checking for latest_cypht_release.zip file..."
FILE_FOUND=$(find "$CURRENT_DIR" -maxdepth 1 -type f -name "latest_cypht_release.zip")

if [ -n "$FILE_FOUND" ]; then
    echo -e "${RED}File found: ${FILE_FOUND}${NC}"
    read -p "Do you want to delete this file? (y/n): " choice
    case "$choice" in 
    y|Y ) rm -f "$FILE_FOUND"; echo -e "${GREEN}File successfully deleted.${NC}";;
    * ) echo -e "${GREEN}File retained.${NC}";;
    esac
else
    echo -e "${GREEN}No latest_cypht_release.zip file found in the current directory.${NC}"
fi

    # Check for empty cypht-* directories
    echo
    echo "Checking for empty cypht-* directories..."
    DIR_FOUND=$(find "$CURRENT_DIR" -maxdepth 1 -type d -name "cypht-*")

    if [ -n "$DIR_FOUND" ]; then
        for dir in $DIR_FOUND; do
            if [ -z "$(ls -A "$dir")" ]; then
                echo -e "${RED}Empty directory found: $dir${NC}"
                read -p "Do you want to delete this directory? (y/n): " choice
                case "$choice" in 
                y|Y ) rm -rf "$dir"; echo -e "${GREEN}Directory successfully deleted.${NC}";;
                * ) echo -e "${GREEN}Directory retained.${NC}";;
                esac
            else
                echo -e "${GREEN}The directory $dir is not empty.${NC}"
            fi
        done
    else
        echo -e "${GREEN}No cypht-* directories found in the current directory.${NC}"
    fi

    # Run the composer install command
    echo
    echo "All requirements are met. Running 'composer install'..."
    
    if composer install; then
        echo -e "${GREEN}Composer installation completed successfully.${NC}"
        
        
         # Copy .env.example to .env
        if [ -f "$CURRENT_DIR/.env" ]; then
            read -p "The .env file already exists. Do you want to overwrite it? (y/n): " overwrite_choice
            case "$overwrite_choice" in 
              y|Y ) cp "$CURRENT_DIR/.env.example" "$CURRENT_DIR/.env"; echo -e "${GREEN}.env file overwritten from .env.example${NC}";;
              * ) echo -e "${GREEN}The existing .env file was retained.${NC}";;
            esac
        else
            cp "$CURRENT_DIR/.env.example" "$CURRENT_DIR/.env"
            echo -e "${GREEN}.env file created from .env.example${NC}"
        fi

        # Create the hm3 directory and subdirectories if they don't exist
        if [ ! -d "$HM3_DIR" ]; then
            mkdir -p "$HM3_DIR"
            chmod 755 "$HM3_DIR"
            echo -e "${GREEN}Main hm3 directory created and permissions set: $HM3_DIR${NC}"
        fi
        
        for subdir in "${SUBDIRS[@]}"; do
            if [ ! -d "$HM3_DIR/$subdir" ]; then
                mkdir -p "$HM3_DIR/$subdir"
                chmod 755 "$HM3_DIR/$subdir"
                echo -e "${GREEN}Subdirectory created and permissions set: $HM3_DIR/$subdir${NC}"
            else
                chmod 755 "$HM3_DIR/$subdir"
                echo -e "${GREEN}Subdirectory $HM3_DIR/$subdir already exists, permissions set to 755.${NC}"
            fi
            
        # Update the .env file with hm3 directory paths
        if [ -f "$CURRENT_DIR/.env" ]; then
            echo "Updating .env file with the correct directory paths..."
            
            sed -i "s|^USER_CONFIG_TYPE=.*|USER_CONFIG_TYPE=file|" "$CURRENT_DIR/.env"
            sed -i "s|^USER_SETTINGS_DIR=.*|USER_SETTINGS_DIR=$HM3_DIR/users|" "$CURRENT_DIR/.env"
            sed -i "s|^ATTACHMENT_DIR=.*|ATTACHMENT_DIR=$HM3_DIR/attachments|" "$CURRENT_DIR/.env"
            sed -i "s|^APP_DATA_DIR=.*|APP_DATA_DIR=$HM3_DIR/app_data|" "$CURRENT_DIR/.env"

            echo -e "${GREEN}.env file updated successfully.${NC}"
        else
            echo -e "${RED}Error: .env file not found in the current directory.${NC}"
        fi
            
        done

    else
        echo -e "${RED}Error during Composer installation.${NC}"
    fi

else
    echo -e "${RED}Error: Not all requirements were met. 'composer install' was not executed.${NC}"
fi

Any guidance on how to proceed would be greatly appreciated. Thanks again for all your support!

<!-- gh-comment-id:2282192357 --> @rr10 commented on GitHub (Aug 10, 2024): Thank you so much for your quick response and assistance. I really appreciate the support! I'm currently having some difficulties proceeding with the installation of Cypht. I created a script that performs various tasks, such as checking PHP and Composer versions, managing files and directories, installing Composer dependencies, and creating the necessary directory structure. The script seems to work correctly, and after it's completed, I can see the application's login page. However, I'm unsure of which credentials to use for logging in. I tried running `php ./scripts/config_gen.php`, and it seems to work without errors. However, when I run `php ./scripts/setup_database.php` after entering the correct values for `DB_HOST`, `DB_USER`, and `DB_PASS` in the `.env` file, I continuously get database connection errors like this: ``` Attempting to connect to database ... (6/10) Attempting to connect to database ... (7/10) Attempting to connect to database ... (8/10) Attempting to connect to database ... (9/10) Attempting to connect to database ... (10/10) Unable to connect to database ``` It seems that the script is unable to correctly read the values from the `.env` file. I have double-checked the `.env` file, and everything seems to be in order. I also tried running the command manually, but without success. Below is the script I created and used: ``` #!/bin/bash # Script for checking PHP and Composer versions, managing files and directories, # installing Composer dependencies, creating an hm3 directory structure, and setting permissions. # Colors for output RED='\033[0;31m' GREEN='\033[0;32m' NC='\033[0m' # No Color # Get the current directory CURRENT_DIR=$(pwd) # Get the user's home directory HOME_DIR=$HOME # Calculate the relative directory path RELATIVE_DIR=${CURRENT_DIR#$HOME_DIR/} # Replace slashes with underscores for safe directory naming SAFE_DIR=$(echo "$RELATIVE_DIR" | tr '/' '_') # Define the full path for the hm3 directory HM3_DIR="${HOME_DIR}/Cypht_${SAFE_DIR}_hm3/hm3" # Define the subdirectories under hm3 SUBDIRS=("attachments" "users" "app_data") # Display directory paths echo "Current directory: $CURRENT_DIR" echo "User's home directory: $HOME_DIR" echo "hm3 directory path: $HM3_DIR" # Flag to track any errors error_flag=false # Function to compare versions version_compare() { if [[ "$1" == "$2" ]]; then return 0 fi local IFS=. local i ver1=($1) ver2=($2) for ((i=${#ver1[@]}; i<${#ver2[@]}; i++)); do ver1[i]=0 done for ((i=0; i<${#ver1[@]}; i++)); do if [[ -z ${ver2[i]} ]]; then ver2[i]=0 fi if ((10#${ver1[i]} > 10#${ver2[i]})); then return 1 fi if ((10#${ver1[i]} < 10#${ver2[i]})); then return 2 fi done return 0 } # Preliminary step: Fetch and download the latest Cypht release echo echo "Fetching the latest Cypht release information..." LATEST_RELEASE=$(curl -s https://api.github.com/repos/cypht-org/cypht/releases/latest) LATEST_TAG=$(echo "$LATEST_RELEASE" | grep -oP '"tag_name": "\K(.*)(?=")') DOWNLOAD_URL="https://github.com/cypht-org/cypht/archive/refs/tags/$LATEST_TAG.zip" read -p "Do you want to download and unzip the latest Cypht release (version $LATEST_TAG)? (y/n): " download_choice if [[ "$download_choice" =~ ^[Yy]$ ]]; then echo "Downloading the latest Cypht release..." curl -L "$DOWNLOAD_URL" -o latest_cypht_release.zip echo "Unzipping the downloaded file..." unzip latest_cypht_release.zip # Find the unzipped directory (e.g., cypht-2.1.0) UNZIPPED_DIR=$(find . -type d -name "cypht-*") # Move contents to current directory, including hidden files if [ -d "$UNZIPPED_DIR" ]; then echo "Moving files from $UNZIPPED_DIR to $CURRENT_DIR..." shopt -s dotglob # Include hidden files in wildcard matches mv "$UNZIPPED_DIR"/* "$CURRENT_DIR" shopt -u dotglob # Reset the dotglob option to its default state rm -rf "$UNZIPPED_DIR" echo -e "${GREEN}Files moved successfully.${NC}" else echo -e "${RED}Error: Unzipped directory not found.${NC}" fi else echo -e "${GREEN}Proceeding with the assumption that the files are already downloaded and unzipped.${NC}" fi # Check PHP version echo echo "Checking PHP version (>=8.1 required)..." PHP_VERSION=$(php -r 'echo PHP_VERSION;' | awk -F '.' '{print $1"."$2}') REQUIRED_PHP_VERSION="8.1" version_compare "$PHP_VERSION" "$REQUIRED_PHP_VERSION" COMPARE_RESULT=$? if [[ "$COMPARE_RESULT" == 2 ]]; then echo -e "${RED}Error: PHP version is $PHP_VERSION. Version >= 8.1 is required.${NC}" error_flag=true else echo -e "${GREEN}PHP Version: $PHP_VERSION (OK)${NC}" fi # Check Composer version echo echo "Checking Composer version (>=2.0.0 required)..." COMPOSER_VERSION=$(composer --version 2>/dev/null | awk '{print $3}' | awk -F '.' '{print $1"."$2}') REQUIRED_COMPOSER_VERSION="2.0" version_compare "$COMPOSER_VERSION" "$REQUIRED_COMPOSER_VERSION" COMPARE_RESULT=$? if [[ "$COMPARE_RESULT" == 2 ]]; then echo -e "${RED}Error: Composer version is $COMPOSER_VERSION. Version >= 2.0.0 is required.${NC}" error_flag=true else echo -e "${GREEN}Composer Version: $COMPOSER_VERSION (OK)${NC}" fi # Check installed PHP extensions echo echo "Checking installed PHP extensions..." PHP_MODULES=$(php -m) # Check required extensions REQUIRED_MODULES=("openssl" "mbstring" "curl") for MODULE in "${REQUIRED_MODULES[@]}"; do if ! echo "$PHP_MODULES" | grep -qi "$MODULE"; then echo -e "${RED}Error: PHP extension $MODULE is not installed.${NC}" error_flag=true else echo -e "${GREEN}PHP extension $MODULE installed (OK)${NC}" fi done # Only proceed if no errors were detected if [ "$error_flag" = false ]; then # Check for latest_cypht_release.zip file echo echo "Checking for latest_cypht_release.zip file..." FILE_FOUND=$(find "$CURRENT_DIR" -maxdepth 1 -type f -name "latest_cypht_release.zip") if [ -n "$FILE_FOUND" ]; then echo -e "${RED}File found: ${FILE_FOUND}${NC}" read -p "Do you want to delete this file? (y/n): " choice case "$choice" in y|Y ) rm -f "$FILE_FOUND"; echo -e "${GREEN}File successfully deleted.${NC}";; * ) echo -e "${GREEN}File retained.${NC}";; esac else echo -e "${GREEN}No latest_cypht_release.zip file found in the current directory.${NC}" fi # Check for empty cypht-* directories echo echo "Checking for empty cypht-* directories..." DIR_FOUND=$(find "$CURRENT_DIR" -maxdepth 1 -type d -name "cypht-*") if [ -n "$DIR_FOUND" ]; then for dir in $DIR_FOUND; do if [ -z "$(ls -A "$dir")" ]; then echo -e "${RED}Empty directory found: $dir${NC}" read -p "Do you want to delete this directory? (y/n): " choice case "$choice" in y|Y ) rm -rf "$dir"; echo -e "${GREEN}Directory successfully deleted.${NC}";; * ) echo -e "${GREEN}Directory retained.${NC}";; esac else echo -e "${GREEN}The directory $dir is not empty.${NC}" fi done else echo -e "${GREEN}No cypht-* directories found in the current directory.${NC}" fi # Run the composer install command echo echo "All requirements are met. Running 'composer install'..." if composer install; then echo -e "${GREEN}Composer installation completed successfully.${NC}" # Copy .env.example to .env if [ -f "$CURRENT_DIR/.env" ]; then read -p "The .env file already exists. Do you want to overwrite it? (y/n): " overwrite_choice case "$overwrite_choice" in y|Y ) cp "$CURRENT_DIR/.env.example" "$CURRENT_DIR/.env"; echo -e "${GREEN}.env file overwritten from .env.example${NC}";; * ) echo -e "${GREEN}The existing .env file was retained.${NC}";; esac else cp "$CURRENT_DIR/.env.example" "$CURRENT_DIR/.env" echo -e "${GREEN}.env file created from .env.example${NC}" fi # Create the hm3 directory and subdirectories if they don't exist if [ ! -d "$HM3_DIR" ]; then mkdir -p "$HM3_DIR" chmod 755 "$HM3_DIR" echo -e "${GREEN}Main hm3 directory created and permissions set: $HM3_DIR${NC}" fi for subdir in "${SUBDIRS[@]}"; do if [ ! -d "$HM3_DIR/$subdir" ]; then mkdir -p "$HM3_DIR/$subdir" chmod 755 "$HM3_DIR/$subdir" echo -e "${GREEN}Subdirectory created and permissions set: $HM3_DIR/$subdir${NC}" else chmod 755 "$HM3_DIR/$subdir" echo -e "${GREEN}Subdirectory $HM3_DIR/$subdir already exists, permissions set to 755.${NC}" fi # Update the .env file with hm3 directory paths if [ -f "$CURRENT_DIR/.env" ]; then echo "Updating .env file with the correct directory paths..." sed -i "s|^USER_CONFIG_TYPE=.*|USER_CONFIG_TYPE=file|" "$CURRENT_DIR/.env" sed -i "s|^USER_SETTINGS_DIR=.*|USER_SETTINGS_DIR=$HM3_DIR/users|" "$CURRENT_DIR/.env" sed -i "s|^ATTACHMENT_DIR=.*|ATTACHMENT_DIR=$HM3_DIR/attachments|" "$CURRENT_DIR/.env" sed -i "s|^APP_DATA_DIR=.*|APP_DATA_DIR=$HM3_DIR/app_data|" "$CURRENT_DIR/.env" echo -e "${GREEN}.env file updated successfully.${NC}" else echo -e "${RED}Error: .env file not found in the current directory.${NC}" fi done else echo -e "${RED}Error during Composer installation.${NC}" fi else echo -e "${RED}Error: Not all requirements were met. 'composer install' was not executed.${NC}" fi ``` Any guidance on how to proceed would be greatly appreciated. Thanks again for all your support!
Author
Owner

@marclaporte commented on GitHub (Aug 10, 2024):

Wow! Looks like you did a good part of the job for https://github.com/cypht-org/cypht/issues/17

Please join us on https://gitter.im/cypht-org/community so a Cypht developer can do a screen share with you and make Cypht work for you.

<!-- gh-comment-id:2282199024 --> @marclaporte commented on GitHub (Aug 10, 2024): Wow! Looks like you did a good part of the job for https://github.com/cypht-org/cypht/issues/17 Please join us on https://gitter.im/cypht-org/community so a Cypht developer can do a screen share with you and make Cypht work for you.
Author
Owner

@marclaporte commented on GitHub (Aug 10, 2024):

@Shadow243 please test the script above and advise.

<!-- gh-comment-id:2282199448 --> @marclaporte commented on GitHub (Aug 10, 2024): @Shadow243 please test the script above and advise.
Author
Owner

@rr10 commented on GitHub (Aug 10, 2024):

Additionally, I'd like to clarify a specific part of the script that handles the creation of the hm3 directories. Based on the installation guidelines I found on the Cypht website, it appears that it's more secure to place the hm3 directory outside of the public_html folder. This is what the script does:

# Create the hm3 directory and subdirectories if they don't exist
if [ ! -d "$HM3_DIR" ]; then
    mkdir -p "$HM3_DIR"
    chmod 755 "$HM3_DIR"
    echo -e "${GREEN}Main hm3 directory created and permissions set: $HM3_DIR${NC}"
fi

for subdir in "${SUBDIRS[@]}"; do
    if [ ! -d "$HM3_DIR/$subdir" ]; then
        mkdir -p "$HM3_DIR/$subdir"
        chmod 755 "$HM3_DIR/$subdir"
        echo -e "${GREEN}Subdirectory created and permissions set: $HM3_DIR/$subdir${NC}"
    else
        chmod 755 "$HM3_DIR/$subdir"
        echo -e "${GREEN}Subdirectory $HM3_DIR/$subdir already exists, permissions set to 755.${NC}"
    fi
done

In this part of the script, the hm3 directory is created inside a folder that is named based on the installation folder. This allows multiple Cypht installations in different folders or subdirectories without conflict, as each installation has its own isolated hm3 directory structure.

The folder is created outside of the public_html directory for security reasons, but within a directory named according to the installation folder. This approach ensures that each installation is separated, and sensitive data remains secure while still being organized based on the installation paths.

<!-- gh-comment-id:2282212713 --> @rr10 commented on GitHub (Aug 10, 2024): Additionally, I'd like to clarify a specific part of the script that handles the creation of the `hm3` directories. Based on the installation guidelines I found on the Cypht website, it appears that it's more secure to place the `hm3` directory outside of the `public_html` folder. This is what the script does: ```bash # Create the hm3 directory and subdirectories if they don't exist if [ ! -d "$HM3_DIR" ]; then mkdir -p "$HM3_DIR" chmod 755 "$HM3_DIR" echo -e "${GREEN}Main hm3 directory created and permissions set: $HM3_DIR${NC}" fi for subdir in "${SUBDIRS[@]}"; do if [ ! -d "$HM3_DIR/$subdir" ]; then mkdir -p "$HM3_DIR/$subdir" chmod 755 "$HM3_DIR/$subdir" echo -e "${GREEN}Subdirectory created and permissions set: $HM3_DIR/$subdir${NC}" else chmod 755 "$HM3_DIR/$subdir" echo -e "${GREEN}Subdirectory $HM3_DIR/$subdir already exists, permissions set to 755.${NC}" fi done ``` In this part of the script, the `hm3` directory is created inside a folder that is named based on the installation folder. This allows multiple Cypht installations in different folders or subdirectories without conflict, as each installation has its own isolated `hm3` directory structure. The folder is created outside of the `public_html` directory for security reasons, but within a directory named according to the installation folder. This approach ensures that each installation is separated, and sensitive data remains secure while still being organized based on the installation paths.
Author
Owner

@Shadow243 commented on GitHub (Sep 30, 2024):

else
    echo -e "${RED}Error during Composer installation.${NC}"
fi

else
echo -e "${RED}Error: Not all requirements were met. 'composer install' was not executed.${NC}"
fi

Sorry for this late reply @rr10 , I just tried but i have a composer error, so a suggestion came to me: instead of reporting the error could we instead give a choice: i.e. ask if we want to install composer or cancel the operation or continue like that ?

here is the first answer during the first test
Screenshot 2024-09-30 at 22 17 16

I hade this error: Installer corrupt from https://getcomposer.org/download/ when trying to install composer, but after changing allow_url_fopen from Off to On
Screenshot 2024-09-30 at 22 37 42

<!-- gh-comment-id:2384077313 --> @Shadow243 commented on GitHub (Sep 30, 2024): > else > echo -e "${RED}Error during Composer installation.${NC}" > fi > > else > echo -e "${RED}Error: Not all requirements were met. 'composer install' was not executed.${NC}" > fi Sorry for this late reply @rr10 , I just tried but i have a composer error, so a suggestion came to me: instead of reporting the error could we instead give a choice: i.e. ask if we want to install composer or cancel the operation or continue like that ? here is the first answer during the first test <img width="1184" alt="Screenshot 2024-09-30 at 22 17 16" src="https://github.com/user-attachments/assets/6906f659-33d2-474b-af7e-a216846c993d"> I hade this error: `Installer corrupt` from `https://getcomposer.org/download/` when trying to install composer, but after changing allow_url_fopen from `Off` to `On` <img width="1195" alt="Screenshot 2024-09-30 at 22 37 42" src="https://github.com/user-attachments/assets/9e9a74f0-4735-4017-a167-424f8464994a">
Author
Owner

@Shadow243 commented on GitHub (Sep 30, 2024):

Check required extensions

REQUIRED_MODULES=("openssl" "mbstring" "curl")
for MODULE in "${REQUIRED_MODULES[@]}"; do
We're going to need to add more extensions to this list:

Screenshot 2024-09-30 at 22 51 16 Screenshot 2024-09-30 at 22 51 43
<!-- gh-comment-id:2384139113 --> @Shadow243 commented on GitHub (Sep 30, 2024): ># Check required extensions >REQUIRED_MODULES=("openssl" "mbstring" "curl") >for MODULE in "${REQUIRED_MODULES[@]}"; do We're going to need to add more extensions to this list: <img width="1195" alt="Screenshot 2024-09-30 at 22 51 16" src="https://github.com/user-attachments/assets/63536719-85d2-470a-9618-7ccd5700d699"> <img width="1195" alt="Screenshot 2024-09-30 at 22 51 43" src="https://github.com/user-attachments/assets/109dfdbb-8386-42e4-8975-b6c4bbcb1786">
Author
Owner

@rr10 commented on GitHub (Oct 5, 2024):

@Shadow243 All good, no worries! Feel free to modify the script as you see fit. Have you tested it on a cPanel account or another type of account? For cPanel, PHP extensions need to be installed using EA4. Keep in mind that not everyone has root access to the server, but many providers are usually willing to install PHP or Apache extensions if requested. If you don’t have access to a cPanel account, just let me know and I’ll be happy to assist you.
I believe it would be a good idea to create a specific script for cPanel, perhaps adding it to a repository so that it can be improved over time. Based on the cPanel script, it would then be possible to create scripts for other hosting platforms as well.

<!-- gh-comment-id:2395041483 --> @rr10 commented on GitHub (Oct 5, 2024): @Shadow243 All good, no worries! Feel free to modify the script as you see fit. Have you tested it on a cPanel account or another type of account? For cPanel, PHP extensions need to be installed using EA4. Keep in mind that not everyone has root access to the server, but many providers are usually willing to install PHP or Apache extensions if requested. If you don’t have access to a cPanel account, just let me know and I’ll be happy to assist you. I believe it would be a good idea to create a specific script for cPanel, perhaps adding it to a repository so that it can be improved over time. Based on the cPanel script, it would then be possible to create scripts for other hosting platforms as well.
Author
Owner

@rr10 commented on GitHub (Jan 21, 2025):

@Shadow243 Hi, are there any updates?

<!-- gh-comment-id:2605051967 --> @rr10 commented on GitHub (Jan 21, 2025): @Shadow243 Hi, are there any updates?
Author
Owner

@Shadow243 commented on GitHub (Jan 22, 2025):

@Shadow243 Hi, are there any updates?

@rr10 Hi, I’m working on a task that also requires testing with cPanel: https://github.com/cypht-org/cypht/pull/1196. I’ve planned an extensive test to cover everything, and I’m almost ready.

<!-- gh-comment-id:2607841698 --> @Shadow243 commented on GitHub (Jan 22, 2025): > [@Shadow243](https://github.com/Shadow243) Hi, are there any updates? @rr10 Hi, I’m working on a task that also requires testing with cPanel: https://github.com/cypht-org/cypht/pull/1196. I’ve planned an extensive test to cover everything, and I’m almost ready.
Author
Owner

@christer77 commented on GitHub (Mar 20, 2025):

Hi @rr10, @Shadow243

Cypht can actually be installed on cpanl as I did here: https://lab31.evoludata.com/

The important thing is to have access to the terminal of course,

  1. Place yourself on the root, i.e. in public_html.
  2. Clone cypht via git clone https://github.com/cypht-org/cypht.git
  3. A folder named cypht will be created on the root, so what I did for my case, I moved all the files and dosseirs from the cypht folder to my root folder which is public_html.
  4. Then run the compose install command
  5. Create a "hm3" folder in which you will create 3 other folders including "users", "attachments", "app_data"
  6. At the root, you rename the file ".env.example" to ".env", and then open that file
  7. Provide the necessary information for the following data(AUTH_TYPE, USER_SETTINGS_DIR, ATTACHMENT_DIR, CYPHT_MODULES)
    example:
    - AUTH_TYPE=DB
    - USER_SETTINGS_DIR=/home/departme/public_html/hm3/users
    - ATTACHMENT_DIR=/home/departme/public_html/hm3/attachments
    - APP_DATA_DIR=/home/departme/public_html/hm3/app_data
    - CYPHT_MODULES="core,contacts,local_contacts,carddav_contacts,profiles,imap_folders,ldap_contacts,gmail_contacts,feeds,jmap,imap,smtp,account,idle_timer,desktop_notifications,calendar,themes,nux,developer,sievefilters,api_login,recover_settings,hello_world,dynamic_login,inline_message,nasa,highlights,advanced_search,saved_searches,history,wordpress,recaptcha,github,tags,pgp,keyboard_shortcuts,site"

NB: AUTH_TYPE can be IMAP or DB, it depends on your needs.
If you are using IMAP, you will need to provide some 4 additional pieces of information, for example:
- IMAP_AUTH_SERVER=mail.postale.io
- IMAP_AUTH_PORT=993
- IMAP_AUTH_TLS=true
- IMAP_AUTH_SIEVE_CONF_HOST=tls://mail.postale.io

Normally with these few lines, your cypht is ready to use. If you still have problems, don't hesitate to provide them to us if needed, we can always share the screen to cypht community so that we can be more pragmatic.

Thank you.

<!-- gh-comment-id:2740196040 --> @christer77 commented on GitHub (Mar 20, 2025): Hi @rr10, @Shadow243 Cypht can actually be installed on cpanl as I did here: https://lab31.evoludata.com/ The important thing is to have access to the terminal of course, 1. Place yourself on the root, i.e. in `public_html`. 2. Clone cypht via `git clone https://github.com/cypht-org/cypht.git` 3. A folder named cypht will be created on the root, so what I did for my case, I moved all the files and dosseirs from the cypht folder to my root folder which is public_html. 4. Then run the `compose install` command 5. Create a "`hm3`" folder in which you will create 3 other folders including "`users`", "`attachments`", "`app_data`" 6. At the root, you rename the file "`.env.example`" to "`.env`", and then open that file 7. Provide the necessary information for the following data(`AUTH_TYPE, USER_SETTINGS_DIR, ATTACHMENT_DIR, CYPHT_MODULES`) example: - AUTH_TYPE=DB - USER_SETTINGS_DIR=/home/departme/public_html/hm3/users - ATTACHMENT_DIR=/home/departme/public_html/hm3/attachments - APP_DATA_DIR=/home/departme/public_html/hm3/app_data - CYPHT_MODULES="core,contacts,local_contacts,carddav_contacts,profiles,imap_folders,ldap_contacts,gmail_contacts,feeds,jmap,imap,smtp,account,idle_timer,desktop_notifications,calendar,themes,nux,developer,sievefilters,api_login,recover_settings,hello_world,dynamic_login,inline_message,nasa,highlights,advanced_search,saved_searches,history,wordpress,recaptcha,github,tags,pgp,keyboard_shortcuts,site" NB: AUTH_TYPE can be IMAP or DB, it depends on your needs. If you are using IMAP, you will need to provide some 4 additional pieces of information, for example: - IMAP_AUTH_SERVER=mail.postale.io - IMAP_AUTH_PORT=993 - IMAP_AUTH_TLS=true - IMAP_AUTH_SIEVE_CONF_HOST=tls://mail.postale.io Normally with these few lines, your cypht is ready to use. If you still have problems, don't hesitate to provide them to us if needed, we can always share the screen to [cypht community](https://gitter.im/cypht-org/community) so that we can be more pragmatic. Thank you.
Author
Owner

@Shadow243 commented on GitHub (Mar 20, 2025):

Hi @rr10, @Shadow243

Cypht can actually be installed on cpanl as I did here: https://lab31.evoludata.com/

The important thing is to have access to the terminal of course,

  1. Place yourself on the root, i.e. in public_html.
  2. Clone cypht via git clone https://github.com/cypht-org/cypht.git
  3. A folder named cypht will be created on the root, so what I did for my case, I moved all the files and dosseirs from the cypht folder to my root folder which is public_html.
  4. Then run the compose install command
  5. Create a "hm3" folder in which you will create 3 other folders including "users", "attachments", "app_data"
  6. At the root, you rename the file ".env.example" to ".env", and then open that file
  7. Provide the necessary information for the following data(AUTH_TYPE, USER_SETTINGS_DIR, ATTACHMENT_DIR, CYPHT_MODULES)
    example:
    - AUTH_TYPE=DB
    - USER_SETTINGS_DIR=/home/departme/public_html/hm3/users
    - ATTACHMENT_DIR=/home/departme/public_html/hm3/attachments
    - APP_DATA_DIR=/home/departme/public_html/hm3/app_data
    - CYPHT_MODULES="core,contacts,local_contacts,carddav_contacts,profiles,imap_folders,ldap_contacts,gmail_contacts,feeds,jmap,imap,smtp,account,idle_timer,desktop_notifications,calendar,themes,nux,developer,sievefilters,api_login,recover_settings,hello_world,dynamic_login,inline_message,nasa,highlights,advanced_search,saved_searches,history,wordpress,recaptcha,github,tags,pgp,keyboard_shortcuts,site"

NB: AUTH_TYPE can be IMAP or DB, it depends on your needs.
If you are using IMAP, you will need to provide some 4 additional pieces of information, for example:
- IMAP_AUTH_SERVER=mail.postale.io
- IMAP_AUTH_PORT=993
- IMAP_AUTH_TLS=true
- IMAP_AUTH_SIEVE_CONF_HOST=tls://mail.postale.io

Normally with these few lines, your cypht is ready to use. If you still have problems, don't hesitate to provide them to us if needed, we can always share the screen to cypht community so that we can be more pragmatic.

Thank you.

Thanks for the great work @christer77

Did you try to use a different folder at:

USER_SETTINGS_DIR=/home/departme/public_html/hm3/users

  • ATTACHMENT_DIR=/home/departme/public_html/hm3/attachments
  • APP_DATA_DIR=/home/departme/public_html/hm3/app_data

another that a public folder ? and rerun the command ? Also imagine you are on an mutual server you don't have root access

<!-- gh-comment-id:2740740077 --> @Shadow243 commented on GitHub (Mar 20, 2025): > Hi @rr10, @Shadow243 > > Cypht can actually be installed on cpanl as I did here: https://lab31.evoludata.com/ > > The important thing is to have access to the terminal of course, > 1. Place yourself on the root, i.e. in `public_html`. > 2. Clone cypht via `git clone https://github.com/cypht-org/cypht.git` > 3. A folder named cypht will be created on the root, so what I did for my case, I moved all the files and dosseirs from the cypht folder to my root folder which is public_html. > 4. Then run the `compose install` command > 5. Create a "`hm3`" folder in which you will create 3 other folders including "`users`", "`attachments`", "`app_data`" > 6. At the root, you rename the file "`.env.example`" to "`.env`", and then open that file > 7. Provide the necessary information for the following data(`AUTH_TYPE, USER_SETTINGS_DIR, ATTACHMENT_DIR, CYPHT_MODULES`) > example: > - AUTH_TYPE=DB > - USER_SETTINGS_DIR=/home/departme/public_html/hm3/users > - ATTACHMENT_DIR=/home/departme/public_html/hm3/attachments > - APP_DATA_DIR=/home/departme/public_html/hm3/app_data > - CYPHT_MODULES="core,contacts,local_contacts,carddav_contacts,profiles,imap_folders,ldap_contacts,gmail_contacts,feeds,jmap,imap,smtp,account,idle_timer,desktop_notifications,calendar,themes,nux,developer,sievefilters,api_login,recover_settings,hello_world,dynamic_login,inline_message,nasa,highlights,advanced_search,saved_searches,history,wordpress,recaptcha,github,tags,pgp,keyboard_shortcuts,site" > > NB: AUTH_TYPE can be IMAP or DB, it depends on your needs. > If you are using IMAP, you will need to provide some 4 additional pieces of information, for example: > - IMAP_AUTH_SERVER=mail.postale.io > - IMAP_AUTH_PORT=993 > - IMAP_AUTH_TLS=true > - IMAP_AUTH_SIEVE_CONF_HOST=tls://mail.postale.io > > Normally with these few lines, your cypht is ready to use. If you still have problems, don't hesitate to provide them to us if needed, we can always share the screen to [cypht community](https://gitter.im/cypht-org/community) so that we can be more pragmatic. > > Thank you. Thanks for the great work @christer77 Did you try to use a different folder at: USER_SETTINGS_DIR=/home/departme/public_html/hm3/users - ATTACHMENT_DIR=/home/departme/public_html/hm3/attachments - APP_DATA_DIR=/home/departme/public_html/hm3/app_data another that a public folder ? and rerun the command ? Also imagine you are on an mutual server you don't have root access
Author
Owner

@christer77 commented on GitHub (Mar 20, 2025):

Hi @rr10, @Shadow243
Cypht can actually be installed on cpanl as I did here: https://lab31.evoludata.com/
The important thing is to have access to the terminal of course,

  1. Place yourself on the root, i.e. in .public_html
  2. Clone cypht via git clone https://github.com/cypht-org/cypht.git
  3. A folder named cypht will be created on the root, so what I did for my case, I moved all the files and dosseirs from the cypht folder to my root folder which is public_html.
  4. Then run the commandcompose install
  5. Create a "" folder in which you will create 3 other folders including "", "", "hm3``users``attachments``app_data"
  6. At the root, you rename the file "" to "", and then open that file.env.example``.env
  7. Provide the necessary information for the following data()
    example:
    • AUTH_TYPE=DB
    • USER_SETTINGS_DIR=/home/departme/public_html/hm3/users
    • ATTACHMENT_DIR=/home/departme/public_html/hm3/attachments
    • APP_DATA_DIR=/home/departme/public_html/hm3/app_data
    • CYPHT_MODULES="core,contacts,local_contacts,carddav_contacts,profiles,imap_folders,ldap_contacts,gmail_contacts,feeds,jmap,imap,smtp,account,idle_timer,desktop_notifications,calendar,themes,nux,developer,sievefilters,api_login,recover_settings,hello_world,dynamic_login,inline_message,nasa,highlights,advanced_search,saved_searches,history,wordpress,recaptcha,github,tags,pgp,keyboard_shortcuts,site"AUTH_TYPE, USER_SETTINGS_DIR, ATTACHMENT_DIR, CYPHT_MODULES

NB: AUTH_TYPE can be IMAP or DB, it depends on your needs.
If you are using IMAP, you will need to provide some 4 additional pieces of information, for example:

  • IMAP_AUTH_SERVER=mail.postale.io
  • IMAP_AUTH_PORT=993
  • IMAP_AUTH_TLS=true
  • IMAP_AUTH_SIEVE_CONF_HOST=tls://mail.postale.io
    Normally with these few lines, your cypht is ready to use. If you still have problems, don't hesitate to provide them to us if needed, we can always share the screen to cypht community so that we can be more pragmatic.
    Thank you.

Thanks for the great work @christer77

Did you try to use a different folder at:

USER_SETTINGS_DIR=/home/departme/public_html/hm3/users

  • ATTACHMENT_DIR=/home/departme/public_html/hm3/attachments
  • APP_DATA_DIR=/home/departme/public_html/hm3/app_data

another that a public folder ? and rerun the command ? Also imagine you are on an mutual server you don't have root access

Exactly that's the case here.

<!-- gh-comment-id:2740766007 --> @christer77 commented on GitHub (Mar 20, 2025): > > Hi [@rr10](https://github.com/rr10), [@Shadow243](https://github.com/Shadow243) > > Cypht can actually be installed on cpanl as I did here: https://lab31.evoludata.com/ > > The important thing is to have access to the terminal of course, > > > > 1. Place yourself on the root, i.e. in .`public_html` > > 2. Clone cypht via `git clone https://github.com/cypht-org/cypht.git` > > 3. A folder named cypht will be created on the root, so what I did for my case, I moved all the files and dosseirs from the cypht folder to my root folder which is public_html. > > 4. Then run the command`compose install` > > 5. Create a "" folder in which you will create 3 other folders including "", "", "`hm3``users``attachments``app_data`" > > 6. At the root, you rename the file "" to "", and then open that file`.env.example``.env` > > 7. Provide the necessary information for the following data() > > example: > > - AUTH_TYPE=DB > > - USER_SETTINGS_DIR=/home/departme/public_html/hm3/users > > - ATTACHMENT_DIR=/home/departme/public_html/hm3/attachments > > - APP_DATA_DIR=/home/departme/public_html/hm3/app_data > > - CYPHT_MODULES="core,contacts,local_contacts,carddav_contacts,profiles,imap_folders,ldap_contacts,gmail_contacts,feeds,jmap,imap,smtp,account,idle_timer,desktop_notifications,calendar,themes,nux,developer,sievefilters,api_login,recover_settings,hello_world,dynamic_login,inline_message,nasa,highlights,advanced_search,saved_searches,history,wordpress,recaptcha,github,tags,pgp,keyboard_shortcuts,site"`AUTH_TYPE, USER_SETTINGS_DIR, ATTACHMENT_DIR, CYPHT_MODULES` > > > > NB: AUTH_TYPE can be IMAP or DB, it depends on your needs. > > If you are using IMAP, you will need to provide some 4 additional pieces of information, for example: > > - IMAP_AUTH_SERVER=mail.postale.io > > - IMAP_AUTH_PORT=993 > > - IMAP_AUTH_TLS=true > > - IMAP_AUTH_SIEVE_CONF_HOST=tls://mail.postale.io > > Normally with these few lines, your cypht is ready to use. If you still have problems, don't hesitate to provide them to us if needed, we can always share the screen to [cypht community](https://gitter.im/cypht-org/community) so that we can be more pragmatic. > > Thank you. > > Thanks for the great work [@christer77](https://github.com/christer77) > > Did you try to use a different folder at: > > USER_SETTINGS_DIR=/home/departme/public_html/hm3/users > > * ATTACHMENT_DIR=/home/departme/public_html/hm3/attachments > * APP_DATA_DIR=/home/departme/public_html/hm3/app_data > > another that a public folder ? and rerun the command ? Also imagine you are on an mutual server you don't have root access Exactly that's the case here.
Author
Owner

@Shadow243 commented on GitHub (Mar 20, 2025):

Exactly that's the case here.

What are the prerequisites? Because if you don't have root access you can't do the sudo command.

And if you give a different path than public_html you must have the required rights.

<!-- gh-comment-id:2740844964 --> @Shadow243 commented on GitHub (Mar 20, 2025): > Exactly that's the case here. What are the prerequisites? Because if you don't have root access you can't do the sudo command. And if you give a different path than public_html you must have the required rights.
Author
Owner

@christer77 commented on GitHub (Mar 20, 2025):

Exactly that's the case here.

What are the prerequisites? Because if you don't have root access you can't do the sudo command.

And if you give a different path than public_html you must have the required rights.

So you don't necessarily need root access to create a folder in the public_html folder.
Here is an example:
Make sure you have access to your file manager and that you are positioned in public_html.
Then click on point 1, provide the name "hm3" as shown in point 2, and finally, click on the create New folder button as shown in point 3.

Image

Once this is done, you will only have to access your terminal and type the command find ~ -type d -name "hm3";
Surely you will have the result like /home/..../public_html/hm3. And it is this path that should be put at the level of USER_SETTINGS_DIR, ATTACHMENT_DIR, APP_DATA_DIR

<!-- gh-comment-id:2740970715 --> @christer77 commented on GitHub (Mar 20, 2025): > > Exactly that's the case here. > > What are the prerequisites? Because if you don't have root access you can't do the sudo command. > > And if you give a different path than public_html you must have the required rights. So you don't necessarily need root access to create a folder in the public_html folder. Here is an example: Make sure you have access to your file manager and that you are positioned in public_html. Then click on `point 1`, provide the name `"hm3"` as shown in `point 2`, and finally, click on the `create New folder button` as shown in `point 3`. ![Image](https://github.com/user-attachments/assets/9e760369-af96-4455-bb5a-9b0922910dbc) Once this is done, you will only have to access your terminal and type the command `find ~ -type d -name "hm3"`; Surely you will have the result like `/home/..../public_html/hm3`. And it is this path that should be put at the level of USER_SETTINGS_DIR, ATTACHMENT_DIR, APP_DATA_DIR
Author
Owner

@Shadow243 commented on GitHub (Mar 20, 2025):

So you don't necessarily need root access to create a folder in the public_html folder.

I know that. But what I'm referring to is not creating these folders in public_html but rather in a location other than there. Ex: /usr/bin/cypht

remember we have this command:

sudo mkdir -p /var/lib/hm3/{attachments,users,app_data}
sudo chown -R www-data /var/lib/hm3/

at https://www.cypht.org/install/

<!-- gh-comment-id:2741003484 --> @Shadow243 commented on GitHub (Mar 20, 2025): > So you don't necessarily need root access to create a folder in the public_html folder. I know that. But what I'm referring to is not creating these folders in public_html but rather in a location other than there. Ex: /usr/bin/cypht remember we have this command: ``` sudo mkdir -p /var/lib/hm3/{attachments,users,app_data} sudo chown -R www-data /var/lib/hm3/ ``` at https://www.cypht.org/install/
Author
Owner

@Shadow243 commented on GitHub (Mar 20, 2025):

So you don't necessarily need root access to create a folder in the public_html folder.

I know that. But what I'm referring to is not creating these folders in public_html but rather in a location other than there. Ex: /usr/bin/cypht

remember we have this command:

sudo mkdir -p /var/lib/hm3/{attachments,users,app_data}
sudo chown -R www-data /var/lib/hm3/

at https://www.cypht.org/install/

@christer77 I want to understand the limits we can allow ourselves when using cPanel and document everything accordingly.

<!-- gh-comment-id:2741019610 --> @Shadow243 commented on GitHub (Mar 20, 2025): > > So you don't necessarily need root access to create a folder in the public_html folder. > > I know that. But what I'm referring to is not creating these folders in public_html but rather in a location other than there. Ex: /usr/bin/cypht > > remember we have this command: > > ``` > sudo mkdir -p /var/lib/hm3/{attachments,users,app_data} > sudo chown -R www-data /var/lib/hm3/ > ``` > > at https://www.cypht.org/install/ @christer77 I want to understand the limits we can allow ourselves when using cPanel and document everything accordingly.
Author
Owner

@christer77 commented on GitHub (Mar 20, 2025):

Great!

Testing is still ongoing. If we encounter any issues, we'll be sure to share them.

Thank you @Shadow243

<!-- gh-comment-id:2741052932 --> @christer77 commented on GitHub (Mar 20, 2025): Great! Testing is still ongoing. If we encounter any issues, we'll be sure to share them. Thank you @Shadow243
Author
Owner

@Shadow243 commented on GitHub (Mar 20, 2025):

super @christer77

The final goal is to fix this script (https://github.com/cypht-org/cypht/issues/1154#issuecomment-2282192357) if necessary to make it work.

<!-- gh-comment-id:2741098383 --> @Shadow243 commented on GitHub (Mar 20, 2025): super @christer77 The final goal is to fix this script (https://github.com/cypht-org/cypht/issues/1154#issuecomment-2282192357) if necessary to make it work.
Author
Owner

@christer77 commented on GitHub (Apr 24, 2025):

Hello @kroky

Given the difficulty we have in accessing the var/lib/ folder due to the limited access rights to a cPanel account,
We thought of creating the 2 folders (hm3/users and hm3/attachments) on the root of the cPanel account in public_html/hm3 instead of var/lib/.

What would be the security issue on this decision please?

<!-- gh-comment-id:2826749198 --> @christer77 commented on GitHub (Apr 24, 2025): Hello @kroky Given the difficulty we have in accessing the `var/lib/` folder due to the limited access rights to a cPanel account, We thought of creating the 2 folders (`hm3/users` and `hm3/attachments`) on the root of the cPanel account in `public_html/hm3` instead of `var/lib/`. What would be the security issue on this decision please?
Author
Owner

@marclaporte commented on GitHub (Apr 24, 2025):

/home/abc/public_html/hm3/attachments is risky because if there is a misconfiguration, data is visible by anonymous at example.org/hm3/attachments. So the attachments of your private emails can end up indexed by search engines (Google, Bing, Brave, etc.)

/home/abc/public_html/ The Cypht code can go here. Ideally with no data.

And data folders should go somewhere user has permissions but it not accessible to browsers. Ex.:
/home/abc/hm3/users
/home/abc/hm3/attachments

<!-- gh-comment-id:2827203503 --> @marclaporte commented on GitHub (Apr 24, 2025): /home/abc/public_html/hm3/attachments is risky because if there is a misconfiguration, data is visible by anonymous at example.org/hm3/attachments. So the attachments of your private emails can end up indexed by search engines (Google, Bing, Brave, etc.) /home/abc/public_html/ The Cypht code can go here. Ideally with no data. And data folders should go somewhere user has permissions but it not accessible to browsers. Ex.: /home/abc/hm3/users /home/abc/hm3/attachments
Author
Owner

@christer77 commented on GitHub (Apr 24, 2025):

/home/abc/public_html/hm3/attachments is risky because if there is a misconfiguration, data is visible by anonymous at example.org/hm3/attachments. So the attachments of your private emails can end up indexed by search engines (Google, Bing, Brave, etc.)

/home/abc/public_html/ The Cypht code can go here. Ideally with no data.

And data folders should go somewhere user has permissions but it not accessible to browsers. Ex.: /home/abc/hm3/users /home/abc/hm3/attachments

Great,

I'm checking the feasibility against your suggestion.

Thank you @marclaporte

<!-- gh-comment-id:2827230737 --> @christer77 commented on GitHub (Apr 24, 2025): > /home/abc/public_html/hm3/attachments is risky because if there is a misconfiguration, data is visible by anonymous at example.org/hm3/attachments. So the attachments of your private emails can end up indexed by search engines (Google, Bing, Brave, etc.) > > /home/abc/public_html/ The Cypht code can go here. Ideally with no data. > > And data folders should go somewhere user has permissions but it not accessible to browsers. Ex.: /home/abc/hm3/users /home/abc/hm3/attachments Great, I'm checking the feasibility against your suggestion. Thank you @marclaporte
Author
Owner

@christer77 commented on GitHub (May 28, 2025):

hello @Shadow243, @rr10, @marclaporte

Can you confirm this resolution and close this issue if necessary please.

<!-- gh-comment-id:2916780458 --> @christer77 commented on GitHub (May 28, 2025): hello @Shadow243, @rr10, @marclaporte Can you confirm this [resolution ](https://github.com/cypht-org/cypht-website/pull/120) and close this issue if necessary please.
Author
Owner

@christer77 commented on GitHub (Jul 7, 2025):

Hello @rr10

we are closing this discussion, please reopen it for us if the issue is still occurring.

Here resolution

<!-- gh-comment-id:3043858148 --> @christer77 commented on GitHub (Jul 7, 2025): Hello @rr10 we are closing this discussion, please reopen it for us if the issue is still occurring. [Here resolution](https://github.com/cypht-org/cypht-website/pull/120)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/cypht#588
No description provided.