LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 02-16-2024, 07:10 PM   #1
mfoley
Senior Member
 
Registered: Oct 2008
Location: Columbus, Ohio USA
Distribution: Slackware
Posts: 2,559

Rep: Reputation: 177Reputation: 177
Not restoring Extended Attributes on Samba share


I may have a serious problem. I have a Linux host Samba sharing a directory for use by Windows workstations. Relevant smb.conf:
Code:
[Users]
    path = /redirectedFolders/Users
    comment = user folders for redirection
    read only = No
THese folders all had extended attributes, signified by the '+':
Code:
drwxrwx---+  6 BUILTIN\administrators users 4096 2024-02-08 21:07 Administrator/
:
drwxr-xr-x+ 32 HPRS\mark              users 4096 2023-03-30 06:13 mark/
drwxrwx---+  5 HPRS\esi               users 4096 2022-05-04 18:13 esi/
I backed up this drive and restored it to a new computer. I also backed up attr's and facl's:
Code:
getfattr -dR /redirectedFolders /var/lib/samba/sysvol /var/lib/samba/share >/backupATTR.txt
getfacl -R /var/lib/samba/sysvol /var/lib/samba/share > /backupACL.txt
On the restored-to system, I restored these:
Code:
# cd /
# setfattr --restore=backupATTR.txt
# setfacl --restore=/backupACL.txt
I got no errors except on setfattr on e.g. "$RECYCLE.BIN: No such file or directory", because I didn't back up the $RECYCLE bins.

Problem: this did not set the attributes on the target files/directories:
Code:
drwxrwx---  6 BUILTIN\administrators users 4096 2024-02-08 21:07 Administrator/
:
drwxr-xr-x 31 HPRS\mark              users 4096 2023-03-30 06:13 mark/
drwxrwx---  5 HPRS\esi               users 4096 2022-05-04 18:13 esi/
What did I do wrong? How can I fix this? I still have access to the backup source files/directories if I need to redo something.

I need to figure out a solution before the workers get back on Monday or I'll have to put the old machine back online.

Last edited by mfoley; 02-16-2024 at 07:13 PM.
 
Old 02-16-2024, 10:35 PM   #2
mfoley
Senior Member
 
Registered: Oct 2008
Location: Columbus, Ohio USA
Distribution: Slackware
Posts: 2,559

Original Poster
Rep: Reputation: 177Reputation: 177
Solved! As it turns out, I didn't back up the acls for that directory. When I looked at my backup script again I saw that the acl backup for redirectedFolders was commented out. I did that over a year ago because the Slackare 14.2, [get|set]facl 2.2.52 could not restore acls properly. I posted a thread on this back then: https://www.linuxquestions.org/quest...ent-4175721430. No one had a solution, so I commented out the acl backup until I found a fix.

The current [get|set]facl 2.3.1 works, so I snagged the acls off the original system, restored them on the new system and voila! All is well.
 
  


Reply

Tags
acl, attr, restore, setting



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Extended attributes are not ported on YFFS2 fileuploadoct08 Linux - Software 2 03-27-2009 02:11 PM
extended attributes are not ported on YFFS2 fileuploadoct08 Linux - Kernel 2 03-27-2009 02:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 05:45 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration