Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chown permission denied building with --fakeroot #4928

Closed
dn-ra opened this issue Jan 7, 2020 · 3 comments
Closed

chown permission denied building with --fakeroot #4928

dn-ra opened this issue Jan 7, 2020 · 3 comments

Comments

@dn-ra
Copy link

dn-ra commented Jan 7, 2020

Hello,

I'm new to singularity and have built some simple images successfully.

At this point I am trying to build an image that has an 8gb sequence database in it, so I have set a tempdir with $SINGULARITY_TMPDIR and that works for copying my files and starting the build. I am not root and cannot be made root.

But when it tries to install a dependency for git I am getting a fatal error:

Errors were encountered while processing: openssh-client W: 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: Download is performed unsandboxed as root as file '/var/cache/apt/archives/partial/perl-base_5.26.2-7ubuntu0.1_amd64.deb' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied) W: chown to root:adm of file /var/log/apt/term.log failed - OpenLog (1: Operation not permitted) E: Sub-process /usr/bin/dpkg returned an error code (1)
What am I missing?

I've attached the debug output.
debug.log

Version of Singularity:

3.4.2-1

Expected behavior

Should install without root privileges (and has been successfully installed as such prior to setting SINGULARITY_TEMPDIR

Actual behavior

Fatal error installing openssh-client as a dependency for git

Steps to reproduce this behavior

See attached .def file
def_file.txt

What OS/distro are you running

NAME="Ubuntu" VERSION="18.04.3 LTS (Bionic Beaver)" ID=ubuntu ID_LIKE=debian PRETTY_NAME="Ubuntu 18.04.3 LTS" VERSION_ID="18.04" HOME_URL="https://www.ubuntu.com/" SUPPORT_URL="https://help.ubuntu.com/" BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/" PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy" VERSION_CODENAME=bionic UBUNTU_CODENAME=bionic

How did you install Singularity

From source, standard install.

@cclerget
Copy link
Collaborator

cclerget commented Jan 7, 2020

Hi @dn-ra , what is the underlying filesystem for SINGULARITY_TMPDIR location ? Fakeroot may not work correctly with some network filesystems not aware of user namespace mappings.

@dn-ra
Copy link
Author

dn-ra commented Jan 8, 2020

It's nfs. I made it with mkdir in the working directory.
I see now that the temp directories are actually all ext4. But when I tried to mktemp -d the same issue of 'No space left on device' came up during build.
Is there a way to set/make temp directory and make it bigger than the default?

@dn-ra
Copy link
Author

dn-ra commented Jan 8, 2020

Doing some reading now. Looks like it is because the /tmp directory itself is out of storage. We are on a Nectar server, so might be limited by that. I'll try changing $SINGULARITY_LOCALCACHEDIR to something with more space

@dn-ra dn-ra closed this as completed Jan 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants