1832869 Members
3719 Online
110048 Solutions
New Discussion

frecover

 
SOLVED
Go to solution
Jeffrey S. Bromley
Occasional Contributor

frecover

When performing a frecover as a non-root user the setuid "s" is being changed to an execute permission "x". Is there anyway around this without logging in as root?
The only easy day was yesterday
5 REPLIES 5
James R. Ferguson
Acclaimed Contributor

Re: frecover

Jeffrey:

According to 'frecover's man pages, "Use of frecover does not require special privileges. However, if a user does not have access permission to a given file, the file is not recovered." Are you sure that the file in question is truly being recovered, or are you being mislead by the presence of a different version on disk? What options are you using with the 'frecover'?

...JRF...
Jeffrey S. Bromley
Occasional Contributor

Re: frecover

I've tried several options with both commands, but the results are always the same. The files are definitely be backed up, with the correct permissions, it is during the frecover that the permission is changed.

fbackup -f /dev/rmt/0m -i ( I've also tried it using a graph file.)

frecover -f /dev/rmt/0m -xNv (Just to make sure the files are there.)

frecover -f /dev/rmt/0m -rv (To restore the files)
The only easy day was yesterday
CHRIS_ANORUO
Honored Contributor

Re: frecover

I agree with James, try listing the backup files into a file, then vi the file to find out the exact state.
Use: frecover -f /dev/rmt/0m -I /tmp/filename
The vi /tmp/filename to check the files.
When We Seek To Discover The Best In Others, We Somehow Bring Out The Best In Ourselves.
Bruce Regittko_1
Esteemed Contributor
Solution

Re: frecover

Hi,

I also cannot get frecover to leave the setuid or setgid bits set unless I am root. I imagine that this is a security "feature" that frecover has.

One thing that can be done is to set up sam so that a non-priviledged user can use backup and recovery. Sam does preserve setuid and setgid bits even when a non-root user uses it.

--Bruce
www.stratech.com/training
Suhas_2
Regular Advisor

Re: frecover

Jeffry,
Pls try this:
1> Write a simple shell script which will intake the directory or files to be restored and the drive name. Then the script should call "frecover".
2> Call this script from a C program. Compile the code and make the executable setuid to root and executable by "world".
3> Now you can give this executable to any lay user for his restorations or you yourself can use it, withoput taking root login.
4> As the executable is setuid to root, the issue of retention of permissions will be resolved easily.
5> I am suggesting to write a C program, because, "setuid" shell scripts may not give desired results.

Hope this helps....
Suhas.
Never say "Die"