Solved

Can I extract a tar as special user?

Posted on 2008-10-17
4
311 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 250 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 250 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
trouble on installing syslog-ng on CentOS 7 7 158
CentOS Backup Options 3 68
DB2 9.7 Grant Execute SP 4 61
phpmyadmin memory error 55 96
Network Interface Card (NIC) bonding, also known as link aggregation, NIC teaming and trunking, is an important concept to understand and implement in any environment where high availability is of concern. Using this feature, a server administrator …
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
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…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses

752 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