Permission denied when installing Anaconda3 on Raspberry Pi Network Attached Storage (NAS)

时光怂恿深爱的人放手 提交于 2021-01-07 02:41:07

问题


Samba

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

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
  • I tried installing Anaconda on the same Linux client with a different Samba account and got the same error.
  • I tried installing the latest version of Miniconda with both Samba users on the Ubuntu 18 client and got the same error.

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

  • Also on the Ubuntu 16 client, I tried installing the latest version of Miniconda and I got the same error as shown above for both Samba accounts.

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
  • On the Ubuntu 16 client, it looks exactly like this, except the user's name is different, but they both have uid=1000 and gid=1000.

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

  • Instead of the folder and file names except for the anaconda3 folder, I added the rights (user, group, other) and the name of the user and group which owns the folders and files on the Raspberry Pi. As you can see, when I am logged in with the user pi, every file, folder, and subfolder in the mount point directory belongs to the user pi and the group pi.

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

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.

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.

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)

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

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!

来源:https://stackoverflow.com/questions/65519287/permission-denied-when-installing-anaconda3-on-raspberry-pi-network-attached-sto

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!