LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-08-2008, 12:37 PM   #1
alenD
Member
 
Registered: Jul 2005
Posts: 69

Rep: Reputation: 15
tar question


when i use
tar cvzf mytar.tgz mydir
as as a user i get
tar: mytar.tgz: Cannot open: Permission denied

when i do the same as root it works fine
when, as a user, i enter mydir and do
tar cvzf mytar.tgz *
everything works fine again

i changed the permissions of mydir but the problem seems to be somewhere else. .. but cannot figure out where?

thnx
 
Old 10-08-2008, 12:51 PM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 17,915

Rep: Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689
Quote:
Originally Posted by alenD View Post
when i use
tar cvzf mytar.tgz mydir
as as a user i get
tar: mytar.tgz: Cannot open: Permission denied

when i do the same as root it works fine
when, as a user, i enter mydir and do
tar cvzf mytar.tgz *
everything works fine again

i changed the permissions of mydir but the problem seems to be somewhere else. .. but cannot figure out where?

thnx
The permissions on the directory you're in allow read, but not write. When you go into the mydir directory, you've obviously got write permissions.

Either chown the upper-level directory to be owned by you, or chmod it to allow writing by your user ID's group.
 
Old 10-08-2008, 12:57 PM   #3
linuxman8786
Member
 
Registered: Sep 2008
Posts: 43

Rep: Reputation: 15
Quote:
Originally Posted by TB0ne View Post
The permissions on the directory you're in allow read, but not write. When you go into the mydir directory, you've obviously got write permissions.

Either chown the upper-level directory to be owned by you, or chmod it to allow writing by your user ID's group.
you try to you super root, like sudo in ubuntu

Last edited by Tinkster; 10-30-2010 at 04:49 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how can i decompress this tar.tar file? hmmm sounds new.. tar.tar.. help ;) kublador Linux - Software 14 10-25-2016 03:48 AM
a tough question 4 u, problem in extracting tar & tar.gz files p_garg Linux - General 5 11-08-2010 12:02 PM
BackUp & Restore with TAR (.tar / .tar.gz / .tar.bz2 / tar.Z) asgarcymed Linux - General 5 12-31-2006 03:53 AM
tar.gz question <---NOOOOOB QUESTION jairo Linux - Software 4 02-17-2003 06:28 AM


All times are GMT -5. The time now is 04:15 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration