Register
It is currently Tue Jul 22, 2014 5:02 pm

copy all permissions from A to B


All times are UTC - 6 hours


Post new topic Reply to topic  [ 5 posts ] 
Author Message
 PostPosted: Sat Jan 27, 2007 11:57 am   

Joined: Sat Jan 27, 2007 11:43 am
Posts: 6
I need a script to copy all permissions from fle A to file B so that:
1) ls -l A = ls -l B
2) getfacl A = getfacl B
(including only perms, owner and groups)

The problem is in that getfacl A| setfacl B doesn't copy sticky bits


Last edited by shamilbi on Wed Feb 21, 2007 2:31 am, edited 1 time in total.

Top
 Profile  
 PostPosted: Sat Jan 27, 2007 10:20 pm   
Site Admin
User avatar

Joined: Sun May 15, 2005 9:36 pm
Posts: 662
Location: Des Moines, Iowa
got any example code that your already working on ???


Top
 Profile WWW  
 PostPosted: Sun Jan 28, 2007 10:24 am   

Joined: Sat Jan 27, 2007 11:43 am
Posts: 6
crouse wrote:
got any example code that your already working on ???

getfacl A | setfacl --set-file=- B


Top
 Profile  
 PostPosted: Mon Jan 29, 2007 4:20 am   

Joined: Sat Jan 27, 2007 11:43 am
Posts: 6
getfacl A | setfacl --set-file=- B
chmod --reference=A B


Top
 Profile  
 PostPosted: Wed Feb 21, 2007 2:30 am   

Joined: Sat Jan 27, 2007 11:43 am
Posts: 6
A --> B, where B exists and his permissions cannot be changed
---------------------------
install -m 600 A B.tmp
getfacl B | setfacl --set-file=- B.tmp
chmod --reference=B B.tmp
mv B.tmp B


Top
 Profile  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Google [Bot] and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron


BashScripts | Promote Your Page Too
Powered by phpBB © 2011 phpBB Group
© 2003 - 2011 USA LINUX USERS GROUP