LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 10-29-2006, 02:38 PM   #1
status1
Member
 
Registered: Sep 2006
Posts: 122

Rep: Reputation: 15
permission denied installing tar-1.14 at chapter 5.27


Hello,
I am working on building my first lfs with the lfs 6.0 book and cd.
I made it to chapter 6 earlier but I had a problem so I started from scratch.
I made it to chapter 6.9 when I realized that I must have skipped over the tar installation because it was not in the
/tools/bin
I thought it should have been simple just to login as lfs
user and instal tar but when I got to "make install"
I got an error /tools/bin/install : cannot create regular file '/tools/bin/tar': Permission denied
I know this installation worked before because I did not have any errors but now that I made it to chapter 6 and
I changed to user root I am thinking that even if I am user
lfs it's not allowing me to make any changes to /tools/bin
It's a bit strange because if I type ls -ld /mnt/lfs/tools
I get drwx-xr-x 16 lfs root 4096
But if I type ls -ld /mnt/lfs/tools/bin I get
drwx-xr-x 2 root root 4096

It looks like the /bin directory does not have the same
user as /tools.
Is there a way to make the /bin have the same privilages as the /tools ?
 
Old 10-29-2006, 04:17 PM   #2
zhangmaike
Member
 
Registered: Oct 2004
Distribution: Slackware
Posts: 376

Rep: Reputation: 31
Quote:
Is there a way to make the /bin have the same privilages as the /tools ?
See man chown.

Assuming you mean /tools/bin:

Code:
# chown lfs:root /tools/bin
Will make /tools/bin owned by the user lfs and group root.
 
Old 10-29-2006, 06:43 PM   #3
status1
Member
 
Registered: Sep 2006
Posts: 122

Original Poster
Rep: Reputation: 15
Hello,
Thanks for the reply but it did not do what I thought it would
I changed the command to chown lfs:root /bin because that is what I have problem with.
I had to be su to be able to do it but even after saying that/bin has lfs
ownership after typing ls -l I still get drwx-xr-x 2 root root 4096
If I try chmod command on /bin I get
Chmod: changing permissions of '/bin' : Read only file system
How can it be read only if I just created it not long ago ?
 
Old 10-29-2006, 07:35 PM   #4
zhangmaike
Member
 
Registered: Oct 2004
Distribution: Slackware
Posts: 376

Rep: Reputation: 31
Could you post the output of:
Code:
mount
 
Old 10-30-2006, 06:04 PM   #5
status1
Member
 
Registered: Sep 2006
Posts: 122

Original Poster
Rep: Reputation: 15
Hello,
Here is the output for mount
rootfs on / type rootfs (rw)
proc on /proc type proc (rw, nodiratime)
sysfs on /sys type sysfs (rw)
/dev/hdc on ./cdrom type iso9660 (ro)
none on /dev type ramfs (rw)
none on /dev/pts type devpts (rw)
none on /de/shm type tmpfs (rw)
/dev/loop0 on /usr /type squashfs (ro)
/dev/loop1 on /opt type squashfs (ro)
usbfs on /proc/bus/usb type usbfs (rw)
/dev/fd0 on /mnt/floppy type ext2 (rw)
/dev/hda7 on /mnt/lfs type ext2 (rw)
 
Old 10-31-2006, 03:38 PM   #6
zhangmaike
Member
 
Registered: Oct 2004
Distribution: Slackware
Posts: 376

Rep: Reputation: 31
It doesn't look like /bin resides on a read-only file system.

If you want /bin to be owned by the user lfs and group root, chown is the command to use. I'm surprised that it's not working.

Just to make sure that you're doing what I think you're doing, could you post the output of the following commands as you run them, in order:
Code:
$ su
# chown lfs:root /bin
# exit
$ mount
 
Old 10-31-2006, 06:37 PM   #7
status1
Member
 
Registered: Sep 2006
Posts: 122

Original Poster
Rep: Reputation: 15
Hello,
I assume I am running those commands from the lfs environment

su
root:/home/lfs #
chown lfs:root /bin
I had no output for this but I tried it with the -v and it said that ownership
of /bin was retained by lfs
exit gets me back to lfs environment

Correct me if I am wrong but I don't think the mount will show the /bin directory itself as being mounted
The output is the same as before
I tried the /bin directory but I still don't have permission to write while I am inside the lfs environment
 
Old 10-31-2006, 07:06 PM   #8
status1
Member
 
Registered: Sep 2006
Posts: 122

Original Poster
Rep: Reputation: 15
Hello,
I am not sure if this is the right way to do it but I found a way.

I found out by looking at the passwd in /etc that lfs has the uid of 1002
and gid of 101
So then I went inside chroot and typed chown -R 1002:101 /tools then I checked the /bin and I saw that it finally changed to lfs.
Then I was able to install tar with no problems.
After that I went back into chroot to change back the chown command to the original that was in the book
I just hope everything is back the way it should be and not have some other
unforseen consequences later on
 
  


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
Cannot boot FC5 after installing (permission denied) rjswilson Fedora 3 04-26-2006 01:48 AM
"...Permission denied" when installing Enemy Territory JasperP Linux - Games 2 09-02-2005 11:06 PM
Permission Denied while installing new jar library for my new application lavinal Linux - Software 1 09-02-2004 04:47 AM
Problems unzipping a *.tar.gz file --permission denied? mfarley Linux - Newbie 3 07-22-2003 05:07 PM
Permission Denied installing Quake 3? Lord-Rashid Linux - Software 5 04-17-2003 08:53 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 03:03 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