在 Ubuntu 18.04 x64 和 Ubuntu 18.04 Arm64 之间配置 NFS 服务器和客户端时出现权限问题

在 Ubuntu 18.04 x64 和 Ubuntu 18.04 Arm64 之间配置 NFS 服务器和客户端时出现权限问题

因为我的jetson nano的sd卡上有一点空间,所以我在Ubuntu 18.04 x64位上安装了nfs服务器,并在jetson nano上安装了ubuntu 18.04 for arm64上的nfs公共客户端。我已经遵循了这个教程:

https://www.howtoing.com/install-nfs-server-on-ubuntu/

我已发出以下命令:

在服务器端:

sudo chown -R nobody:nogroup /home/loziomario/Scrivania/Nano/qemu-chroot-I9

chmod -R 777 /home/loziomario/Scrivania/Nano/qemu-chroot-I9

在客户端/jetson nano方面:

sudo chown -R nobody:nogroup /root/Scrivania/Work/qemu-chroot-I9

chmod -R 777 /root/Scrivania/Work/qemu-chroot-I9

然后我创建了一个像这样的脚本:

xhost +

sudo mount 192.168.1.6:/home/loziomario/Scrivania/Nano/qemu-chroot-I9  /root/Scrivania/Work/qemu-chroot-I9

sudo mount -t sysfs /sys/ /root/Scrivania/Work/qemu-chroot-I9/chroot-bionic-i386/sys/

sudo mount -t proc /proc/ /root/Scrivania/Work/qemu-chroot-I9/chroot-bionic-i386/proc/

sudo mount --bind /dev /root/Scrivania/Work/qemu-chroot-I9/chroot-bionic-i386/dev/

sudo mount --bind /dev/pts /root/Scrivania/Work/qemu-chroot-I9/chroot-bionic-i386/dev/pts/

sudo mount --bind /dev/shm /root/Scrivania/Work/qemu-chroot-I9/chroot-bionic-i386/dev/shm/

我已使用以下命令登录 chroot:

sudo chroot /root/Scrivania/Work/qemu-chroot-I9/chroot-bionic-i386/ /bin/su -l root

Ok.

我尝试更新和升级 i386 chroot 的软件包,结果是这样的:

apt update

.......

Run 'apt list --upgradable' to see it.

W: chown to _apt:root of directory /var/lib/apt/lists/partial failed

- SetupAPTPartialDirectory (1: Operation not permitted)

W: chown to _apt:root of directory /var/lib/apt/lists/auxfiles failed -

SetupAPTPartialDirectory (1: Operation not permitted)

W: Not using locking for nfs mounted lock file /var/lib/apt/lists/lock

W: Download is performed unsandboxed as root as file '/var/lib/apt/lists/partial/archive.ubuntu.com_ubuntu_dists_bionic_InRelease' couldn't be accessed by user '_apt'. -

pkgAcquire::Run (13: Permission denied)W: chown to root:root of file /var/lib/apt/lists/partial/it.archive.ubuntu.com_ubuntu_dists_bionic_InRelease failed - Operation not permitted)


root@ziomario-desktop:~# apt upgrade


Reading package lists... DoneBuilding dependency tree      

Reading state information... Done

Calculating upgrade... Done

The following packages will be upgraded:  teamviewer1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Need to get 15.6 MB of archives. After this operation, 0 B of additional disk space will be used.

W: Not using locking for nfs mounted lock file /var/lib/dpkg/lock-frontendW: Not using locking for nfs mounted lock file /var/lib/dpkg/lockW:

chown to _apt:root of directory /var/cache/apt/archives/partial failed

- SetupAPTPartialDirectory (1: Operation not permitted)

W: chown to _apt:root of directory /var/lib/apt/lists/auxfiles failed

- SetupAPTPartialDirectory (1: Operation not permitted)

W: Not using locking for nfs mounted lock file /var/cache/apt/archives/lock

Do you want to continue? [Y/n]

权限有问题吗?我不明白出了什么问题。

这就是我在服务器端配置 NFS 的方式:

sudo nano /etc/exports

/home/loziomario/Scrivania/Nano/qemu-chroot-I9  192.168.1.3(rw,sync,no_subtree_check)

在哪里 :

192.168.1.3: 是nano的ip

/home/loziomario/Scrivania/Nano/qemu-chroot-I9:我只想让 Nano 的 IP 号码可用的文件夹

在客户端/纳米方面我做了:

sudo mount 192.168.1.6:/home/loziomario/Scrivania/Nano/qemu-chroot-I9  /root/Scrivania/Work/qemu-chroot-I9

在哪里 :

192.168.1.6:是服务器的IP,ubuntu 18.04 64位
/home/loziomario/Scrivania/Nano/qemu-chroot-I9:是我想要让>可用于client-nano的服务器的文件夹
/root/Scrivania/work/qemu-chroot-I9:是我想要挂载>服务器的文件夹的文件夹

这是保存 chroot i386 的混合完整(网络)路径,我想通过 nano 访问它:

/root/Scrivania/Work/qemu-chroot-I9/chroot-bionic-i386/

我希望一切都清楚,并且有人可以给我一些好的建议来解决我遇到的权限问题。谢谢。

相关内容