On 18/12/2016 10:17, David D wrote: > Hello everyone, this is my very first message on a mailing list so please > excuse me if something wrong. > I searched through archive and couldn't find an answer maybe because it is a > very silly issue, but it is keeping me stuck here. > > I created my working dir under my//home/david/ directory. In fact, my $LFS > variable is set to//home/david/lfs/ as far as I can see with /echo $LFS/. > > When I try to mount it with /mount -v -t ext4 /dev/sda7 $LFS /it says that > only /root /can use -types. Ok, I remove the type and it keeps complaining > about that only /root /can do that. > / > mount -v -t ext4 /dev/sda7 $LFS > mount: solo root puede usar la opción «-typ/es» > > /mount -v /dev/sda7 $LFS > mount: solo root puede hace eso/ > > Of couruse I can type /sudo mount -v -t ext4 /dev/sda7 $LFS /but root will > take ownership of the //home/david/lfs /directory and forces me to type /sudo/ > before any command beyond chapter 2.7 to work inside that directory/./ > > /-rw-r--r-- 1 david david 8980 nov 22 23:45 examples.desktop > drwxr-xr-x 2 david david 4096 nov 23 00:47 Imágenes > drwxrwxr-x 2 david david 4096 dic 16 17:31 lfs > -rw-rw-r-- 1 david david 167 dic 15 16:37 library-check.sh > drwxr-xr-x 2 david david 4096 nov 23 00:47 Música/ > > /-rw-r--r-- 1 david david 8980 nov 22 23:45 examples.desktop > drwxr-xr-x 2 david david 4096 nov 23 00:47 Imágenes > drwxr-xr-x 3 root root 4096 dic 16 17:26 lfs > -rw-rw-r-- 1 david david 167 dic 15 16:37 library-check.sh > drwxr-xr-x 2 david david 4096 nov 23 00:47 Músi/ca > > I can also do /sudo su /and work with that user but it hasn't the $LFS > variable set (I don't know how to do that in /.bashrc/, I set it for user > /david /with that method, but can't set it for /root/) > > Now I wonder if I should try to fix it and make user /david/ able to mount > from command line or I should take the /sudo /way. If I choose the /sudo /way, > will it have some impact further in the book? Having that folder owned by > /root/ instead of /david/ could cause some issue further in the book? > > Thanks a lot!! >
Hi David, Only root can mount filesystems. That's it... When doing so, root does not gain ownership of lfs in your home directory, but it has ownership of the root of the /dev/sda7 filesystem, and this is what is shown. Try "sudo mount /dev/sda7 $LFS" "ls -al $LFS" It should show that . is owned by root, but .. is owned by you. Now type "sudo umount $LFS" ls -al $LFS both . and .. are owned by you. So this not a problem. Just follow the book. User permissions and the like are dealt with in chapter 4. 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
