AIX

AIX

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

 View Only
  • 1.  Restore permissions only

    Posted Fri June 20, 2008 04:48 PM

    Originally posted by: SystemAdmin


    We mistakenly ran a 'chmod -R 755 /bin' on one of our AIX 5.3 systems. We did the same on /lib. We have tried to restore just the permissions from a mksysb by 'restore -P a -dqvf /mnt/source_mksysb /bin'. Each time it returns 0 files restored and does not restore any of the permissions. This happens for even the simplist restore command. I think the restore is unable to work properly because of the 'bad' bin or lib permissions.

    What permissions may need changed for the restore to work?

    We just did a full days worth of work on the server, so I don't want to do a full mksysb restore and lose that.

    We can log in to the server, but weren't able to su to root (root remote login is disabled). It returned 'not authorized' without even giving us the opportunity to enter a password. I corrected the permissions for su and now we can su successfully.

    Thankfully it just a DR server.

    Message was edited by: 1bi

    Message was edited by: 1bi


  • 2.  Re: Restore permissions only

    Posted Fri June 20, 2008 05:49 PM

    Originally posted by: SystemAdmin


    Resolved. The problem was simple, as usual. The correct restore syntax from the root directory was:

    restore -Pa -dqvf /mnt/ufxpsfprdb1_mksysb ./usr/lib
    restore -Pa -dqvf /mnt/ufxpsfprdb1_mksysb ./usr/bin

    This just restored the pemission attributes.


  • 3.  Re: Restore permissions only

    Posted Fri June 20, 2008 05:52 PM

    Originally posted by: j.gann


    you could write and run a script on a functional system or lpar that examines the permissions for each file system object in question and creates a "chmod" command accordingly.

    Then run the resulting chmod commands on the messed up system.


  • 4.  Re: Restore permissions only

    Posted Wed June 25, 2008 07:29 PM

    Originally posted by: jnordtome


    If you had enabled TCB at installation, you could have also used the tcbck command to fix most of the files.