Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Toc no bullet

Overview

When you attempt to perform a backup to a Common Internet File System (CIFS)-mounted drive, you may receive errors that resemble the following example:

Code Block
/bin/cp: failed to preserve ownership for `': Permission denied /bin/cp: failed to preserve ownership for `': Permission denied

These permission denied errors may result from missing extended attributes on the CIFS-mounted drive. This document describes how to resolve these permission denied errors.

Resolve the error

To resolve the permission denied errors for the CIFS-mounted drive, perform the following steps: 

  1. Edit the /etc/fstab file so that the CIFS-mounted drive uses the user_xattr option. This will resemble the following example:

    Warning
    titleImportant:

    We strongly recommend that you store your CIFS-mounted drive's access credentials in a separate, secure file.


    Code Block
    languagetext
    linenumberstrue
    /dev/mapper/centos_centos--7--clone-root /                       xfs     defaults        1 1
    UUID=01c6e08e-bbd1-4046-af48-beaf233746d4 /boot                   xfs     defaults        1 2
    /dev/mapper/centos_centos--7--clone-swap swap                    swap    defaults        0 0
    //192.0.2.0/mybackup /user_xattr cifs user,uid=500,rw,suid, credentials=/root/.cifs 0 0


    Note
    titleNote:

    In this example, line 4 displays the CIFS-mounted drive entry.

    • The local user owns the mounted files.
    • The CIFS drive's access credentials reside in the /root/.cifs file.


  2. Run the remount mount command to remount the CIFS-mounted drive.
  3. Run the lsattr /CIFS_mount command to add the extended attributes.

    Warning
    titleImportant:

    The mount does not support extended attributes if the lsattr /CIFS_mount command returns the following error:

    Code Block
    |Error means not available: lsattr: Inappropriate ioctl for device While reading flags on ...|

    A mount that does not support extended attributes will not function with cPanel & WHM backups.


For more information about CIFS, read our Backup Configuration documentation.

Additional documentation

Localtab Group


Localtab
activetrue
titleSuggested documentation

Content by Label
showLabelsfalse
max5
showSpacefalse
cqllabel in ("backups","howto") and label = "whm" and space = currentSpace()


Localtab
titleFor cPanel users

Content by Label
showLabelsfalse
max5
showSpacefalse
cqllabel in ("backups","howto") and label = "cpanel" and space = "74Docs"


Localtab
titleFor WHM users

Content by Label
showLabelsfalse
max5
showSpacefalse
cqllabel in ("backups","howto") and label = "whm" and space = "74Docs"


Localtab
titleFor developers

Content by Label
showLabelsfalse
max5
showSpacefalse
cqllabel = "backups" and space = "DD"