FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu User

 
 
LinkBack Thread Tools
 
Old 04-24-2008, 11:31 AM
"ml@bortal.de"
 
Default How to backup file permissions

Hello List,

is there an way to backup file permissions (not the actual files!!).
I need it for some bash script.

Thanks, Mario

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 04-24-2008, 11:51 AM
Chris G
 
Default How to backup file permissions

On Thu, Apr 24, 2008 at 01:31:58PM +0200, ml@bortal.de wrote:
> Hello List,
>
> is there an way to backup file permissions (not the actual files!!).
> I need it for some bash script.
>
I think you need to explain a bit more, what exactly are you trying to
do? Do you just want to save the current status of some files
permissions, do you want to save and restore the permissions (why?).

--
Chris Green

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 04-24-2008, 12:36 PM
"Owen Townend"
 
Default How to backup file permissions

On 24/04/2008, ml@bortal.de <ml@bortal.de> wrote:
Hello List,

is there an way to backup file permissions (not the actual files!!).
I need it for some bash script.

Thanks, Mario
Hey,

**Something simple like*this*to*save

# find . -printf '%p*%m
' > permissions.out
**Then something like this to restore
#*awk*'{system("chmod*"$2"*"$1)}'*permissions.out

**Simple, easy to read, plaintext backup.

**It wouldn't be hard to add ownership to this if you want/need that too.

# find . -printf '%p*%m %u %g
' > permissions.out
#*awk*'{system("chmod*"$2"*"$1), system("chown "$3":"$4" "$1)}'*permissions.out


**This doesn't support filenames with spaces as it stands, but hopefully works as a proof of concept...

cheers,
Owen.


--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users



--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 04-26-2008, 10:33 PM
Florian Diesch
 
Default How to backup file permissions

"ml@bortal.de" <ml@bortal.de> wrote:


> is there an way to backup file permissions (not the actual files!!).
> I need it for some bash script.

getfacl (package acl)


Florian
--
<http://www.florian-diesch.de/>
-----------------------------------------------------------------------
** Hi! I'm a signature virus! Copy me into your signature, please! **
-----------------------------------------------------------------------

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 

Thread Tools




All times are GMT. The time now is 04:21 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org