LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices

Reply
 
Search this Thread
Old 04-09-2011, 12:33 AM   #1
janakiramulu
Member
 
Registered: Jan 2011
Location: mangalore
Distribution: ubuntu
Posts: 167

Rep: Reputation: 0
changing ownership : operation not permitted


hi all
i am here -lfs6.7 @ 5.33. Changing Ownership (pagno-73)

1)I wanna take back up $LFS/tools directory (for use in building future LFS systems), how can i take back up (tools dir)
i mounted pendrive to /tmp
i try to copy the tools dir to /tmp: msg permission denied
lfs:/mnt/lfs$ls
sources tools lfs-packages.tar
lfs:/mnt/lfs$cp -r tools /tmp(usb device mount point)

2)i am try to change the ownership of the $LFS/tools directory to user root by running the following command:

lfs:/mnt/lfs/sources$ chown -R root:root $LFS/tools

output is lenghty,but i am posting last lines only


chown: changing ownership of `/mnt/lfs/tools/i686-pc-linux-gnu/lib/ldscripts/elf_i386.xbn': Operation not permitted

chown: changing ownership of `/mnt/lfs/tools/i686-pc-linux-gnu/lib/ldscripts/elf_i386.xsw': Operation not permitted
chown: changing ownership of `/mnt/lfs/tools/i686-pc-linux-gnu/lib/ldscripts/elf_i386.xw': Operation not permitted

chown: changing ownership of `/mnt/lfs/tools/i686-pc-linux-gnu/lib/ldscripts/i386linux.xu': Operation not permitted
chown: changing ownership of `/mnt/lfs/tools/i686-pc-linux-gnu/lib/ldscripts/elf_i386.xn': Operation not permitted

chown: changing ownership of `/mnt/lfs/tools/i686-pc-linux-gnu/lib/ldscripts/elf_i386.xr': Operation not permitted
chown: changing ownership of `/mnt/lfs/tools/i686-pc-linux-gnu/lib/ldscripts/elf_i386.xdw': Operation not permitted

chown: changing ownership of `/mnt/lfs/tools/i686-pc-linux-gnu/lib/ldscripts/i386linux.xn': Operation not permitted
chown: changing ownership of `/mnt/lfs/tools/i686-pc-linux-gnu/lib/ldscripts': Operation not permitted

chown: changing ownership of `/mnt/lfs/tools/i686-pc-linux-gnu/lib': Operation not permitted
chown: changing ownership of `/mnt/lfs/tools/i686-pc-linux-gnu/bin/as': Operation not permitted
chown: changing ownership of `/mnt/lfs/tools/i686-pc-linux-gnu/bin/ar': Operation not permitted

chown: changing ownership of `/mnt/lfs/tools/i686-pc-linux-gnu/bin/strip': Operation not permitted
chown: changing ownership of `/mnt/lfs/tools/i686-pc-linux-gnu/bin/ranlib': Operation not permitted
chown: changing ownership of `/mnt/lfs/tools/i686-pc-linux-gnu/bin/objcopy': Operation not permitted

chown: changing ownership of `/mnt/lfs/tools/i686-pc-linux-gnu/bin/nm': Operation not permitted
chown: changing ownership of `/mnt/lfs/tools/i686-pc-linux-gnu/bin/ld': Operation not permitted
chown: changing ownership of `/mnt/lfs/tools/i686-pc-linux-gnu/bin/objdump': Operation not permitted

chown: changing ownership of `/mnt/lfs/tools/i686-pc-linux-gnu/bin': Operation not permitted
chown: changing ownership of `/mnt/lfs/tools/i686-pc-linux-gnu': Operation not permitted
chown: changing ownership of `/mnt/lfs/tools': Operation not permitted


why??(what i missed )
 
Old 04-09-2011, 02:09 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374
Hi,
Quote:
why??(what i missed )
You missed the Note at the beginning of chapter 5.33.
 
Old 04-09-2011, 04:00 AM   #3
janakiramulu
Member
 
Registered: Jan 2011
Location: mangalore
Distribution: ubuntu
Posts: 167

Original Poster
Rep: Reputation: 0
[

hi druuna
thanku so much for fast reply

(i am using lfs livecd)
yes that may be the mistake
(present) one terminal is lfs usr,
so i opened new terminal
here i run this
root[ ~ ]#chown -R root:root $LFS/tools
is this fine
i have to do chpter 6 @ root[ ~ ]# only right
-----------------------------------------------
i was expecting abt backup tool dir,can u tell

thanku
 
Old 04-09-2011, 06:38 AM   #4
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374
Hi,
Quote:
Originally Posted by janakiramulu View Post
yes that may be the mistake
I'm sure that is the mistake....

Quote:
here i run this
root[ ~ ]#chown -R root:root $LFS/tools
is this fine
That is the command in the book, just make sure the LFS variable is set (probably to /mnt/lfs).

Quote:
i have to do chpter 6 @ root[ ~ ]# only right
I do believe that is what the note in chapter 5.33 says.

Quote:
i was expecting abt backup tool dir,can u tell
What did you expect? The book only mentions this would be a good point to make a backup.

If you want to make a backup I would suggest the following (as root user):
Code:
cd /mnt
tar jcf lfs.chapter5.tar.bz2 lfs
If, for whatever reason, you want to start at the beginning of chapter 6 again do the following to restore the backup (as root user):
Code:
cd /mnt
rm -rf lfs
tar jxf lfs.chapter5.tar.bz2
Hope this helps.
 
Old 04-09-2011, 07:04 AM   #5
janakiramulu
Member
 
Registered: Jan 2011
Location: mangalore
Distribution: ubuntu
Posts: 167

Original Poster
Rep: Reputation: 0
hi druuna
i exit from lfs user,now
root [ /mnt ]# tar jcf lfs.chapter5.tar.bz2 lfs
output is following

bzip2: I/O or other error, bailing out. Possible reason follows.
bzip2: No space left on device
Input file = (stdin), output file = (stdout)

how come this,i made 12gb partition for lfs ,
shall i remove sources dir(all previous pkg untared sources)? in /sources
-------------------------------------------------------------------------
 
Old 04-09-2011, 07:16 AM   #6
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: Ubuntu 12.04/12.10/13.04/LFS/Centos6.3/Debain/PCBSD/Mageia 3
Posts: 1,643
Blog Entries: 1

Rep: Reputation: 229Reputation: 229Reputation: 229
You should remove the build dir as you go along
 
Old 04-09-2011, 07:20 AM   #7
janakiramulu
Member
 
Registered: Jan 2011
Location: mangalore
Distribution: ubuntu
Posts: 167

Original Poster
Rep: Reputation: 0
hi druuna
(i am using lfs livecd)

here i just click on logout(on menu),after few seconds
its appear as root[ ~ ]#
here i typed
root[ ~ ]#startx
reslult is
FAT:directory bread(block 5991904) failed
scsi ....rejecting i/o to dead device
.
.
.
.
FAT:directory bread(block 5991904) failed
scsi ....rejecting i/o to dead device
FAT:FAT read failedblocknr 3820)
fatal server error:
could not create lock file in /tmp/.tx0-lock
give up.
xinit:no such file or directory(errno 2):unable to connect to x server
xinit:no such process(errno 3):server error.

something went wrong a?
when i type startx @ root [ ~ ]#
it should appear gui na
whats wrong
 
Old 04-09-2011, 07:25 AM   #8
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: Ubuntu 12.04/12.10/13.04/LFS/Centos6.3/Debain/PCBSD/Mageia 3
Posts: 1,643
Blog Entries: 1

Rep: Reputation: 229Reputation: 229Reputation: 229
You need to build blfs yet, The lfs is just the base system
 
Old 04-09-2011, 07:34 AM   #9
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
Don't use fat. Format the drive in a Linux filesystem. The chown command will not work. The ownership and permissions of directories and files are determined enmass by the mount options.

However, you could backup up files to a fat drive using tar. The ownership and permissions information is written inside the backup.
 
Old 04-09-2011, 09:33 AM   #10
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374
Hi,

Quote:
Originally Posted by janakiramulu View Post
root [ /mnt ]# tar jcf lfs.chapter5.tar.bz2 lfs
output is following

bzip2: I/O or other error, bailing out. Possible reason follows.
bzip2: No space left on device
Input file = (stdin), output file = (stdout)
If you are using the liveCD there is indeed no space left to do the tar command (when using /mnt/lfs.chapter5.tar.bz2 as target). You cannot write to a cd, it is a read-only medium.

If you have a memory-stick or thumb drive or whatever, mount it first (for example to /mnt/usbstick), then tar to that mounted directory (again as root):
Code:
cd /mnt
tar jcf /mnt/usbstick/lfs.chapter5.tar.bz2 lfs
PS: You should always remove the build directories after the build (which is mentioned in the book), but you do not need to remove the packages.

Hope this helps.
 
Old 04-10-2011, 06:09 AM   #11
janakiramulu
Member
 
Registered: Jan 2011
Location: mangalore
Distribution: ubuntu
Posts: 167

Original Poster
Rep: Reputation: 0
hi druuna

yester day i told ,i got fat error
so today i started fresh from starting
see 5.33(lfs-6.7)
note(pagen0-73)
The commands in the remainder of this book must be performed while logged in as user root and no
longer as user lfs. Also, double check that $LFS is set in root's environment.

lfs:/mnt/lfs/sources$exit(i exited from lfs)
root[ ~ ]#chown -R root:root $LFS/tools
root[ ~ ]#echo $LFS
its iving /mnt/lfs
it should show root na according to note
 
Old 04-10-2011, 06:34 AM   #12
janakiramulu
Member
 
Registered: Jan 2011
Location: mangalore
Distribution: ubuntu
Posts: 167

Original Poster
Rep: Reputation: 0
hi druuna
one more thing
till chapter 5 only i have to use lfslivecd(without distrubing,without power off)

while doing chapter 6 ,doesnt need to use lfs livecd ?right
is this right what i am saying,
if so how can i start ch6 without using lfscd
plz tell me as above(step wise plz)
thanku
 
Old 04-10-2011, 07:05 AM   #13
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374
Hi,
Quote:
Originally Posted by janakiramulu View Post
lfs:/mnt/lfs/sources$exit(i exited from lfs)
root[ ~ ]#chown -R root:root $LFS/tools
root[ ~ ]#echo $LFS
its iving /mnt/lfs
it should show root na according to note
That depends on what you mean by "it". $LFS/tools should now be owned by root.

Quote:
Originally Posted by janakiramulu
one more thing
till chapter 5 only i have to use lfslivecd(without distrubing,without power off)

while doing chapter 6 ,doesnt need to use lfs livecd ?right
is this right what i am saying
No, that is incorrect, you still need the liveCD.
 
1 members found this post helpful.
Old 04-11-2011, 01:36 AM   #14
janakiramulu
Member
 
Registered: Jan 2011
Location: mangalore
Distribution: ubuntu
Posts: 167

Original Poster
Rep: Reputation: 0
hi
druuna
thanks for reply

i used lfslivecd(continue) ...(lfs-6.7)

@6.2.2. Mounting and Populating /dev

root [ ~ ]# mount -v --bind /dev $LFS/dev
result is following
/dev on /dev type none (rw,bind)
is this right (i didnt get 'none' word),nothing wrong this one right?

shall i go forward,
 
Old 04-11-2011, 03:04 AM   #15
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374
Hi,

If there is no error shown you can continue.

The above shown output is not an error, it is the output generated by the -v (verbose) flag.
 
  


Reply

Tags
lfs, permission, user


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
[SOLVED] chown: changing ownership of `<file>': Operation not permitted schuurs Linux - General 14 06-26-2013 05:15 PM
5.32. Changing Ownership - Operation not permitted basheer Linux From Scratch 6 05-17-2012 04:57 AM
changing ownership of 'file name' : operation not permitted Virgil B Linux - Newbie 9 10-15-2010 05:16 PM
chmod: changing permissions of `public_html': Operation not permitted painterj Linux - Newbie 11 04-09-2010 09:40 PM
failed to preserve ownership operation not permitted yogks Linux - Software 1 11-27-2008 04:54 PM


All times are GMT -5. The time now is 09:22 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration