Sponsored Content
Top Forums UNIX for Advanced & Expert Users CentOS7 restoring file capabilities Post 303025691 by rbatte1 on Friday 9th of November 2018 01:03:10 PM
Old 11-09-2018
CentOS7 restoring file capabilities

Quite an obscure question I think.

We have a rebuild process for remote sites that allows us to PXE rebuild a till (actually a PC with a touch screen and various fancy bits) running CentOS. The current CentOS5 tills work just fine with a tar image restore and some personalisation. Sadly, CentOS7 introduces file capabilities on some critical stuff, such as ping so on the original source till, getcap /usr/bin/ping gives us this:-
Code:
# getcap /usr/bin/ping
/usr/bin/ping = cap_net_admin,cap_net_raw+p

After a tar and restore, these are lost, so ordinary users cannot use ping, which is a shame because the the till believes it cannot post the sales information to the central servers. The actual till software is proprietary, so we can't get into that to change it.

Does anyone know how to take a file and all it's file capabilities so that it can be restored?

An alternate would be to use yum or rpm to either list before or re-apply the required capabilities after the recovery, but I can't find a way to do that either of these. At worst, I might have to use getcap in a massive loop to collect them all then apply them manually after recovery, but I'd rather use the appropriate tools to do it properly.


Does anyone have any suggestions?



Many thanks, in advance,
Robin
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Restoring a file from Tape

help please i have "inherited" a Sco Server (the administrator departed in a hurry...yes we are chasing him..) and haven't used Unix for 8 years. i have a file that i need to retrieve from a tape. i have been able to find the file on tape using the cpio -ivt command. however... the problem I... (3 Replies)
Discussion started by: mfischer
3 Replies

2. UNIX for Dummies Questions & Answers

Restoring a single file...???

Can anyone please help...? Managed to do a ufsdump of files to tape. Having trouble using ufsrestore to pull a single file back by filename?? I have dumped a single file to tape also because looking through the other threads, I noticed that you have to tell it to skip files before you get to... (1 Reply)
Discussion started by: Jonathan
1 Replies

3. Solaris

Restoring TAR'd file to different location

Is it possible to restore a TAR'ed file off of a tape to a location other than the original location? If so, how? (The MAN pages give examples of how to restore only to the originating location.) Thanks!! (1 Reply)
Discussion started by: FredSmith
1 Replies

4. Shell Programming and Scripting

Restoring a file

I'm new to Unix and have just wrote a little program to move files to a recycle bin (a Directory i created) and restore them. The problem is that i need to keep track of all the full filenames so that i can restore them to the right place. I did this by creating a file called delreg and putting the... (4 Replies)
Discussion started by: zoolz
4 Replies

5. UNIX for Dummies Questions & Answers

Restoring back a deleted file in unix.

Hi, Can any one tell me how to restore back the deleted file in unix? I know the file name. If i know the inode number of the file does help more to restore back the file? (1 Reply)
Discussion started by: siba.s.nayak
1 Replies

6. Shell Programming and Scripting

restoring file to its default location...

Hello everyone, I am new to unix shell. I have a file called Path.txt....and i have data in that as 1 abhi 2 avi 3 ash so on..... 1 ,2 ,3 is the... (2 Replies)
Discussion started by: AbhijitIT
2 Replies

7. Solaris

Restoring a Root File System that was on a metadevice

Hello I use Solaris 10. I need to restore the root file system, but I don't know how . i can only boot the server in safe mode or with the cd (ok boot cdrom -s) Do you guys know a good procedure, I don't want to break the mirrors. ( the server is not a cluster). Its an emergency, i would... (4 Replies)
Discussion started by: feg
4 Replies

8. Red Hat

Issues restoring a large dump file

Post deleted. (0 Replies)
Discussion started by: Nobody_knows_me
0 Replies

9. Shell Programming and Scripting

Restoring a file to its original location

Hello everyone, I am attempting to make a recycling bin type application in shell script (tcsh). I have the whole part of the application done where someone can recycle files from one location to the recycling bin (the lower half of the program), this is not a problem. However I wanted to make... (7 Replies)
Discussion started by: tastybrownies
7 Replies

10. UNIX for Dummies Questions & Answers

Restoring deleted file with rm -rf

Is there a way I could recover a deleted text file with "rm -rf" command. Running CentOS 6.5. Thank you. (5 Replies)
Discussion started by: galford
5 Replies
man(1)							     Code::Blocks IDE man page							    man(1)

NAME
Code::Blocks - The open-source, cross-platform IDE SYNOPSIS
codeblocks [-h] [-ns] [-d] [--prefix <str>] [-p <str>] [--profile <str>] [--rebuild] [--build] [--target <str>] [--no-batch-window-close] [--batch-build-notify] [filename(s)...] DESCRIPTION
codeblocks launches the Code::Blocks IDE. Its various command-line arguments are listed below. OPTIONS
-h, --help Displays the list of accepted command-line arguments. -ns Do not display a splash screen on startup. The splash screen can be completely disabled in the program's environment options. -d Enable the debugging log. --prefix Specify an alternate path for Code::Blocks to find its shared files. -p, --profile Set which profile to use. If you set the profile to ask , Code::Blocks will display a list with all the known profiles to choose from. --rebuild Start a batch rebuild (i.e. "clean" and "build") job on the filenames passed as arguments. The filenames can be either projects or workspaces. --build Start a batch build (i.e. no "clean") job on the filenames passed as arguments. The filenames can be either projects or workspaces. --target Specify a single build target to build in the batch build (or rebuild) job. --no-batch-window-close When the batch job ends, the log window closes too. This option keeps it open until you manually close it. --batch-build-notify Display a message when the batch job finishes. EXAMPLES
Batch build myproject.cpp, only the "Debug" target and keep the batch job window open when finished: codeblocks --build --target="Debug" --no-batch-window-close myproject.cbp Batch rebuild everything in myproject.cpp: codeblocks --rebuild myproject.cbp AUTHOR
Yiannis "mandrav" Mandravellos (mandrav@codeblocks.org) HISTORY
2006 - Initial version 1.0 10 July 2006 man(1)
All times are GMT -4. The time now is 09:43 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy