Re: user can't mount loop device...
Bart Schuller wrote:
> mke2fs just says
>
> mke2fs 1.19, 13-Jul-2000 for EXT2 FS 0.5b, 95/08/09
> /tmp/bla is not a block special device.
> Proceed anyway? (y,n) y
>
> and it works.
Dale Scheetz wrote:
> On my box:
>
> dwarf@dwarf:~$ mkdir ./image
> dwarf@dwarf:~$ dd if=/dev/zero of=./pkg.img bs=1024 count=100
> 100+0 records in
> 100+0 records out
> dwarf@dwarf:~$ losetup /dev/loop6 ./pkg.img
> bash: losetup: command not found
> dwarf@dwarf:~$ su
> Password:
> dwarf:/home/dwarf# losetup /dev/loop6 ./pkg.img
> dwarf:/home/dwarf# exit
> exit
> dwarf@dwarf:~$ mke2fs ./pkg.img
> bash: mke2fs: command not found
> dwarf@dwarf:~$ su
> Password:
> dwarf:/home/dwarf# mke2fs ./pkg.img
> mke2fs 1.19, 13-Jul-2000 for EXT2 FS 0.5b, 95/08/09
> ./pkg.img is not a block special device.
> Proceed anyway? (y,n)
>
> And works.
>
> Looks like you were working as root...
>
> For the losetup command, I don't own /dev/loop6, but for the mke2fs
> command, I _do_ own ./pkg.img, so ownership isn't enough. (at least for
> mke2fs it isn't)
Dale,
You've only shown that /sbin isn't in your path.
As a plain user:
$ dd if=/dev/zero of=./pkg.img bs=1024 count=100
100+0 records in
100+0 records out
$ /sbin/mke2fs ./pkg.img
mke2fs 1.18, 11-Nov-1999 for EXT2 FS 0.5b, 95/08/09
./pkg.img is not a block special device.
Proceed anyway? (y,n) y
Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
16 inodes, 100 blocks
5 blocks (5.00%) reserved for the super user
First data block=1
1 block group
8192 blocks per group, 8192 fragments per group
16 inodes per group
Writing inode tables: done
Writing superblocks and filesystem accounting information: done
Reply to: