I have a Linux machine where my user (non-root) user is assigned the group user_group
.
I am using a special package manager called spack and would like to use it in a directory where only root users have write and execute permissions. I installed it there using sudo and then added those modifications to the directory itself:
sudo chgrp -R user_group spack/
sudo chmod -R +rwx spack/
Now I am able to use this package-manager to install some packages. for other packages however, it returns the following error:
...
==> Installing nasm-2.15.05-xfzo4rjbzpriugrjmr7ecszho4jowvku
==> No binary for nasm-2.15.05-xfzo4rjbzpriugrjmr7ecszho4jowvku found: installin g from source
==> Fetching https://mirror.spack.io/_source-cache/archive/3c/3caf6729c1073bf966 29b57cee31eeb54f4f8129b01902c73428836550b30a3f.tar.xz
==> Error: PermissionError: [Errno 13] Permission denied: '/usr/local/etc/spack/ var/spack/cache/_source-cache/archive/3c/3caf6729c1073bf96629b57cee31eeb54f4f812 9b01902c73428836550b30a3f.tar.xz'
/usr/local/etc/spack/lib/spack/spack/package.py:1401, in do_fetch:
1398
1399 if checksum and self.version in self.versions:
1400 self.stage.check()
>> 1401
1402 self.stage.cache_local()
1403
1404 for patch in self.spec.patches:
...
My guess is that this newly created folder does not yet have the permissions I have granted all the other already present files. Is there any way I can prevent this from happening? How can I still download and install packages in this situation?