Le 14/12/2014 22:07, [email protected] a écrit :
>
> On Mon, Dec 15, 2014 at 03:52 AM, [email protected] wrote:
>
>
>
> On Mon, Dec 15, 2014 at 03:45 AM, "Ken Moffat" <[email protected]
> <mailto:[email protected]>> wrote:
>
> On Sun, Dec 14, 2014 at 08:33:09PM +0000, [email protected]
> <mailto:[email protected]> wrote:
>
> lfs:/mnt/lfs/sources$ ls -l $LFS/sources
> total 330724
> -rw------- 1 root root 238860 Dec 15 01:45
> XML-Parser-2.42_01.tar.gz
> -rw------- 1 root root 386604 Dec 15 01:45 acl-2.2.52.src.tar.gz
> -rw------- 1 root root 343692 Dec 15 01:45
> attr-2.4.47.src.tar.gz
> -rw------- 1 root root 1214744 Dec 15 01:45 autoconf-2.69.tar.xz
> -rw------- 1 root root 1488984 Dec 15 01:45
> automake-1.14.1.tar.xz
>
>
>
> So, only root, or somebody who is in the 'root' group (if that
> even exists) can read those files. That sounds ok for a normal
> system, but your lfs user will need to be able to read them.
>
> I assume you created $LFS/sources as root, so now root needs to
> chown those files.
>
> ĸen
> --
>
>
> Juast as root, I copied the packages locally as root
>
>
> cp -r /home/student/lfs/packages/* /mnt/lfs/sources
> cp -r /home/student/lfs/patchs/* /mnt/lfs/sources
>
> I think I should the permissions for all packages
>
>
>
>
> Sorry that was wrong sending
> ==================================================
>
> I tried this command but not working
>
> chmod -v a+wt /mnt/lfs/sources/*
> ---------------------------------------------
> lfs:/mnt/lfs/sources$ su
> Password:
> root:/mnt/lfs/sources# cd /mnt/lfs
> root:/mnt/lfs# chmod -v a+wt /mnt/lfs/sources/*
> mode of '/mnt/lfs/sources/XML-Parser-2.42_01.tar.gz' changed from 0600
> (rw-------) to 1622 (rw--w--wT)
> mode of '/mnt/lfs/sources/acl-2.2.52.src.tar.gz' changed from 0600 (rw-------)
> to 1622 (rw--w--wT)
> mode of '/mnt/lfs/sources/attr-2.4.47.src.tar.gz' changed from 0600
> (rw-------) to 1622 (rw--w--wT)
> mode of '/mnt/lfs/sources/autoconf-2.69.tar.xz' changed from 0600 (rw-------)
> to 1622 (rw--w--wT)
> mode of '/mnt/lfs/sources/automake-1.14.1.tar.xz' changed from 0600
> (rw-------) to 1622 (rw--w--wT)
> mode of '/mnt/lfs/sources/bash-4.3-upstream_fixes-3.patch' changed from 0600
> (rw-------) to 1622 (rw--w--wT)
>
> ------------------------------------------------------
> root:/mnt/lfs# su - lfs
> lfs:~$ cd /mnt/lfs/sources
> lfs:/mnt/lfs/sources$ ls -l
> total 330724
> -rw--w--wT 1 root root 238860 Dec 15 01:45 XML-Parser-2.42_01.tar.gz
> -rw--w--wT 1 root root 386604 Dec 15 01:45 acl-2.2.52.src.tar.gz
> -rw--w--wT 1 root root 343692 Dec 15 01:45 attr-2.4.47.src.tar.gz
> -rw--w--wT 1 root root 1214744 Dec 15 01:45 autoconf-2.69.tar.xz
> -rw--w--wT 1 root root 1488984 Dec 15 01:45 automake-1.14.1.tar.xz
> -rw--w--wT 1 root root 27825 Dec 15 01:46 bash-4.3-upstream_fixes-3.patch
> -rw--w--wT 1 root root 7955839 Dec 15 01:45 bash-4.3.tar.gz
>
> ----------------------------------------
>
> lfs:/mnt/lfs/sources$ tar -xf binutils-2.24.tar.bz2
> tar: binutils-2.24.tar.bz2: Cannot open: Permission denied
> tar: Error is not recoverable: exiting now
> lfs:/mnt/lfs/sources$
>
>
You should really try to understand permissions, and how to change them. Let
me give you a summary:
- all files are _owned_ by a user and a group. The user is the first
"readable" (after the -rw--w--wT cryptic field) field when using "ls -l", the
group is the second one.
- all users belong to a number of groups (at least one). You can know the
groups you belong too when issuing "groups".
- permissions are given to 3 different sets of users:
- the only user owning the file: called 'u' in the following
- the users belonging to the group owning the file: called 'g'. 'u' belongs
to that set only if he or she is member of group 'g'.
- the other users: called 'o'. Neither 'u' nor members of 'g' belong to that
set.
- when using ls -l, you see permissions on the left, after the first character
on the line. The first character on the line gives you the type of the file (-
for a regular file, d for a directory, etc).
- then, there are 3 characters for the 'u' permissions: first char is "r"
for read permission and "-" for no read permission. Second char is "w" for
write permission (including deleting the file), or "-" for no write
permission. Third char is "x" for execute permission, or "-" for no execute
permission.
- then come the 3 characters for the 'g' permissions (same letters)
- then come the 3 characters for the 'o' permissions (same letters again)
- it may be somewhat different when some other attribute are set for the
file (for example the capital T above), but I let you figure the meaning by
yourself.
- permissions can be set for 'u' by issuing "chmod u+<perm> <file>", where
perm is r, w, x, or rw, rx, wx, or rwx. I hope you understand the meaning.
They can be unset with u-<perm>. Only the owner of the file can "chmod" it.
- for 'g', you use g+<perm> or g-<perm>
- for 'o', you use o+<perm> or o-<perm>
- you can use also ug+/-<perm>, uo+/-<perm>, og+/-<perm>, or ugo+/-<perm>. The
last one can be shortened to a+/-<perm> ('a' is for "all").
- permissions can be given to chmod in octal: ooo, where o is a number between
0 and 7 and the first one is for 'u' permission, the second one for 'g', and
the last one for 'o'. Each number is made of 3 bits: first one for "r", second
one for "w", last one for "x". for example rwxr-xr-- is written 754
The superuser ("root") can use chown to change the owner of a file. Regular
users cannot change ownership of a file.
So what you need to do:
(as root) : chown lfs /sources/*
(as lfs) : chmod 644 /sources/*
What you have done gives you "write" permission, but no "read"!
Pierre
--
http://lists.linuxfromscratch.org/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page
Do not top post on this list.
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?
http://en.wikipedia.org/wiki/Posting_style