Highlighted
8 Krypton

Cloning Windows/Unix permissions from one file to another file

The other day, as part of a migration process, a user somehow managed to remove permissions for a whole mess of files on an Isilon SMB share.  The windows admins didn't haver permissions to access the files since it had zero permissions whatsoever.  I started to use setfacl and getfacl to clone the ACL permissions,  but getting setfacl to work with stdin wasn't cooperating (and it's deprecated) so i did what it is I do - wrote a perl script.

You pass it two arguments, <source> and <target> and it clones the unix and windows permissions from one to the other. It's a nice tool to have in our toolbox,  if you're interested you can download it on my blog here.

Mark

0 Kudos
16 Replies
8 Krypton

Re: Cloning Windows/Unix permissions from one file to another file

this is very useful, if i get locked out i reset SMB directory owner using chown -R -s DOMAIN\\username

0 Kudos
8 Krypton

Re: Cloning Windows/Unix permissions from one file to another file

What is the -s option?

0 Kudos
8 Krypton

Re: Cloning Windows/Unix permissions from one file to another file

they way i understand it you have to use -s whenever you specify domain account, if were to specify uid for that account i would not have to use -s

0 Kudos
8 Krypton

Re: Cloning Windows/Unix permissions from one file to another file

I do chmod without -s using domain users all the time,  I just put it in double quotes...

chown "domain\cincystorage" file  works..  at least on my 6.5.5.11 vm

0 Kudos
8 Krypton

Re: Cloning Windows/Unix permissions from one file to another file

does not work for me

isilon1-2# chown -R "MYDOMAIN\\dynamox" NewFolder

WARNING: 'MYDOMAIN\\dynamox' is a special identity.  It is recommended to use the -s flag when setting a special identity.  See chown(1) for more information.

0 Kudos
8 Krypton

Re: Cloning Windows/Unix permissions from one file to another file

What version are you running.  Did it happen to actually work and just throw a warning?

0 Kudos
8 Krypton

Re: Cloning Windows/Unix permissions from one file to another file

6.5.5.12 ..it does not change owner, i have to add -s

0 Kudos
8 Krypton

Re: Cloning Windows/Unix permissions from one file to another file

isilon-1# ls -als cp_perms.zip

26 -rwxrwx--x +  1 DOMAIN\cincystorage DOMAIN\cincygroup  1095 Mar 20 23:19 cp_perms.zip

isilon-1# chown "DOMAIN\notmark" cp_perms.zip

isilon-1# ls -als cp_perms.zip

50 -rwxrwx--x +  1 DOMAIN\notmarkDOMAIN\cincygroup  1095 Mar 20 23:19 cp_perms.zip

isilon-1#

I'm at 6.5.5.11 at the moment...  Strange!

0 Kudos
8 Krypton

Re: Cloning Windows/Unix permissions from one file to another file

You cannot change the Dynamox entity! You of all people should know that!

0 Kudos