Jump to content

Mah1973

Priority Members
  • Last visited

  • Posts

    32
  • Reputation

    2

Everything posted by Mah1973

  1. I ended up using cwp api to fix the permissions. Much safer and low footprint on the cpu / rams. I created 2 scripts to accomplish the task for all users on the server. Here is a one line command to create the 2 scripts along with required permissions and code. echo -e '#!/bin/bash\n\n# Path to the script that lists the usernames\nUSERS_SCRIPT="/root/myscripts/list_users_only"\n\n# CWP API command to fix permissions for a user\nFIX_PERMS_COMMAND="/scripts/cwp_api account fix_perms"\n\n# Loop through each username and fix permissions\nwhile read -r username; do\n echo "Fixing permissions for user: $username"\n $FIX_PERMS_COMMAND $username\ndone < <($USERS_SCRIPT)\n\necho "Permissions fixed for all users"' > fix_permissions_allusers.sh && echo -e '#!/bin/sh\n#\n##################################\n# CentOS Web Panel SCRIPT'\''s\n###################################\n\nmysql root_cwp -B -N -s -e "SELECT username FROM user" | while read -r line\ndo\n echo "$line"\ndone' > list_users_only && chmod +x fix_permissions_allusers.sh list_users_only Don't forget to create the folder myscripts first. mkdir /root/myscripts && cd /root/myscripts then fire the one line command I shared to create the scripts. You can simply run it using : ./fix_permissions_allusers.sh or create cron every hour 10 * * * * /root/myscripts/fix_permissions_allusers.sh
  2. Wow , first time to know that cxs is not working on half of my servers !!!!! Just tested it with fake virus and if the permissions is not 755 cxs is just not working !. Thank you man for this great tip. But I'm afraid that running chmod 755 /home/*/* will break some functions for my users ? I guess it's much safer approach to run this instead ? find /home/*/ -maxdepth 1 -type d -exec chmod 755 {} \; let me know what do you think ?
  3. Can I change the version to 2.4.59 in the script and use it as is ?
  4. Had to remove both depends on mariadb_bin depends on mariadb_init and now it's working good. Thank you for the great help!
  5. Now monit won't start at all. running sudo monit -t get this Depending service 'mariadb_init' is not defined in the control file
  6. Tried this on one of my servers and the upgrade went smoothly but monit monitoring doesn't seem to pick it up. I always get : Process - mysql Execution failed | Does not exist reloading / restarting / unmonitor and remonitor didn't help. Maybe we need to update the contents of File: /etc/monit.d/cwp.mysql somehow ?