AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.


#Power
 View Only
  • 1.  Reverting the permissions to old values with a command !? How

    Posted Sun January 17, 2010 09:31 AM

    Originally posted by: sidharth2009


    Hi All,

    the file permission of particulr file is

    -rw-r--r-- 1 abcadm sapsys 141 Jun 02 2009 test.log

    Now i change

    **chmod 777 test.log**

    I get

    -rwxrwxrwx 1 abcadm sapsys 141 Jun 02 2009 test.log

    i cleared the screen.

    I dont remember original values or permissions for this file test.log ,

    At this juncture

    Now If i want to Revert the permissions for this file test.log , to original values.

    Is there any Command.
    Kindly suggest
    #AIX-Forum


  • 2.  Re: Reverting the permissions to old values with a command !? How

    Posted Sun January 17, 2010 09:32 AM

    Originally posted by: sidharth2009


    Guys, All these commands IBM AIX 5.3
    #AIX-Forum


  • 3.  Re: Reverting the permissions to old values with a command !? How

    Posted Mon January 18, 2010 01:57 AM

    Originally posted by: Kosala


    AFAIK, POSIX inode struct (http://en.wikipedia.org/wiki/Inode) does not have a field to keep the previous user rights. So I do not expect a command to do what you're looking for.

    HTH,
    Kosala
    #AIX-Forum


  • 4.  Re: Reverting the permissions to old values with a command !? How

    Posted Mon January 18, 2010 03:51 AM

    Originally posted by: hdkutz


    Hello,
    if the Permissions were
    -rw-r--r--
    simply execute
    chmod 644 test.log
    to get back the old permissions.
    man chmod
    will guide you in setting permissions.

    Cheers,
    ku
    #AIX-Forum


  • 5.  Re: Reverting the permissions to old values with a command !? How

    Posted Mon January 18, 2010 01:58 PM

    Originally posted by: j.gann


    some backup/restore software will allow you to only restore the permissions.

    see restore(1)'s -P option

    providing you have a backup that is.
    #AIX-Forum