在 Raspberry Pi 网络附加存储 (NAS) 上安装 Anaconda3 时权限被拒绝 [英] Permission denied when installing Anaconda3 on Raspberry Pi Network Attached Storage (NAS)
问题描述
我在 Raspberry Pi 4b 上安装了 Raspbian Lite 和 Samba.我从 Linux (Ubuntu 18.04.5 LTS) 客户端访问 Raspberry Pi.我正在使用 bash 并且 ufw 在两台机器上都处于非活动状态.下面是我的 smb.conf 文件.
I installed Raspbian Lite and Samba on my Raspberry Pi 4b. I access the Raspberry Pi from a Linux (Ubuntu 18.04.5 LTS) client. I am using bash and ufw is inactive on both machines. Below is my smb.conf file.
[global]
workgroup = WORKGROUP
log file = /var/log/samba/log.%m
max log size = 1000
logging = file
panic action = /usr/share/samba/panic-action %d
server role = standalone server
obey pam restrictions = yes
unix password sync = yes
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
pam password change = yes
map to guest = bad user
usershare allow guests = yes
[homes]
comment = Home Directories
browseable = no
read only = yes
create mask = 0700
directory mask = 0700
valid users = %S
[printers]
comment = All Printers
browseable = no
path = /var/spool/samba
printable = yes
guest ok = yes
read only = yes
create mask = 0700
[print$]
comment = Printer Drivers
path = /var/lib/samba/printers
browseable = yes
read only = no
guest ok = no
[home]
path = /mnt/raid1
writeable = yes
create mask = 0777
directory mask = 0777
public = no
read only = no
browseable = yes
我正在尝试在 Linux x86_64 机器上安装最新版本的 Anaconda,并将 PREFIX 设置为位于 NAS 上的文件夹.我正在尝试按照文档中的说明安装 Anaconda.我可以在外部硬盘驱动器或本地硬盘驱动器上安装 Anaconda,没有任何问题.我还从 Windows 10(64 位)客户端访问 NAS.当我在 Windows 10 客户端上安装 Anaconda 并在我的 NAS 上选择一个文件夹作为目标文件夹时,它也可以工作.但是,当我尝试在 Linux 机器上安装 Anaconda3 并将 PREFIX 设置为我的 NAS 上的文件夹时,出现以下错误:
I am trying to install the latest version of Anaconda on a Linux x86_64 machine with PREFIX set to a folder that is located on a NAS. I am trying to install Anaconda as explained in the documentation. I can install Anaconda on an external hard drive or the local hard drive without any problems. I also access the NAS from a Windows 10 (64-bit) client. When I install Anaconda on the Windows 10 client and select a folder on my NAS as the destination folder, it works too. However, when I try to install Anaconda3 on the Linux machine with PREFIX set to a folder on my NAS, I get the following error:
Unpacking payload ...
Downloads/Anaconda3-2020.11-Linux-x86_64.sh: Line 412: /media/samba/niko/anaconda3/conda.exe: Permission Denied
Downloads/Anaconda3-2020.11-Linux-x86_64.sh: Line 414: /media/samba/niko/anaconda3/conda.exe: Permission Denied
- 我尝试使用不同的 Samba 帐户在同一个 Linux 客户端上安装 Anaconda,但遇到了同样的错误.
- 我尝试在 Ubuntu 18 客户端上与两个 Samba 用户一起安装最新版本的 Miniconda,但遇到了同样的错误.
我尝试使用相同的两个 Samba 帐户在我的网络上的另一台 Linux 机器(Ubuntu 16.04.7 LTS)上安装 Anaconda3.不幸的是,我收到两个用户的以下错误:
I tried installing Anaconda3 on another Linux machine (Ubuntu 16.04.7 LTS) on my network with the same two Samba accounts. Unfortunately, I get the following error for both users:
PREFIX=/Path/To/anaconda3
Unpacking payload ...
0%| | 0/36 [00:00<?, ?it/s]
Could not remove or rename /$PREFIX/pkgs/libedit-3.1.20191231-h14c3975_1o4380296/pkg-libedit-3.1.20191231-h14c3975_1.tar.zst. Please remove this file manually (you may need to reboot to free file handles)
concurrent.futures.process._RemoteTraceback:
'''
Traceback (most recent call last):
File "concurrent/futures/process.py", line 368, in _queue_management_worker
File "multiprocessing/connection.py", line 251, in recv
TypeError: __init__() missing 1 required positional argument: 'msg'
'''
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "entry_point.py", line 69, in <module>
File "concurrent/futures/process.py", line 484, in _chain_from_iterable_of_lists
File "concurrent/futures/_base.py", line 611, in result_iterator
File "concurrent/futures/_base.py", line 439, in result
File "concurrent/futures/_base.py", line 388, in __get_result
concurrent.futures.process.BrokenProcessPool: A process in the process pool was terminated abruptly while the future was running or pending.
[5437] Failed to execute script entry_point
- 也在 Ubuntu 16 客户端上,我尝试安装最新版本的 Miniconda,但我遇到了与上述两个 Samba 帐户相同的错误.
以下是我的 NAS 和 Linux 客户端上的 anaconda3 目录的挂载点的权限和所有者
Below are the rights and owner of the mount point from my NAS and the anaconda3 directory on my Linux client
drwxr-xr-x niko niko mount point (niko is the user account on my Linux client Ubuntu 18)
├── drwxr-xr-x 2 niko niko anaconda3
│ └── -rwxr-xr-x 1 niko niko conda.exe
└── some folder
- 在 Ubuntu 16 客户端上,它看起来完全像这样,只是用户名不同,但它们都有 uid=1000 和 gid=1000.
这里是树莓派硬盘挂载点上文件夹的权限和所有者,可以使用 SMB 协议通过网络访问
Here are the rights and owners of the folders on the mount point of my hard drive on the Raspberry Pi that can be accessed over the network using SMB protocol
drwxr-xr-x 7 pi pi mount point
├── some folder
├── drwx------ 2 pi pi
├── some folder
├── drwx------ 4 pi pi
│ ├── drwxrwxrwx 2 pi pi anaconda3
│ │ └── -rwxrw-rw- 1 pi pi conda.exe
│ └── drwxrwxrwx 3 pi pi
│ └── drwxrwxrwx 20 pi pi
│ ├── drwxrwxrwx 41 pi pi
│ └── -rwxrw-rw- 1 pi pi
└── some folder
- 除了 anaconda3 文件夹之外,我添加了权限(用户、组、其他)以及拥有 Raspberry Pi 上的文件夹和文件的用户和组的名称,而不是文件夹和文件名.如您所见,当我以用户 pi 登录时,挂载点目录中的每个文件、文件夹和子文件夹都属于用户 pi 和组 pi.
这是 /etc/fstab
我用来自动挂载 Samba 服务器的行
Here is the line from /etc/fstab
I use to automount the Samba server
//192.168.178.96/home /media/samba cifs credentials=/Path/To/My/Credentials,users,uid=1000,gid=1000 0 0
NFS
我在 Raspberry Pi 上安装并配置了 NFS 服务器.然后我还尝试使用 NFS 协议在我的 Ubuntu 18 客户端上安装最新版本的 Anaconda 和 Miniconda.但是我遇到了和使用 SMB 协议时一样的错误.
NFS
I installed and configured the NFS server on my Raspberry Pi. Then I also tried installing the latest version of Anaconda and Miniconda on my Ubuntu 18 client using the NFS protocol. But I get the same error that I get when using the SMB protocol.
Ubuntu 18客户端NFS服务器挂载点和树莓派硬盘挂载点的权限和所有者与Samba部分提到的两个挂载点相同.
The rights and owners of the mount point of the NFS server on the Ubuntu 18 client and the mount point of the hard drives on the Raspberry Pi are identical to the two mount points mentioned in the Samba section.
下面是我在树莓派上的 /etc/exports
文件
Below is my /etc/exports
file on the Raspberry Pi
/mnt/nfs/niko/Ubuntu 192.168.178.0/24(rw,sync,insecure,no_subtree_check,no_root_squash,anonuid=1000,anongid=1000)
这是 /etc/fstab
我用来自动挂载 NFS 服务器的行
Here is the line from /etc/fstab
I use to automount the NFS server
192.168.178.96:/mnt/nfs/niko/Ubuntu /media/nfs nfs rw,user,hard,intr 0 0
这是位于 Linux 客户端上的 anaconda-installer.sh 和 miniconda-installer.sh 文件的权利和所有者
Here are the rights and owner of the anaconda-installer.sh and miniconda-installer.sh file, which are located on the Linux clients
-rw-rw-r-- 1 username groupname Anaconda3-2020.11-Linux-x86_64.sh
-rw-rw-r-- 1 username groupname Miniconda3-latest-Linux-x86_64.sh
提前感谢您的帮助和反馈!
Thanks in advance for your help and feedback!
推荐答案
请注意,当前/opt/anaconda 必须是受支持的文件系统,例如 ext4 或 xfs,并且不能是 NFS 挂载点./opt/anaconda 的子目录可以通过 NFS 挂载.例如,对象存储服务支持 NFS 后端.
Note that currently /opt/anaconda must be a supported filesystem such as ext4 or xfs and cannot be an NFS mountpoint. Subdirectories of /opt/anaconda may be mounted through NFS. For example, the Object Storage service supports an NFS backend.
(https://enterprise-docs.anaconda.com/en/docs-site-5.0.6/admin-guide/install/requirements.html)
这篇关于在 Raspberry Pi 网络附加存储 (NAS) 上安装 Anaconda3 时权限被拒绝的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!