ALT Linux Sisyphus discussions
 help / color / mirror / Atom feed
From: "Михаил Радюк" <torabora08@gmail.com>
To: ALT Linux Sisyphus discussions <sisyphus@lists.altlinux.org>
Subject: Re: [sisyphus] Возможно ли в хашер пробросить реальную ФС?
Date: Tue, 12 Feb 2013 20:59:30 +0400
Message-ID: <CAH5o5+E=JpaJn55K-03PH+4XT3j3tcnSYEuTmFm+Vt4425Mp2Q@mail.gmail.com> (raw)
In-Reply-To: <20130212142136.GB17893@altlinux.org>

12 февраля 2013 г., 18:21 пользователь Dmitry V. Levin
<ldv@altlinux.org> написал:
> On Tue, Feb 12, 2013 at 03:09:28PM +0400, Михаил Радюк wrote:
>> 12 февраля 2013 г., 13:30 пользователь Dmitry V. Levin
>> <ldv@altlinux.org> написал:
>> > On Tue, Feb 12, 2013 at 01:14:11PM +0400, Михаил Радюк wrote:
>> >> Здравствуйте!
>> >> Возникла задача, которая требует монтирования реальной файловой
>> >> системы в хашер, подскажите возможно ли такое вообще? Судя по
>> >> http://lists.altlinux.org/pipermail/sisyphus/2008-March/329281.html
>> >> вроде возможно, но никак не получается.
>> >
>> > Да, монтирование средствами hasher-priv возможно.
>> >
>>
>> Пытаюсь примонтировать /mnt/repo в хашер, в чем беда не пойму.
>> Что настроено:
>> cat /etc/hasher-priv/fstab
>> /mnt/repo    /mnt/repo  bind   bind 0 0
>>
>> cat /etc/hasher-priv/system
>> prefix=~:/tmp/.private
>> allowed_mountpoints=/mnt/repo
>>
>> cat /etc/hasher-priv/user.d/mike
>> user1=mike_a
>> user2=mike_b
>> allowed_mountpoints=/mnt/repo
>>
>> hsh --apt-config=apt.conf_sisyphus --initroot-only ~/hasher-sisyphus
>>
>> При попытке зайти в шелл
>> hsh-shell ~/hasher-sisyphus/ --mount='/mnt/repo'
>> hasher-priv: mnt: expected owner 500, found owner 501
>>
>> При попытке изменить права
>>  chgrp -- `/usr/libexec/hasher-priv/hasher-priv getugid1 |cut -d: -f2`
>> ~/hasher-sisyphus/chroot/mnt/repo
>> chgrp: невозможно получить доступ к
>> <</home/mike/hasher-sisyphus/chroot/mnt/repo>>: Нет такого файла или
>> каталога
>
> Речь идет не о ~/hasher-sisyphus/chroot/mnt/repo, а о вышестоящем
> ~/hasher-sisyphus/chroot/mnt; либо он должен принадлежать тому же
> пользователю, что и ~/hasher-sisyphus/chroot, либо, как мне больше
> нравится, вместо chroot/mnt/ можно использовать chroot/.host/.
>

Заменил /mnt/repo на /.host/repo в конфигурационных файлах, инициировал хашер
hsh --apt-config=/home/mike/apt/apt.conf_sisyphus --initroot-only
~/hasher-sisyphus
создал .host/repo
mkdir ~/hasher-sisyphus/chroot/.host/repo
сменил группу на repo
chgrp -- `/usr/libexec/hasher-priv/hasher-priv getugid1 |cut -d: -f2`
~/hasher-sisyphus/chroot/.host/repo
Пытаюсь войти в шелл
hsh-shell ~/hasher-sisyphus/ --mount='/.host/repo'
hasher-priv: .host: expected group 501, found group 500

сменил группу на .host
chgrp -- `/usr/libexec/hasher-priv/hasher-priv getugid1 |cut -d: -f2`
~/hasher-sisyphus/chroot/.host

Захожу в шелл без ошибок, но repo нигде не вижу

hsh-shell ~/hasher-sisyphus/ --mount='/.host/repo'
cd /&&find -type d -name 'repo'
find: './var/nobody': Permission denied
find: './var/spool/mail': Permission denied
find: './var/lock/subsys': Permission denied
find: './var/lock/serial': Permission denied
find: './var/lock/uucp': Permission denied
find: './var/cache/ldconfig': Permission denied
find: './.host': Permission denied
find: './usr/lib/chkpwd': Permission denied
find: './etc/tcb': Permission denied
find: './etc/default': Permission denied
find: './root': Permission denied
find: './lib/modules': Permission denied
find: './boot': Permission denied

Прошу помощи, я чего-то не понимаю.

-- 
С уважением, Михаил.

  reply	other threads:[~2013-02-12 16:59 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-12  9:14 Михаил Радюк
2013-02-12  9:30 ` Dmitry V. Levin
2013-02-12 10:03   ` Motsyo Gennadi aka Drool
2013-02-12 11:09   ` Михаил Радюк
2013-02-12 14:21     ` Dmitry V. Levin
2013-02-12 16:59       ` Михаил Радюк [this message]
2013-02-12 17:20         ` Dmitry V. Levin
2013-02-12 17:36           ` Михаил Радюк

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAH5o5+E=JpaJn55K-03PH+4XT3j3tcnSYEuTmFm+Vt4425Mp2Q@mail.gmail.com' \
    --to=torabora08@gmail.com \
    --cc=sisyphus@lists.altlinux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ALT Linux Sisyphus discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/sisyphus/0 sisyphus/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 sisyphus sisyphus/ http://lore.altlinux.org/sisyphus \
		sisyphus@altlinux.ru sisyphus@altlinux.org sisyphus@lists.altlinux.org sisyphus@lists.altlinux.ru sisyphus@lists.altlinux.com sisyphus@linuxteam.iplabs.ru sisyphus@list.linux-os.ru
	public-inbox-index sisyphus

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.sisyphus


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git