Need Help Error When Creating Backup

triharda

Verified User
Joined
Oct 6, 2019
Messages
13
Location
Indonesia
Need Help Error When Creating Backup with error message:

Code:
Error Compressing the backup file backup-Apr-12-2020-1.tar.gz : /bin/tar: imap/mydomain.com/server: Cannot open: Permission denied
/bin/tar: imap/mydomain.com/budiharyono: Cannot open: Permission denied
/bin/tar: imap/mydomain.com/ljpki: Cannot open: Permission denied
/bin/tar: imap/mydomain.com/support: Cannot open: Permission denied
/bin/tar: Exiting with failure status due to previous errors

Please help :(
 
Try this:
Code:
cd /usr/local/directadmin/scripts
./set_permissions.sh domaindir domain.com

If you need this for everybody use:
Code:
./set_permissions.sh all

This should take care permissions are correct again, try backup again afterwards.[/code]
 
Try this:
Code:
cd /usr/local/directadmin/scripts
./set_permissions.sh domaindir domain.com

If you need this for everybody use:
Code:
./set_permissions.sh all

Code:
This should take care permissions are correct again, try backup again afterwards.

I try this already but still getting error and I can't login to roundcube or squaremail with error message

Code:
ERROR: Connection dropped by IMAP server.
Query: LOGOUT
 
What is logged in /var/www/html/roundcube/logs/errors.log when you attempt to log in ?

Did the permissions fix script complete without error?
 
What is the permissions and ownerships on those directories?
Code:
ls -lah imap/mydomain.com/ | grep "budiharyono\|ljpki\|support"
 
What is the permissions and ownerships on those directories?
Code:
ls -lah imap/mydomain.com/ | grep "budiharyono\|ljpki\|support"

I try this

Code:
ls -lah imap/mydomain.com/ | grep "ljpki\|support"

result

Code:
drwxrwx---. 3 mydomain mail 4.0K Apr  4 12:06 ljpki
drwxrwx---. 3 mydomain mail 4.0K Apr  4 12:06 support

Screenshot_58.jpg
 
Also, do you have any pertinent Imap -Backup configurations set in the directadmin conf?

Code:
 /usr/local/directadmin/directadmin c | grep imap
 
Also, do you have any pertinent Imap -Backup configurations set in the directadmin conf?

Code:
 /usr/local/directadmin/directadmin c | grep imap

Code:
[root@host ~]#  /usr/local/directadmin/directadmin c | grep imap
skip_imap_in_backups=0
direct_imap_backup=1

any something wrong with that?

anyway thanks for your help... :)
 
Code:
[root@host ~]#  /usr/local/directadmin/directadmin c | grep imap
skip_imap_in_backups=0
direct_imap_backup=1
Those are the same settings I have, my permissions are almost the same as yours, but my ownership is set to user.user rather than user.mail. Are you running SElinux? There is a period at the end of the permissions in yours that is lacking in mine.

[root@host admin]# ll /home/admin/imap/domain.tld/
total 4
drwxrwx--- 2 admin admin 4096 Oct 13 2019 username
[root@host admin]#
 
here is my CB option

Code:
#PHP Settings
php1_release=7.3
php1_mode=mod_php
php2_release=no
php2_mode=php-fpm
php3_release=no
php3_mode=php-fpm
php4_release=no
php4_mode=php-fpm
secure_php=yes
php_ini=no
php_timezone=UTC
php_ini_type=production
x_mail_header=yes

#MySQL Settings
mysql=5.7
mariadb=10.4
mysql_inst=mariadb
mysql_backup=yes
mysql_backup_gzip=no
mysql_backup_dir=/usr/local/directadmin/custombuild/mysql_backups
mysql_force_compile=no

#WEB Server Settings
unit=no
webserver=apache
http_methods=ALL
litespeed_serialno=trial
modsecurity=no
modsecurity_ruleset=comodo
apache_ver=2.4
apache_mpm=auto
mod_ruid2=yes
userdir_access=no
harden_symlinks_patch=yes
use_hostname_for_alias=no
redirect_host=host.itcomindo.com
redirect_host_https=no

#WEB Applications Settings
phpmyadmin=yes
phpmyadmin_public=no
phpmyadmin_ver=5
squirrelmail=yes
roundcube=yes
webapps_inbox_prefix=no

#ClamAV-related Settings
clamav=no
clamav_exim=yes
modsecurity_uploadscan=no
proftpd_uploadscan=no
pureftpd_uploadscan=no
suhosin_php_uploadscan=no

#Mail Settings
exim=yes
eximconf=yes
eximconf_release=4.5
blockcracking=no
easy_spam_fighter=no
spamd=no
sa_update=daily
dovecot=yes
dovecot_conf=yes
mail_compress=no
pigeonhole=no

#FTP Settings
ftpd=pureftpd

#Statistics Settings
awstats=no
webalizer=no

#PHP Extension Settings
#CustomBuild Settings
custombuild=2.0
custombuild_plugin=yes
autover=no
bold=yes
clean=yes
cleanapache=yes
clean_old_tarballs=yes
clean_old_webapps=yes
downloadserver=files8.directadmin.com

#Cronjob Settings
cron=yes
cron_frequency=daily
[email protected]
notifications=no
da_autoupdate=no
updates=no
webapps_updates=no

#CloudLinux Settings
cloudlinux=no
cloudlinux_beta=no
cagefs=no

#Advanced Settings
autoconf=yes
automake=yes
libtool=yes
curl=yes
new_pcre=yes
ssl_configuration=intermediate

#PHP extensions can be found in php_extensions.conf

thanks so much
 
Does the error affect all email accounts in the particular domain? If so, it could be an issue with the ownership and/or permissions of a parent directory.

Here are mine for reference:
Code:
[root@host admin]# ll /home/admin/imap/
total 20
drwxrwx--- 3 admin admin 4096 Oct 13  2019 domain.tld
[root@host admin]# ll /home/admin/ | grep imap
drwxrwx---  7 admin admin       4096 Oct 13  2019 imap
[root@host admin]#

When you create a new email account, is it created with user.mail ownership or user.user ownership? Does running the backup give the same error for the support directory if you set support directory to user.user ownership instead of user.mail?
 
I understand. I just ran a test backup in my server and it completed successfully, so I'd suggest 1) noting the permissions and ownerships you had set previously, and then 2) changing them to match mine, and 3) running a test backup to see if those errors persist.

I'd advise checking the parent directories permissions/ownerships, too. I've provided mine above.

If that doesn't work, I'll keep digging, but hopefully at that point, someone smarter than I could chime in. ?
 
Back
Top