LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 07-30-2008, 06:07 AM   #1
freeindy
Member
 
Registered: Nov 2002
Posts: 207

Rep: Reputation: 32
untar root fs gives: mknot: operation not permitted


Hi,

I have a rootfs in a tarball (rootfs.tar.gz). When I untar it on my home directory I get following errors:

Code:
dev/
dev/ttyS41
tar: dev/ttyS41: Cannot mknod: Operation not permitted
dev/tty52
tar: dev/tty52: Cannot mknod: Operation not permitted
dev/zero
tar: dev/zero: Cannot mknod: Operation not permitted
...
...
I am untaring the packed file as user. Now, I know that if I use sudo then it works. BUT, is it possible to untar it as a normal user?

Thanks,

Indy
 
Old 07-30-2008, 08:47 AM   #2
Pearlseattle
Member
 
Registered: Aug 2007
Location: Zurich, Switzerland
Distribution: Gentoo
Posts: 999

Rep: Reputation: 142Reputation: 142
As user X you probably don't have write-permission on the directory /dev - only root has it, or? You could therefore sudo to root and assign user X write-access to the directory.
 
Old 07-31-2008, 01:59 AM   #3
freeindy
Member
 
Registered: Nov 2002
Posts: 207

Original Poster
Rep: Reputation: 32
Pearlseattle,

That is fine but this tarball is to be extracted in say $(HOME). This is for future use when exporting the directory as the root filesystem for a target system. What I want is that be able to extract the tarball as a normal user. Even if for example to extract it and compress it again. This mknod operation stops me from doing it.
 
Old 07-31-2008, 02:19 AM   #4
Pearlseattle
Member
 
Registered: Aug 2007
Location: Zurich, Switzerland
Distribution: Gentoo
Posts: 999

Rep: Reputation: 142Reputation: 142
Got it - sorry.
 
Old 08-01-2008, 04:11 AM   #5
freeindy
Member
 
Registered: Nov 2002
Posts: 207

Original Poster
Rep: Reputation: 32
no worries mate. thanks for trying though. You never know
 
Old 08-02-2008, 12:57 PM   #6
smoked kipper
Member
 
Registered: May 2008
Location: UK
Distribution: Slackware,Slamd64
Posts: 81

Rep: Reputation: 15
You have to be root to create device nodes.
 
Old 08-02-2008, 01:55 PM   #7
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
The device nodes are created dynamically when the computer boots up so you shouldn't have even backed up /dev. However, there are files and directories by various owners so you will need to extract the tarball as root. Another problem occurs if the directory is extracted before the files. You may not have permissions to create files inside the directory. Another thing is that the /home partition may be (and should be) mounted with the "nodev" option which would prevent extracting /dev in someone's home directory.
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
bash# "chvt N" as non-root says 'Operation not permitted' GrapefruiTgirl Linux - Desktop 4 09-16-2007 04:44 PM
Operation not permitted jakkals Linux - General 3 09-26-2005 07:30 PM
Operation not permitted as root? Amfohr Linux - Newbie 6 06-07-2005 06:12 AM
Operation not Permitted as root? Godboo Linux - Newbie 4 02-17-2004 08:42 AM
Operation not permitted FrozenShadow23 Linux - Newbie 6 10-05-2003 05:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 01:33 AM.

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
Open Source Consulting | Domain Registration