libera/#devuan/ Sunday, 2021-04-11

rrqbeagleburt: note that nz.deb.devuan.org is the one "country code" currently available, resolving to the NZ mirror (only). afaik it has good uptime and is usually quite fast also to here (AU), but by the looks of it, it's "refresh cycle" is at least 12 hours00:13
milesHello: looking for guidance on kde/audio/backend setup on Beowulf. Low volume, no active devices visible in widget control, etc.  Anyone willing to point me at the right info?00:21
systemdlete2I'm trying to use fuse-overlayfs and it appears to set the uid/gid as I want it, but when I try to create a file in one of the directories there, I get an error saying it is not permitted.09:44
systemdlete2Am I supposed to create a new user namespace before using overlayfs, or does the system just assume the default (I'm guessing I am already in a default namespace already, but idk)09:45
systemdlete2The one lousy (and boy do I mean lousy) man page I found for fuse-overlayfs does not mention anything about having to do so, but it does reference the user_namespace man page.09:46
systemdlete2That page, btw, does not explain the syntax, and has formatting issues to boot.09:46
systemdlete2The exact error is "Operation not permitted"09:48
systemdlete2Both the "lower" and "upper" filesystems are local to the system.09:48
systemdlete2the call to user-overlayfs succeeds with no errors.  Listing perms and ownership on files in the overlay fs are mapped correctly to my user id/gid09:50
systemdlete2I'm using the stock beowulf kernel (4.19.0)10:08
gnarfaceno experience with it, but don't you need space in ram for the differences between the two filesystems?  is it possible the permission thing is a red herring/10:45
gnarface?10:45
rrqsystemdlete2: this is not the built-in overlay? (man mount; search "Mount options for overlay")11:14
gourhiya, now i'm fully (with both machines) on devuan - migrated from debian/sid to ceres/runit :-)13:59
gourgreat job and congrats to all the devs!14:00
brocashelmnice, i'm also on ceres/runit for a whole year so far. runit is being actively worked on for devuan14:04
brocashelmcheck out this thread if you haven't: https://dev1galaxy.org/viewtopic.php?id=371614:06
brocashelmanyone is welcome to contribute their script conversions14:06
gourbrocashelm: heh, i'm glad i've picked the right one ;)14:08
brocashelmgour: ya, it's a lot faster/lighter and i have had less crashes with it compared to sysvinit. only problem is a lot of services still use sysv scripts, but the devs are working to converting as many as possible to runsv14:13
gourbrocashelm: so far, i'm good, but still restoring many stuff from the backup..will see if something is missing14:34
systemdlete2gnarface:  The requirement, afaik from the docs, is that you supply a "work" directory, which I am already doing.  I think it is that work directory that you are referring to, and it has to be on the same filesystem as the overlay.16:11
systemdlete2rrq: No, this is the fuse version, which I think might ultimately use the built-in one.  But I am not sure.16:12
systemdlete2rrq:  I looked for the built-in one, but did not find it.  I tried passing -t overlayfs to mount, but it didn't work.  So I ended up using the fuser version, which is actually more convenient because it doesn't require root priv16:13
systemdlete2I'm wondering if the lowerdir and upperdir cannot be on the same fs, which is how mine is setup currently.16:14
fsmithredsystemdlete2, they can be on the same fs16:22
fsmithredall of them can. I played with the kernel version this morning.16:23
systemdlete2fsmithred:  I thought so but wasn't sure.16:23
fsmithredmount -t overlay overlay -olowerdir=something,upperdir=other,workder=yetanother /some-mountpoint16:24
systemdlete2funny part is that I was able to use fuse-overlay yesterday.  Sadly, I made a mistake in invocation originally and had to reboot because I couldn't unmount it.16:24
fsmithredcheck your command history16:24
systemdlete2After rebooting, it worked.  But that was just a sort of test scenario; I was trying it out to see how it works.16:24
systemdlete2Oh, I know exactly what I did wrong.  Typo.  I specified the same upper and target dirs16:25
systemdlete2It should not have allowed that!16:25
systemdlete2but a reboot cleared that out.16:25
fsmithredI took a debootstrapped beowulf base, overlayed another dir and chrooted to install graphical apps16:25
fsmithredso they are separate layers16:26
fsmithredit works, it's pretty cool16:26
systemdlete2When mine was working, it really was cool.  I agree.16:26
systemdlete2Did exactly what I wanted/expected.16:26
systemdlete2But once I set up a slightly different scenario, it is being a pest.16:27
systemdlete2Maybe I should try rebooting again.16:27
systemdlete2I would not think that is necessary, but idk.16:27
fsmithredyou know 'umount -l' right?16:27
systemdlete2for fuse, you have to use fusemount, not umount16:28
fsmithredoh yeah16:28
systemdlete2and the mount requires a different tool also16:28
systemdlete2but the concept is the same.16:28
fsmithreddoesn't that also have a lazy option?16:28
systemdlete2not sure16:28
fsmithredyeah -z16:28
systemdlete2fuser-overlayfs does not seem to have a -z option16:29
fsmithredfusermount does16:29
fsmithreduse -z instead of -u16:29
systemdlete2oh, the unmount, yes.16:30
systemdlete2I can unmount the fuse filesystem... now.  When I had mounted it incorrectly, it was giving me grief.16:30
systemdlete2Again, it should not have permitted me to do what I did in the first place.  I'm certain that is just a bug.16:31
fsmithredoh, in that case, you should probably do it again16:31
systemdlete2do what again?  reboot?16:31
fsmithredno16:31
fsmithredscrew up16:32
systemdlete2oh16:32
fsmithredmake sure you can do it reliably16:32
fsmithredthen report the bug16:32
systemdlete2yes... but later.16:32
fsmithredor see if someone else knows about it already16:32
systemdlete2for now, I just want to get this working for me!16:32
systemdlete2(I promise I WILL investigate and report it if it is reproducible)16:32
systemdlete2fsmithred:  Since the last boot, have you been able to use the overlayfs?   If so, can you try to tear it down and change it slightly so it mounts the target somewhere else instead?  That was what I changed.16:34
systemdlete2without an intervening reboot I mean16:34
fsmithredjust change my mountpoint?16:34
systemdlete2yes16:34
fsmithredprobably16:34
systemdlete2somewhere on the same fs16:34
fsmithredI did two tests in different locations16:34
fsmithredno reboot16:34
systemdlete2hmmm16:34
fsmithredgimme a minute16:34
systemdlete2so that might not be the issue then... but thanks for looking into it and trying16:34
systemdlete2Also, change the lowerdir16:35
systemdlete2When my upper, lower, work, and target were in the same superdirectory, it worked.  Not sure that is the issue, but it did work.16:35
fsmithredok16:36
fsmithredwill try16:36
systemdlete2thanks16:36
systemdlete2what did you have to do to use the regular overlayfs (not fuse)?   I tried it, as you stated above, but mount complained it did not know any overlayfs16:37
systemdlete2for fuse, I had to install fuse-overlayfs package.16:38
fsmithredshould be in the kernel, I think16:39
systemdlete2OK, using the built-in, non-fuse approach, I run:  mount -t overlay -o lowerdir=lower,upperdir=upper,work=work target16:42
systemdlete2it errors with: mount: target: can't find in /etc/fstab.16:43
systemdlete2(I've created all 4 directories in a testing area under root's home)16:43
systemdlete2I'm doing something wrong here, I'm sure.16:43
fsmithredit works16:44
fsmithredoverlay overlay16:44
systemdlete2What is the problem with my invocation then?16:45
* ShorTie wonders Gentoo ??16:45
fsmithredyou are missing "overlay"16:45
systemdlete2where?16:45
fsmithredsay it twice16:45
fsmithredmount -t overlay overlay ...16:45
systemdlete2mount -t overlay overlay -o lowerdir=lower,upperdir=upper,work=work target ?16:46
systemdlete2I get error: mount: /root/tmp/target: wrong fs type, bad option, bad superblock on overlay, missing codepage or helper program, or other error16:47
fsmithredyour command looks right16:47
systemdlete2oops.16:47
systemdlete2workdir=, not work= !!!  (duh!)16:48
fsmithredoh16:48
systemdlete2let me check to see if I made the same booboo in fuse version...16:48
systemdlete2no... it's right (workdir=) in my fuse invocation.16:48
systemdlete2In my case, though, the lowerdir is deep under /var16:50
systemdlete2everything else (upper, work, and target) are on one filesystem (not /var)16:50
fsmithreddoes your user have permission there?16:50
systemdlete2I used mappings, and ls -l does show it is the owner16:50
fsmithredback in 1016:50
systemdlete2ok16:50
systemdlete2My call is as follows:16:51
systemdlete2fuse-overlayfs -o lowerdir=/var/local/myprog -o upperdir=upperdir -o workdir=workdir -o uidmapping=0:1000:1 -o gidmapping=0:1000:1 path/to/mountpoint16:52
systemdlete2the path/to/mountpoint is on the same fs with upperdir and workdir (the latter 2 being in one directory together)16:53
systemdlete2when I run "ls -l" in the /path/to/mountpoint directory, it shows that files are owned by my test user, not root (whereas the lower directory, under /var, is of course owned by root)16:54
systemdlete2but if I try to do something like "echo xyz > /path/to/mountpoint/newfile" it errors saying "Operation not permitted"16:54
systemdlete2no wait.  Now I get a different error;  Permission denied.  but that is just as odd16:56
systemdlete2hmmm.16:57
systemdlete2ownership is not my user:user, but nobody:nogroup, which I'd expect for a NFS file system, not a local one.16:57
systemdlete2So I have done yet something else differently.16:57
* systemdlete2 goes back and traces his steps carefully.16:57
fsmithrednfs might be the problem16:58
systemdlete2I am not using any nfs here though16:58
fsmithredoh, ok16:59
systemdlete2both filesystems, /var and my upper and work directories are all local fs16:59
fsmithredand user owns the subdir in /var recursively?17:00
systemdlete2no, root does17:01
systemdlete2my overlay specifies uid:gid mappings17:01
systemdlete2(see above)17:01
fsmithredyou're doing this as root now? I'm lost.17:01
systemdlete2no, fuse is available to nonroot users17:02
systemdlete2I am doing this as my test user17:02
fsmithredso shouldn't test user own that dir?17:02
systemdlete2the problem/difference may just be something in the fuse implementation17:02
systemdlete2which dir?  Not the one under /var.  Those are system directories and files that would not be owned by a regular user17:03
systemdlete2test user owns all the other directories though.  In the merged (mounted) image, which I have been calling "target", the files appear to be owned by the test user due to the mappings I specified17:04
fsmithredyeah, ok. That makes sense. I can mount system dirs with sshfs17:05
systemdlete2I am really wondering if it would make sense to reboot.  I am thinking, what if the first mount, which worked for me, has left some artifacts in the driver's memory, or something else screwy in fuse.  I've run into some fuse issues in the past with other tools.17:08
fsmithredlsof might help with that17:09
systemdlete2I'm trying rmmod fuse and see if that clears it17:09
systemdlete2I think I see part of the issue.  I was not aware of this.  The actual mountpoint directory, after the mount, shows nobody:nogroup.  I definitely cannot write there.  But the subdirectories are correctly mapped as I specified.17:13
fsmithredmountpoint inherits permissions from the mounted volume17:14
systemdlete2However, I cannot write in those subdirs even though I have permissions there.17:14
systemdlete2I don't care if I can't write to the mountpoint directory.  I don't need to.17:14
systemdlete2that is why I was getting a different error.  No, I still get the "operation not permitted" error when I try to create a new file in one of the subdirectoreis17:15
systemdlete2*subdirectories17:15
fsmithredsubdirs where?17:16
systemdlete2which is where I need write access, and the whole point to this entire exercise.17:16
systemdlete2under the mountpoint17:16
systemdlete2I mean, on the mounted fs, not lowerdir17:16
fsmithredthe mountpoint is where they are merged, right?17:17
systemdlete2that's what I mean, yes17:17
fsmithredisn't that where you're working?17:17
systemdlete2where I am trying to work17:17
fsmithredok17:17
systemdlete2let me explain what I am doing, ok?17:17
fsmithredyeah, you should be able to write ot it, and anything you do should stay on the upper dir when you unmount it all17:17
systemdlete2I have a program that saves files under /var/local/...17:18
systemdlete2When I want to test my program, I have set up an area somewhere else from the "live" program.  But I need a recent set of test data.  What better data than what the live program has been saving?  OK, but...17:19
systemdlete2the program will generate new data files.  So I don't want to clobber the live data in case any changes I've made to the test version of the program causes damage.17:19
fsmithredmakes sense17:20
systemdlete2And, besides, the data under /var should be kept pristine anyway.  And those files are owned by root anyway.17:20
systemdlete2I do all of my testing using my test/development user.17:20
systemdlete2Now, it occurs to me I could probably use a root jail instead of doing it this way.17:21
systemdlete2Or maybe a container or the like.17:21
systemdlete2But this seemed like a lightweight approach.17:21
systemdlete2And it almost works...17:21
systemdlete2I can read files, but I can't write to them or create new ones.17:23
systemdlete2Obviously, the directories are not really owned by my test user, but the fuse driver should be making them act that way semantically.  That's its purpose for overlayfs.17:24
systemdlete2I think I will try rebooting and see if it will work in a fresh environment.17:24
systemdlete2fsmithred: Thanks for the help today (again...)17:25
fsmithredyw17:25
systemdlete2bbl17:25
systemdlete2fsmithred:  This is one of the biggest "duh" moments of my life...17:43
systemdlete2It's not the inheritance of the permissions that is a problem here.17:43
systemdlete2It's the permissions themselves!!!17:43
systemdlete2The error is correct; the operation should NOT be permitted.  I forgot that the files in lowerdir are not readable by regular users anyway.17:44
systemdlete2So they cannot be readable or writable by a regular user, even if uid/gid is mapped.17:44
systemdlete2So this approach is clearly not going to work for me.17:44
systemdlete2It would be a clever way to raise privileges if the system did allow it.  Thank goodness it does not allow it!!!17:45
systemdlete2I think I'll stick with a simple cp...17:46
systemdlete2(by root I mean) and then chown the files17:46
systemdlete2I suppose group perms in those directories might be useful.  I could add my test user to a special gruop that is allowed to peruse those files.17:47
fsmithredmove that dir and make a new one for the tests?17:47
fsmithredwill the program freak out if the whole data dir is replaced?17:48
systemdlete2No, because root does run the program in cron17:48
systemdlete2I think I'll try a group and include my test user in it.  That should work fine with overlayfs, even in fuse.17:48
fsmithredyeah, that should work17:48
systemdlete2Sorry to have bugged you with all this.  I'm sure you have more important things to do.17:49
fsmithredalthough I've run into situations where root can't do anything with a volume that user mounted (sshfs)17:49
systemdlete2yes, I have also.  Same thing.17:49
fsmithredI don't remember the exact circumstances, but I remember being surprised that root wasn't allowed17:50
systemdlete2I use xigmanas to store some data.  When I mount it to certain systems, root cannot look at the mounted files and directories, but a regular user can.17:50
systemdlete2it surprises me also17:50
fsmithredI need food. brb17:51
systemdlete2root won't be accessing my fuse fs.  It will continue to use the lowerdir.17:51
systemdlete2tyt17:51
systemdlete2kernel.unprivileged_userns_clone must be set to 1 ???18:17
systemdlete2(mine is 0 currently)18:17
systemdlete2looks like it is not recommended to set it; can open up severe vulnerabilities18:20
systemdlete2of course, I am behind about 5 firewalls and I doubt there is much internet exposure (other than firefox maybe)18:21
systemdlete2This might explain why using the overlay mount option works but the fuse implementation doesn't (at least when the kernel var is not set)18:22
systemdlete2group did not work as planned either.  I ended up writing a (whopping) 2-liner that copies and chowns the files.  I have tested it and it works fine.18:40
systemdlete2Sometimes, what seems simple to do is actually far more complicated than was needed in the first place.18:40
systemdlete2thanks again for all your help fsmithred18:41
hook54321golinux: it looks like it's still blocked. is there someone i should talk to or a delay i should use?22:37

Generated by irclog2html.py 2.17.0 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!