/srv/irclogs.ubuntu.com/2021/01/25/#ubuntu-server.txt

=== denningsrogue3 is now known as denningsrogue
=== denningsrogue9 is now known as denningsrogue
=== antoine2 is now known as antoine
=== RoyK^ is now known as RoyK
=== minall is now known as Minall
c0fehow can I give ownership to a directory to all users in a specific group?17:45
Ussatchown it17:48
c0feUssat: chown :GroupA /var/www ?18:03
c0felike that?18:03
Ussatman chown18:04
c0fei know about that but wasn't helpful18:06
TJ-c0fe: use ACLs18:09
c0feTJ-: this is on a LXD container18:09
c0feTJ-: last time i tried it, i was getting a bunch of errors and seems like you can get it to run if you hack it together18:13
tewardc0fe: LXD containers use ACLs and the concept of ACLs inside their containers18:13
c0feteward: really? is there a guide?18:14
tewardrefer to Any Given "How To" on Linux permissions18:14
c0feteward: i have tried it for another use but it just errored out18:25
c0fei created multiple users, added them all to one group called "usersharegrp" but I am getting permission denied when accessing a share: https://dpaste.com/H4H95YYRU18:33
c0feis there something wrong with my samba config?18:33
=== minall is now known as Minal
=== Minal is now known as Minall
=== hggdh_ is now known as hggdh
c0fewhat am i doing wrong?18:37
c0feteward: for acl does that need to be installed apt-get install acl ?18:44
=== ijohnson is now known as ijohnson|lunch
xibalbai can't decide if i should use the builtin tiumesync service and point it at my Chrony/NTP host, or just setup Chrony on the system, and use my Chrony/NTP server as the upstream for time sync19:00
tewardc0fe: yes you need to install `acl` for extended ACL systems19:06
tewardbut not for base chowns19:06
tewardyou DO need to make sure your user is in the right group and logout/login again19:06
sdezielxibalba: I've found that for systems that are always on (servers), systemd-timesyncd was OK but for laptops that are sometimes suspended, it starts drifting (maybe my RTC is shitty?) enough to break my TOTP authentication. The laptop situation has been fixed by switching to chrony ;)19:06
xibalbathanks, these will be servers. builtin timesyncd seems perfectly sufficient. i think i'll go with the builtin and point it to my chrony box19:07
c0feteward: what do you mean in the right group?19:09
Ussatfor example if you chown root:group1 make sure the user is in group119:11
teward^ this19:13
tewardwhat Ussat said (sorry i'm in meetings)19:14
xibalbalol see?! meetings are useless =p19:14
Ussatxibalba, if you would like to convince my Director of said, feel free :)19:15
c0feUssat: so if i want usera and userb to have access to folder1 I need to make they are both in the same group?19:19
Ussatyes19:19
c0fei was under the impression ACL was better because it avoids this, then what does ACL have over regular chown?19:20
noregrethttps://bpa.st/5HADM - any idea why this service is exiting? nothing helpful in the logs19:24
UssatACL's are much more granular, yes19:24
Ussatand yes, ACL's avoid that, BUT ask yourself how granular do you need to go ? ACL's are generally not as strait forward19:24
UssatWether you use ACL or chown depends on a few things, and not having access to your system I have no idea what is best for you19:25
c0fehow much more granular can they get Ussat? I thought it was a way to avoid making sure users share a group19:27
Ussatthats one uyse, yes19:27
Ussatand this is IMHO not the place for a teatsie on ACL's, but very granular19:27
c0femy setup isn't very complicated19:32
c0feacl would be nice if i can avoid making sure everyone is in the same group19:32
sarnoldnoregret: you'll have to find where that service logs and see if it emitted anything19:33
sarnoldnoregret: also check the config file for that service and see if it's been instructed to not listen on any networks/ports/sockets etc19:34
c0feteward: can you clarify on acl please?19:36
sdezielnoregret: /var/log/php7.4-fpm.log maybe?19:36
c0febecause i am not sure why you said users have to share the same group19:36
Ussatc0fe, ACL's are more difficult to manage19:36
noregretsdeziel: yeah, it exists, but empty19:37
tewardc0fe: the users being in the same group has nothing to do with ACLs19:37
tewardit has to do with UNIX permissions19:38
tewardi'm in a meeting i can't elaborate but Ussat can :P19:38
UssatMeeting here also, but honestly is there a specific reeason NOT to have then in the same group ?19:39
Ussathttps://www.redhat.com/sysadmin/linux-access-control-lists19:40
Ussathttps://manpages.ubuntu.com/manpages/xenial/man5/acl.5.html19:40
Ussathttps://manpages.ubuntu.com/manpages/trusty/man1/setfacl.1.html19:40
Ussathttps://manpages.ubuntu.com/manpages/trusty/man1/getfacl.1.html19:41
UssatThere19:41
sdezielnoregret: you have php 7.4 which would indicate Ubuntu 20.04 but the status output you shared doesn't match what I'd expect19:41
UssatACL's are very powerfull but also complicated19:41
sdezielnoregret: are you using a PPA or something like that to get PHP?19:41
noregretsdeziel: yes, a 3rd party repo19:42
noregreti'm still on 18.0419:42
c0feUssat: i have a few different users and having to coordinate the same group will mean I have to create a bunch of different groups for different use cases19:44
UssatThen I suggest you learn ACL19:44
Ussatstart reading19:44
Ussatits nothing that anyone will be able to explain over IRC19:44
Ussatyou do realise that users can be in multiple groups ?19:46
c0fei guess i am bit unsure why teward said that users need to be in the same group when using acl19:46
UssatI dont believe he did19:46
tewardi didn't19:47
tewardi said you need users in the same group when NOT using acl19:47
tewardand just using straight UNIX permissions19:48
sdezielnoregret: you'll need to check how php-fpm is configured then as it differs from what I'm used to work with :/19:49
=== ijohnson|lunch is now known as ijohnson
noregretsdeziel: well, all was working fine until I updated earlier and php8.0 got installed from that repo. All versions are in /etc/php/phpxx/19:50
c0feah ok, my bad, sorry teward...i need more coffee19:50
noregret/etc/php/xx/ *19:53
noregretand /etc/php/7.4/fpm/pool.d/www.conf looks fine to me19:54
tewardusing ACL i can have a separate set of groups 'admins' 'users' 'idiots' etc. and give THOSE groups special acl rights independent of groups that are on the chown19:59
sdezielnoregret: it's a long shot but those fpm typically want to listen to unix sockets or TCP sockets. Maybe another fpm instance started before has bounded the same socket that php7.4-fpm wanted to listen to?19:59
tewardbut if you're working from the fact of pure UNIX permissions then group owner needs to be in the groups that the user is in for straight chown to work19:59
tewardc0fe:  ^19:59
tewardif you go the ACL routes it gets more complex19:59
c0feteward: i have setup a group with nginx included in it but getting permission denied20:00
tewardyou'd have to share specifics20:01
c0feteward: I got 3 users, Bobsmb, Jillsmb and nginx that all need to have read, write, execute access to /var/www/data. I have all three users created and all are part of smbsharegrp and i have the following samba config: https://dpaste.com/36WUC7LDP20:04
noregretsdeziel: nope, nothing is running20:09
noregreti'll try to remove php8 and try again20:09
c0feteward: i am checking the logs but see nothing in there20:10
tewardyou are talking about what APPEARS to be separate issues,20:11
tewardnginx runs only as `www-data` in a default config unless you altered it20:11
tewardyour *users* should never be in `www-data`20:11
tewardat which point you'd have to do ACLs if you have *multiple* users who need to edit www-data group accessible files20:12
tewardyou *don't* want to alter that unless you *really* know what you're doing20:12
tewardand 99% of people don't ;)20:12
tewardwith regards to your nginx web data what do I care about smbsharegrp in this case?20:12
tewardbecause it has nothing to do with *nginx* unless you've altered your /var/www/data perms to be a nonstandard group like smbsharegrp and not www-data20:13
c0feteward: nginx that is installed from their own repo uses "nginx" as the user and group20:14
tewardERR:ThirdPartyRepository ERR:NotSupportedByUbuntu ERR:WeirdConfigurationsFromUpstream20:14
c0feso what is going on is that I am using nextcloud but since webdav is broken i am going to substitute in smb20:14
tewardi'm in the middle of somehting I can't dedicate any cycles right now here...20:14
c0fei can remove nginx from that group20:14
c0fei just still need to make sure it can write into it20:15
tewardUssat: are you able to help ^ diagnose their permissions issues?20:16
tewardThey've got a complex setup here that at this point I think will need ACLs to really work with non-Samba directories at this point20:16
tewardERR: Busy With ${PAYING_JOB}20:16
UssatI am not at the moment, I have meetings rest of the day with vendors, sorry20:25
=== ILoveYaToo_ is now known as ILoveYaToo
xibalbai'm having a dumb problem i'm just not seeing, trying to load `named` and get open: /etc/bind/named.conf: permission denied but my permissions are root:bind and 66023:19
sarnoldnamei -l /etc/bind/named.conf may help you spot something23:20
sarnoldalso check dmesg or auditd logs, perhaps your process has an apparmor profile that is preventing the access23:20
xibalbaty will check both23:20
xibalbadarn apparmor="DENIED" operation="mknod" profile="/usr/sbin/named23:21
xibalbagood idea, thanks. i had another box i've been deploying against with my ansible playbook, tried myplaybook on a fresh box and got this error. guess i need to account for apparmor in my playbook now23:22
sarnoldwhat is named trying to create?23:22
xibalbalooks like /etc/bind/named.run , maybe i just fix up the permissions there.23:23
xibalbaapparmor="DENIED" operation="mknod" profile="/usr/sbin/named" name="/etc/bind/named.run" pid=207990 comm="named" requested_mask="c" denied_mask="c" fsuid=0 ouid=023:23
pcfreak30Hello, I am having an issue suddenly where the network service hangs on 18.04.  When i go to recovery, i see the recovery-menu try to run networking.service but its not there, and I can see systemd-networkd + netplan seem to be used. I can use the network on a live cd. What should I be looking at?23:27
sarnoldxibalba: named.run ? that's a funny file... it feels a bit like maybe something that ought to live in /run or /var instead?23:29
xibalbayeh and apparmor's profile for named shows the same23:29
xibalbai'm going to just nuke that box and rerun my playbook on a fresh one23:30
sarnoldare you building named from source?23:30
sarnoldmaybe you just need a new ./configure --thingy to tell it where to store the file23:30
xibalbana, i'm not that crazy. though maybe i ought to be, i'm getting bind9 from apt23:32
xibalbai stopped building from source when i stopped using *bsd =p23:32
sarnoldhrm; does your bind config specify where to put that file?23:38
xibalbano it should be all defaults. i bet i did something goofy to that box before, thats why i'm blasting it away. uploading my 20.04 gold images to the esxi box now then going to rerun that playbook23:39
xibalbai ran that playbook against 2 other ubuntu 20.04 hosts thus far and it worked fine23:39
xibalbahey do you know if there is there a way for me to alias an IP to a host, but make sure that IP is not used for any outbound connection instantiated by the host?23:40
xibalbai.e,. i have a host w/an any casted IP, I dont want it to use it's any cast IP to fetch updates via apt update23:40
xibalbai might have to move the anycast ip to loopback23:41
sarnoldhmm, I don't know anything off the top of my head, no23:43
xibalbascore, figured it out23:44
xibalbaip route change default via $YOUR_CURRENT_DEFAULT_GW src $THE_IP_YOU_WANT_TO_SRC_FROM23:45
sarnoldnice23:47
xibalbaalright! fresh box, ran my playbook and BIND + ExaBGP are online announcing a /32, neato burrito23:59

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!