S
S
Sergei Voznesensky2017-10-02 10:38:56
ubuntu
Sergei Voznesensky, 2017-10-02 10:38:56

How to properly set up a server on Ubuntu to back up files with rights inheritance?

Good day. Please help me with my backup.
There is a Windows Server 2008 file server. Several shared resources have been created on it, with a huge number of folders and files, with various access rights for domain users.
There is an Ubuntu 17 server. The Samba service is up on it. A network share has been configured. This server is supposed to be used as a backup repository. The server is joined to a domain.
All necessary folders and files are copied from under Windows Server 2008 using the Robocopy utility
Copy command: robocopy "path_from" "path_to" /SEC /Z /V /TS /FP /NP /LOG+:"path_to_log"
And everything would be fine, but the inheritance of the rights of copied files and folders does not occur. And this is very important, since the access list for different files is very different. Somewhere 3 users, somewhere 10. All rights to files and folders are reset to inherited rights from a network resource.
I can not correctly configure the network resource. I have read a lot of information. Either it does not reach me, or Samba does not have such an opportunity at all.
Samba config:
[global]
workgroup = DOMAIN
realm = DOMAIN.LOCAL
security = ADS
encrypt passwords = true
dns proxy = no
socket options = IPTOS_LOWDELAY TCP_NODELAY SO_KEEPALIVE SO_SNDBUF=262144 SO_RCVBUF=131072
domain master = no
local master = no
preferred master = no
os level = 0
domain logons = no
load printers = no
show add printer wizard = no
printcap name = /dev/null
disable spoolss = yes
log file = /var/log/samba/log.%m
max log size = 1000
syslog = 0
panic action = /usr/share/samba/panic-action %d
obey pam restrictions = yes
unix password sync = yes
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\s *\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully*.
pam password change = yes
guest account = nobody
map to guest = bad user
idmap config * : range = 16777216-33554431
winbind enum groups = yes
winbind enum users = yes
winbind use default domain = yes
template shell = /bin/bash
winbind refresh tickets = yes
map acl inherit = yes
nt acl support = yes
acl compatibility = auto
store dos attributes = yes
map archive = no
map system = no
map hidden = no.
map readonly = no
[Test_Backup]
comment = Test folder for backups
path = /mnt/Test_Backup/
admin users = "DOMAIN\Domain Admins"
read list = "DOMAIN\Domain Users"
write list = "DOMAIN\Domain Admins"
hide unreadable = no
read only = no
create mask = 0660
directory mask = 0770
locking = no
vfs objects = acl_xattr
acl map full control = false
inherit acls = no
inherit owner = no
inherit permissions = no
map acl inherit = yes
acl group control = true
enable privileges = yes Filesystem
mounted:
/dev/sdb /mnt/Test_Backup ext4 defaults,noexec,acl,user_xattr 0 2 nsswitch.conf
file:
passwd: compat winbind
group: compat winbind
Commands wbinfo -u, wbinfo -g work fine showing groups and names of domain users.
If you open a network folder on the Ubuntu server, create any other folder in it and change its rights, then everything works without problems. Any domain user can be added. Inheritance inside also works without problems.
I don't know what to do next. Please help.
Thank you.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
J
just_hank_moody, 2017-10-09
@just_hank_moody

Have you tried adding files to the archive first, and then copying them to the ubuntu server? Perhaps with a simple copy, access rights labels are not transferred. The archive in theory should preserve this.

S
Sergey Voznesensky, 2017-10-26
@lifaer

Managed in part in a bad way. On folders with heaps of rights included inheritance. The file on the backup server remains without permissions. And after copying it into place, it inherits all the necessary rights. Only files with unique permissions inside the inherited folder are excluded.
But it's better than nothing.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question