?
Solved

Can I extract a tar as special user?

Posted on 2008-10-17
4
Medium Priority
?
313 Views
Last Modified: 2013-12-16
My special username is:
user123

My special password is:
password123

This is how I extract files from a tar:
tar xf tar.tar

When I am logged in as "foo" how can I extract the files from a tar as user123 so they are owned by user123?

0
Comment
Question by:hankknight
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 2

Accepted Solution

by:
zerodollars earned 1000 total points
ID: 22743541
use the 'su' command.

type 'man su' to get the help manual up and it will give you all the available info on it.
0
 
LVL 9

Assisted Solution

by:michofreiha
michofreiha earned 1000 total points
ID: 22743627
use sudo su and extract the file
0
 
LVL 16

Author Comment

by:hankknight
ID: 22743816
Could you please be more specific?

I am doing this from PHP so I have only one line to do it in:

<?php  shell_exec('tar xf tar.tar'); ?>
0
 
LVL 16

Author Comment

by:hankknight
ID: 22744053
0

Featured Post

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Suggested Courses

719 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question