SUMMARY: Backup fails on "permission denied"

From: Liang, Warren (Warren.Liang_at_sms-ito.com)
Date: 07/23/03

  • Next message: Ruiz Lastra, Pedro A. (I-Q): "4.0f to 5.1a migration"
    Date: Wed, 23 Jul 2003 08:17:32 -0700
    To: "Majordomo Q&A Tur64 (E-mail)" <tru64-unix-managers@ornl.gov>
    
    

    Good Morning:

    Thanks to Dr. Blinn and Peter Wolfe valuable information, the "operator" is
    able to complete the backup.
    I grant the setuid permission bit on file /sbin/vdump and changes operator
    account's group id to match /sbin/vdump.

    Thanks.

    Dr. Blinn's response:
    Generally speaking, the reason backup utilities like "vdump" are able to do
    a "full" backup when run by the root user is that they inherit the root
    user's ability to bypass file system access restrictions.

    Your "oper" account lacks that capability.

    In Tru64 UNIX (and it has ALWAYS been this way and will not change), a
    script can be set "setuid root" but that doesn't make the script have
    root privilege.

    You could presumably create a small program that would be run setuid
    that would in turn "exec" the script. That *might* do what you want.
    Or it might not.

    Peter Wolfe's response:
    The files that you can't access are on different groups (e.g. auth, bin)
    from those that the operator account is a member of. So you either have to:
    1)Make sure operator is a member of the group for all the files
      you need to back up
    or

    2) run backups as root.

    One solution is to not change the operators groups and instead
    use Division of Privileges (dop) to authorize the operator
    account to run vdump as root. The operator would then do:

            dop vump <switches>
    when using vdump and it would run as root.

    My original post:
    > I am using "operator" account to do backup. The account configuration is:
    > Primary group: oper
    > Secondary group: backup, dba, operator, and system
    >
    > Backup script :
    > -rwsr-xr-- 1 root backup 270 Jul 21 10:10 mytest
    >
    > # cat /usr/bin/mytest
    > exec > /usr/users/operator/mytest.log 2>&1
    > cd /sbin
    > vdump -0 -u -v -f /dev/nrmt0h /
    > vdump -0 -u -v -f /dev/rmt0h /
    >
    > Execute the script:
    > # at -m now
    > /usr/bin/mytest
    > #...
    > # cat mytest.log
    > path : /
    > dev/fset : /dev/re0a
    > type : ufs
    > vdump: Date of last level 0 dump: the start of the epoch
    > vdump: Dumping directories
    > vdump(bd): unable to open directory <./etc/auth>; [13] Permission denied
    > vdump(bd): unable to open directory <./sbin/rc0.d>; [13] Permission denied
    > vdump(bd): unable to open directory <./sbin/rc2.d>; [13] Permission denied
    > vdump(bd): unable to open directory <./sbin/rc3.d>; [13] Permission denied
    > vdump(bd): unable to open directory <./.dt/Desktop>; [13] Permission
    denied
    > vdump(bd): unable to open directory <./tcb/files>; [13] Permission denied
    > vdump(bd): unable to open directory <./tcb/lib>; [13] Permission denied
    > vdump(bd): unable to open directory <./.netscape-cache>; [13] Permission
    > denied
    > vdump(bd): unable to open directory <./.netscape>; [13] Permission denied
    > vdump(bd): unable to open directory <./nsmail>; [13] Permission denied
    > vdump: Dumping 94701390 bytes, 107 directories, 1644 files
    > vdump: Dumping regular files
    > bd ./
    > bd ./etc/
    > bd ./etc/nls/
    > bd ./etc/nls/loc/
    > bf ./etc/nls/loc/C, 2586
    > ...
    >

    Thanks again and have a nice day,

    > Warren


  • Next message: Ruiz Lastra, Pedro A. (I-Q): "4.0f to 5.1a migration"

    Relevant Pages

    • Re: Can "/etc/rc.conf" be replaced with a symlink?
      ... I could and may eventually write a script. ... I do believe that the mount point where I am wanting to ... > Could I maybe place this mount point above the root in fstab? ... You might consider writing a script that will backup ...
      (freebsd-questions)
    • UPDATE: Vdump script
      ... I want to keep this vdump script as simple and basic as possible. ... to backup and all that). ... The problem I'm having is what happens when the tape fills up. ...
      (Tru64-UNIX-Managers)
    • Re: External USB hard drive "loosing" connection [Maxtor onetouch]
      ... package crontab running as root.] ... I recently bought a Maxtor onetouch extenal USB drive 500GB for backup ... if it is a bash script. ... If you run the script as root it shouldn't even ...
      (Ubuntu)
    • Re: root privileges from cgi script?
      ... I require for a staff member to be able to initiate a backup script ... > a chain of backup processes. ... > I would welcome any suggestions on how to do two things from a CGI script; ... > I know suex can't be used because ROOT is specifically not allowed. ...
      (comp.unix.shell)
    • [Summary] ufsdump, solaris 9 & RBAC not working correctly
      ... server, and I don't want to have root logging in on the remote server, I ... etc. and key exchange setup for backup user. ... ufsdump, solaris 9 & RBAC not working correctly ... I thought suid was suid. ...
      (SunManagers)