1835228 Members
7871 Online
110078 Solutions
New Discussion

Re: Security of files

 
Marcelo De Florio_1
Frequent Advisor

Security of files

How can i return one file to back permisions ?

eg, rxw------ pepe
chmod 777 pepe --> rwxrwxrwx

and then return to rwx------, but I unknown the before premisions.

MDF
Marcelo De Florio
7 REPLIES 7
Patrick Wallek
Honored Contributor

Re: Security of files

The only way to find out what the permissions were before would be to look at a backup of the file.

There is no "undo" feature in HP-UX.
Craig Rants
Honored Contributor

Re: Security of files

Marcelo,
You could always play it safe and make a copy with that retains the previous permissions.

i.e...

cp -p file1 file1.orig

the -p will retain all the info in it's original format.

GL,
C
"In theory, there is no difference between theory and practice. But, in practice, there is. " Jan L.A. van de Snepscheut
S.K. Chan
Honored Contributor

Re: Security of files

No way this can be done, at least not that I know of.
Roger Baptiste
Honored Contributor

Re: Security of files

hi,

Sorry, there is no command to figure out what was the old permission/ownership of the file. You would need the backup copy of the file.

If it is a system file, you can quickly check it up on another system.

-raj
Take it easy.
Bernie Vande Griend
Respected Contributor

Re: Security of files

If you had a product installed such as Tripwire, CA's Access Control, or HP's IDS/9000 it could keep track of permission of files you want and in some cases, self-correct it. HP's IDS/9000 is free and has this ability if you need it. There was a interesting article on it recently in Information Security Magazine:
http://www.infosecuritymag.com/2002/mar/testcenter.shtml
Ye who thinks he has a lot to say, probably shouldn't.
harry d brown jr
Honored Contributor

Re: Security of files

MDF,

Like Patrick said, most backup software allows you to list the files on the backup media and they usually include the owner, group, file permissions, size, and date of the files.

live free or die
harry
Live Free or Die
Steven Sim Kok Leong
Honored Contributor

Re: Security of files

Hi,

Apart from checking out the previous permissions of files from backup media, you can also track the changes by making use of mkpdf, pdfck and pdfdiff.

You can run this every 24 hours or more frequently to detect changes to your files (such as permissions) and identify the changes that have taken place. pdfck and pdfdiff will inform accordingly.

Hope this helps. Regards.

Steven Sim Kok Leong