Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Cyberpunkey Monkey
Jun 23, 2003

by Nyc_Tattoo

spankmeister posted:

You done hosed up now son.

*shrug*

Adbot
ADBOT LOVES YOU

spankmeister
Jun 15, 2008






To get this discussion on track again, I'm interested in y'alls opinion on KVM v. Xen. Who's had practical experience with either and which do you prefer and why etc...

There's enough blogs and sites out there detailing the differences but I'd like to hear from some goons in the field about it. :)

evol262
Nov 30, 2010
#!/usr/bin/perl
Honestly, I wouldn't choose Samba for a production fileserver unless I had to. If you have Windows clients, use a Windows fileserver (or multiple with DFS). Virtualize it on a Linux server if you want to.

Do you have filesystem ACL support enabled? It's off by default in RHEL.

That said, the documentation is extremely clear on what happens in different scenarios. I'm sure you've read this, but read it again.

The other admins there are pursuing an idiotic strategy. Back up every client? Files saved locally? Great idea.

What exactly are you trying to do? You want local access, POSIX access, and access from Windows clients simultaneously? What is the use case? Are you sure Samba is even the right tool for what you want? Should every point of ingress be conjoined?

angrytech
Jun 26, 2009
Slightly less intelligent question than spankmeisters:
I'm doing a web design class(html/css/js/php) and I'm getting tired of "gksu gedit" every time I want to modify a file in /var/www. Is there an accepted way to make my user account able to edit everything under /var/www? Add myself to the apache group or something?

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe

angrytech posted:

Slightly less intelligent question than spankmeisters:
I'm doing a web design class(html/css/js/php) and I'm getting tired of "gksu gedit" every time I want to modify a file in /var/www. Is there an accepted way to make my user account able to edit everything under /var/www? Add myself to the apache group or something?

Don't edit files directly in /var/www. Instead make a symlink, or use some kind of version control.

And you really should not be running any GUI program as root.

evol262
Nov 30, 2010
#!/usr/bin/perl

spankmeister posted:

To get this discussion on track again, I'm interested in y'alls opinion on KVM v. Xen. Who's had practical experience with either and which do you prefer and why etc...

There's enough blogs and sites out there detailing the differences but I'd like to hear from some goons in the field about it. :)

Use what works. They have different use cases.

Are you talking about a NetBSD dom0? Xen Cloud Platform? XenServer? XenDesktop?

oVirt? RHEV? OpenStack? KVM/QEMU?

They're essentially both abstracted through libvirt 99% of the time. KVM does nested virt a little easier. Xen does paravirt (even if many of the use cases for paravirt have been eliminated by LXC, OpenVZ, and the ubiquity of virtualization extensions).

KVM needs less configuration for testing. Xen is somewhat better about guaranteeing resources for the host. KVM has more active development on things like samepage merging.

We use both for different cases. Is there something specific you're curious about?

evol262
Nov 30, 2010
#!/usr/bin/perl

angrytech posted:

Slightly less intelligent question than spankmeisters:
I'm doing a web design class(html/css/js/php) and I'm getting tired of "gksu gedit" every time I want to modify a file in /var/www. Is there an accepted way to make my user account able to edit everything under /var/www? Add myself to the apache group or something?

Add yourself to the www group, or change perms on /var/www.

Learn vi.

sudo su -

angrytech
Jun 26, 2009
^^Awesome, thanks^^

Suspicious Dish posted:

Don't edit files directly in /var/www. Instead make a symlink, or use some kind of version control.

And you really should not be running any GUI program as root.

I'm wary of giving read/write access to any files in my home directory, which is why I haven't done it before. I use Ubuntu1 for cloud sync, so I'd actually love if there was a secure way to set up a link from /var/www/ to ~/Documents/whatever so that any modifications I make would be simultaneously synced to ~the cloud~ as well as be served up by apache.

spankmeister
Jun 15, 2008






evol262 posted:

Use what works. They have different use cases.

Are you talking about a NetBSD dom0? Xen Cloud Platform? XenServer? XenDesktop?

oVirt? RHEV? OpenStack? KVM/QEMU?

They're essentially both abstracted through libvirt 99% of the time. KVM does nested virt a little easier. Xen does paravirt (even if many of the use cases for paravirt have been eliminated by LXC, OpenVZ, and the ubiquity of virtualization extensions).

KVM needs less configuration for testing. Xen is somewhat better about guaranteeing resources for the host. KVM has more active development on things like samepage merging.

We use both for different cases. Is there something specific you're curious about?

Dom0/host is CentOS 6, usecase would be for HA hosting of LAMP stuff mainly. Shared storage will be maybe Nexenta or NetApp or something don't really know yet but most likely NFS-based.

Seems to me that conceptually speaking the way Xen has the hypervisor on top of everything then the Dom0 running like a VM under the HV next to the DOmU's would be preferable to the way KVM does things but KVM seems to have become the preferred solution for Red Hat. libvirt is hella nice though, shame Xen needs to be compiled in on centos 6.

evol262
Nov 30, 2010
#!/usr/bin/perl
ln -s /var/www ~/Documents/whatever

I don't know how Ubuntu1 does any of its ~cloud~ stuff, but I'd be surprised if a symlink didn't work.

~the cloud~ is not a substitute for git/mercurial. Learn to use one (or both) of those.

spankmeister
Jun 15, 2008






I have a colleague at my current job (YOTJ-ing soon) that still uses RCS for that.

I tend to use git (hell how easy is it to do a "git init" somewhere right?)

angrytech
Jun 26, 2009

evol262 posted:

ln -s /var/www ~/Documents/whatever

I don't know how Ubuntu1 does any of its ~cloud~ stuff, but I'd be surprised if a symlink didn't work.

~the cloud~ is not a substitute for git/mercurial. Learn to use one (or both) of those.

These are tiny 1-off pages, so I've pushed VC off until after I graduate.
I did try the symlink, but it gives me a 403. I'm gonna gently caress with permissions a bit.

evol262
Nov 30, 2010
#!/usr/bin/perl

spankmeister posted:

Dom0/host is CentOS 6, usecase would be for HA hosting of LAMP stuff mainly. Shared storage will be maybe Nexenta or NetApp or something don't really know yet but most likely NFS-based.

Seems to me that conceptually speaking the way Xen has the hypervisor on top of everything then the Dom0 running like a VM under the HV next to the DOmU's would be preferable to the way KVM does things but KVM seems to have become the preferred solution for Red Hat. libvirt is hella nice though, shame Xen needs to be compiled in on centos 6.

For HA hosting of anything, please use one of the following:

oVirt
Xen Cloud Platform
Hyper-V

You can get it going with Pacemaker or whatever, but it's a pain, and there are solutions out there for you.

Redhat landed on the KVM side, yeah. The description of Xen is pretty much like ESXi and Hyper-V, and it's applicable enough to Xen as well. I'm not sure why you think it's preferable, though. Different, yeah.

If you're already a CentOS shop, just go with KVM/oVirt.

spankmeister
Jun 15, 2008






Why I think it's preferable? Not entirely sure but the concept of a HV with the management running as a sort of privileged guest next to the other guests seems a good way to do it. That being said I have zero issue with using KVM if it works for my usecase.

oVirt looks really cool, thanks!

BTW you mention oVirt, XCP and Hyper-V, no love for VMWare? Just curious.

Xenomorph
Jun 13, 2001

evol262 posted:

What exactly are you trying to do? You want local access, POSIX access, and access from Windows clients simultaneously? What is the use case? Are you sure Samba is even the right tool for what you want? Should every point of ingress be conjoined?

File storage for a lot of labs.
A user will be gathering data on one Linux systems & saving it to our server via NFS.
They then jump on a Windows or Mac system and access the data on the server via SMB to process the data.
Other lab users have their specific tools, but many are Linux only. They jump on a Linux system and work with the processed data via NFS. Lots of back and forth where different people will want access to centralized data from specialized systems.

We've had Apple servers doing the hosting. SMB & NFS access to the same data. Samba is even more terrible on Mac OS X, and permissions got messed up a lot. Our solution here was to simply block Windows from even seeing the permissions ("nt acl support = no"). Mac OS X (up to 10.6) had a decent permissions management tool (we've been unable to get it to work in 10.7/10.8). It lets us *separately* adjust the POSIX permissions and Windows-compatible ACLs for all the directories.

I'm replacing all the ancient Apple servers (no upgrade path), and Windows is terrible at working with NFS (a whole new level of permissions issues and even performance problems), so Linux seemed like the best choice. FreeBSD honestly has worked better for me as a file server (so far), but it doesn't work with our management or backup software (and I'm not going to load a ton of data on it with no backup solution). Solaris may be an option.

I haven't found a tool that works as well as the Mac OS X one for managing ACLs ("Eiciel" for Linux is terrible), so we're left managing permissions from Linux command line and Windows Security dialog.
I set a permission in Linux, and the Windows permission gets changed to something I don't want.
I change the Windows permission back to what I want, and the Linux permission gets changed to something I don't want.

I can't seem to separate the ACLs and POSIX permissions like I can on Mac OS X and FreeBSD. However, Samba+NFS still seems like a workable solution, even with the goofy permissions. I'll just have to check permissions a bit more often on the shares.

evol262
Nov 30, 2010
#!/usr/bin/perl

spankmeister posted:

Why I think it's preferable? Not entirely sure but the concept of a HV with the management running as a sort of privileged guest next to the other guests seems a good way to do it. That being said I have zero issue with using KVM if it works for my usecase.

oVirt looks really cool, thanks!

BTW you mention oVirt, XCP and Hyper-V, no love for VMWare? Just curious.

Doesn't do clustering for free. That's pretty much why. Didn't mention XenServer either.

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

Suspicious Dish posted:

And you really should not be running any GUI program as root.

Hey, you. Why is this?

(I don't think I ever do, but not because I wisely chose not to...I just haven't had a reason to)


edit: Also, to report in on my attempt to use Ubuntu 12.10 as my main desktop OS...

It's going great-ish so far. The problems I have right now are:

  1. I wanted to run Borderlands 2 under Wine, which some Googlin' led me to believe was workable, but I can't get it to work. Sometimes it will start, but I'll get like 1 FPS, other times it spits out a bunch of OpenGL errors into the terminal until I close it.
  2. Catalyst Control Center will not freaking remember that I want to extend my desktop instead of mirroring it onto my second monitor between reboots.

I kind of just gave up on fixing either of those, but the problems just sit there in the back of mind, irritating me.

Thermopyle fucked around with this message at 00:35 on Oct 23, 2012

Ninja Rope
Oct 22, 2005

Wee.

evol262 posted:

sudo su -

Why would you do this? :smith:

mystes
May 31, 2006

evol262 posted:

sudo su -
Is there some reason to do this instead of sudo -i or something?

Longinus00
Dec 29, 2005
Ur-Quan

Thermopyle posted:

Catalyst Control Center will not freaking remember that I want to extend my desktop instead of mirroring it onto my second monitor between reboots.

This is something better left to xrandr or the monitor setup page in your desktop environment (.e.g gnome/unity's monitor setup thing).

Doctor w-rw-rw-
Jun 24, 2008

evol262 posted:

Doesn't do clustering for free. That's pretty much why. Didn't mention XenServer either.

I went from Xen to KVM to ESXi. ESXi is by far the winner for home use. I felt that Xen was somewhat more mature than KVM, as KVM has a show-stopping bug with RHEL/CentOS 6 that prevents it from virtualizing FreeBSD. This is all pretty subjective, though. ESXi has the disadvantage of requiring Windows for administration and not doing software RAID, but has the overwhelming advantage of being basically impossible to gently caress up, and it being easy to configure the network however you like, something that I found pretty awful on both Xen and KVM tools.

Cyberpunkey Monkey
Jun 23, 2003

by Nyc_Tattoo

Thermopyle posted:

Hey, you. Why is this?

(I don't think I ever do, but not because I wisely chose not to...I just haven't had a reason to)


edit: Also, to report in on my attempt to use Ubuntu 12.10 as my main desktop OS...

It's going great-ish so far. The problems I have right now are:

  1. I wanted to run Borderlands 2 under Wine, which some Googlin' led me to believe was workable, but I can't get it to work. Sometimes it will start, but I'll get like 1 FPS, other times it spits out a bunch of OpenGL errors into the terminal until I close it.
  2. Catalyst Control Center will not freaking remember that I want to extend my desktop instead of mirroring it onto my second monitor between reboots.

I kind of just gave up on fixing either of those, but the problems just sit there in the back of mind, irritating me.

Wine sucks. Linux games run great these days if they're native, but otherwise... translating Windows to POSIX system calls isn't necessarily a 1 to 1 or even an easily done process. That's why porting is such a big deal. It often requires rewriting a lot of the basic stuff because of how the respective Operating systems deal with simple stuff like, where in memory is your framebuffer, or what arbitrary value to I pop into register X to tell the main OS loop that we need to trap an IO call or :barf:

This problem is compounded with GPU stuff. There is so much bullshit licensing mumbo jumbo surrounding doing math with triangles and silicon chips that it's goddamn ridiculous, but that's the way the world works.

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

osirisisdead posted:

Wine sucks. Linux games run great these days if they're native, but otherwise... translating Windows to POSIX system calls isn't necessarily a 1 to 1 or even an easily done process. That's why porting is such a big deal. It often requires rewriting a lot of the basic stuff because of how the respective Operating systems deal with simple stuff like, where in memory is your framebuffer, or what arbitrary value to I pop into register X to tell the main OS loop that we need to trap an IO call or :barf:

This problem is compounded with GPU stuff. There is so much bullshit licensing mumbo jumbo surrounding doing math with triangles and silicon chips that it's goddamn ridiculous, but that's the way the world works.

Yeah, I'm giving up on the idea of running games. I'll just keep a Windows partition around for that. The upside being that if I have to go through the "effort" to reboot into a different OS to play a game, I'll get more work done!

Bob Morales
Aug 18, 2006


Just wear the fucking mask, Bob

I don't care how many people I probably infected with COVID-19 while refusing to wear a mask, my comfort is far more important than the health and safety of everyone around me!

Thermopyle posted:

Hey, you. Why is this?

(I don't think I ever do, but not because I wisely chose not to...I just haven't had a reason to)

Because it defeats one of the main reasons UNIX (and UNIX-alikes or *nix or whatever you want to call it) has users - security.

Let's say you are running Firefox as 'thermopyle', an ordinary user. You go on some website and get a malformed GIF file or some other unpatched vulnerability. Worst case, your use account is goofed up since your user doesn't have the security to install a backdoored version of a ssh daemon or delete the /bin folder.

But if you're running Firefox as root...

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

Bob Morales posted:

Because it defeats one of the main reasons UNIX (and UNIX-alikes or *nix or whatever you want to call it) has users - security.

Let's say you are running Firefox as 'thermopyle', an ordinary user. You go on some website and get a malformed GIF file or some other unpatched vulnerability. Worst case, your use account is goofed up since your user doesn't have the security to install a backdoored version of a ssh daemon or delete the /bin folder.

But if you're running Firefox as root....

But why is that specific to GUI programs? I mean, the GIF example is of course, but console programs can have vulnerabilities as well.

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe

Thermopyle posted:

Hey, you. Why is this?

(I don't think I ever do, but not because I wisely chose not to...I just haven't had a reason to)

Most GUI toolkits load code at runtime, which is terrible for any sort of root operation. If you had a rogue module (not necessarily malicious), it could wreck your system. Some of these modules are for a virtual filesystem layer (gvfs with its many backends), so you could even be loading code over the network.

If you inherit the user's environment (if you don't, the window will be unthemed), you also inherit their DBus bus and other envvars, which can cause all sorts of wreckage, too.

What you need is some form of privilege escalation. Usually this is done with pkexec or another setuid daemon managed with PolicyKit.

Bob Morales
Aug 18, 2006


Just wear the fucking mask, Bob

I don't care how many people I probably infected with COVID-19 while refusing to wear a mask, my comfort is far more important than the health and safety of everyone around me!

Thermopyle posted:

But why is that specific to GUI programs?

It's not.

evol262
Nov 30, 2010
#!/usr/bin/perl

Doctor w-rw-rw- posted:

I went from Xen to KVM to ESXi. ESXi is by far the winner for home use. I felt that Xen was somewhat more mature than KVM, as KVM has a show-stopping bug with RHEL/CentOS 6 that prevents it from virtualizing FreeBSD. This is all pretty subjective, though. ESXi has the disadvantage of requiring Windows for administration and not doing software RAID, but has the overwhelming advantage of being basically impossible to gently caress up, and it being easy to configure the network however you like, something that I found pretty awful on both Xen and KVM tools.

ESXi doesn't require Windows for administration if you script it, use the CLI, or use the (experimental) web UI for it. This isn't really a "for home use" scenario, though.

What show-stopping bug? Reported it? Have a bugzilla number? I've have problems with some sets of hardware not virtualizing some operating systems (specifically RHEL5.3 on Opterons and Solaris 10), but file a bug.

Additionally, networking is pretty bulletproof if you're comfortable configuring Linux networking. It's somewhat more intuitive when it comes to VLANs as well.

Ninja Rope posted:

Why would you do this? :smith:

mystes posted:

Is there some reason to do this instead of sudo -i or something?

Muscle memory. I could "sudo -s", but eh. On RHEL I can "su -" without needing sudo, but I prefer to run as root.

osirisisdead posted:

Wine sucks. Linux games run great these days if they're native, but otherwise... translating Windows to POSIX system calls isn't necessarily a 1 to 1 or even an easily done process. That's why porting is such a big deal. It often requires rewriting a lot of the basic stuff because of how the respective Operating systems deal with simple stuff like, where in memory is your framebuffer, or what arbitrary value to I pop into register X to tell the main OS loop that we need to trap an IO call or :barf:

This problem is compounded with GPU stuff. There is so much bullshit licensing mumbo jumbo surrounding doing math with triangles and silicon chips that it's goddamn ridiculous, but that's the way the world works.

Spoken like it's 2000 and Loki is still porting games. WINE is extremely good these days. They have almost perfect DX9 support. It's never been better for gaming on Linux.

Cyberpunkey Monkey
Jun 23, 2003

by Nyc_Tattoo
Whatever. Wine sucks. It's a fun toy, but it's not reliable for an arbitrary game to run well enough to play.

edit: Linux gaming, has never been better though. There is better and quicker driver support, and poo poo like the Humble Bundle allows us to get good games that run native.

I would rather have native games than a hacky tool like Wine. It's cool, really. But, Linux is past that now. We can stand on our own.

Thermopyle posted:

Yeah, I'm giving up on the idea of running games. I'll just keep a Windows partition around for that. The upside being that if I have to go through the "effort" to reboot into a different OS to play a game, I'll get more work done!

It's not a bad idea to run Windows on your bare metal and whenever you *need* a *nix for something just spin up a VM or get yourself a sweet shell account and ssh in with putty, like the cool kids.

There is little reason to worry about which OS you're running except that Linux is fun as poo poo and you can do some really good learnin' on it. If you're as insane as I am. I recommend Tanenbaum's Modern Operating Systems as a great textbook that helped make a lot of things make a lot of sense in the general, abstract case.

Cyberpunkey Monkey fucked around with this message at 01:14 on Oct 23, 2012

pseudorandom name
May 6, 2007

Xenomorph posted:

I can't seem to separate the ACLs and POSIX permissions like I can on Mac OS X and FreeBSD. However, Samba+NFS still seems like a workable solution, even with the goofy permissions. I'll just have to check permissions a bit more often on the shares.

The "security mask" option doesn't do what you want?

Doctor w-rw-rw-
Jun 24, 2008

evol262 posted:

ESXi doesn't require Windows for administration if you script it, use the CLI, or use the (experimental) web UI for it. This isn't really a "for home use" scenario, though.
I could be wrong, but the useful scripting features require a $$$ license. But yeah, not a home-use scenario. Using the Windows utility is the way to go for home use.

evol262 posted:

What show-stopping bug? Reported it? Have a bugzilla number? I've have problems with some sets of hardware not virtualizing some operating systems (specifically RHEL5.3 on Opterons and Solaris 10), but file a bug.
I tried Fedora and it was fixed. Had something to do with ACPI or APIC; I don't remember. I didn't look too far into it, once I found that out, in any case. EDIT: the problem was that beastie, the menu, would halt, so it would never even get past the initial boot phase after the bootloader.

evol262 posted:

Additionally, networking is pretty bulletproof if you're comfortable configuring Linux networking. It's somewhat more intuitive when it comes to VLANs as well.
I wanted to run a VM with two ethernet interfaces and one WLAN, residing on an internal network, public network, offering up Wi-fi, as well as a netboot host. Suffice it to say that while I could certainly configure stuff by hand, it was too tedious and didn't integrate well enough with selecting networks in the GUI tools for setting up VMs. Not impossible, but not simple.

evol262 posted:

Spoken like it's 2000 and Loki is still porting games. WINE is extremely good these days. They have almost perfect DX9 support. It's never been better for gaming on Linux.

osirisisdead posted:

Whatever. Wine sucks. It's a fun toy, but it's not reliable for an arbitrary game to run well enough to play.

I sort of agree and disagree with both. Wine is pretty awesome, but not for games IMO. A layer of API emulation isn't going to have the same implementation details, and game programmers use every trick they can, so I wouldn't be inclined run any games without an official Linux port on Linux, because that means they have been properly tested and supported on Linux, regardless of whether they're using OpenGL or some emulation of DirectX.

Doctor w-rw-rw- fucked around with this message at 01:54 on Oct 23, 2012

Xenomorph
Jun 13, 2001

pseudorandom name posted:

The "security mask" option doesn't do what you want?

If the ACL and POSIX permissions match (just the one owner, group, and "everyone"), then security masks work when files and sub-directories are created.
As soon as the ACL no longer match the POSIX permission (a second user is added, for example), then the masks are ignored for all further files & directories created.

Giving a user permission to Read a folder via ACL suddenly changes the POSIX permission files in that folder to "read/write/execute". You can change the POSIX permission back (g-wx), and the ACL stays correct. So it's obvious that the POSIX and ACLs can remain separate. I'd like Samba to just leave the POSIX permissions alone. I want it to only touch extended attributes/ACLs. I swear it didn't work like that on FreeBSD.

FISHMANPET
Mar 3, 2007

Sweet 'N Sour
Can't
Melt
Steel Beams

Xenomorph posted:

File storage for a lot of labs.
A user will be gathering data on one Linux systems & saving it to our server via NFS.
They then jump on a Windows or Mac system and access the data on the server via SMB to process the data.
Other lab users have their specific tools, but many are Linux only. They jump on a Linux system and work with the processed data via NFS. Lots of back and forth where different people will want access to centralized data from specialized systems.

We've had Apple servers doing the hosting. SMB & NFS access to the same data. Samba is even more terrible on Mac OS X, and permissions got messed up a lot. Our solution here was to simply block Windows from even seeing the permissions ("nt acl support = no"). Mac OS X (up to 10.6) had a decent permissions management tool (we've been unable to get it to work in 10.7/10.8). It lets us *separately* adjust the POSIX permissions and Windows-compatible ACLs for all the directories.

I'm replacing all the ancient Apple servers (no upgrade path), and Windows is terrible at working with NFS (a whole new level of permissions issues and even performance problems), so Linux seemed like the best choice. FreeBSD honestly has worked better for me as a file server (so far), but it doesn't work with our management or backup software (and I'm not going to load a ton of data on it with no backup solution). Solaris may be an option.

I haven't found a tool that works as well as the Mac OS X one for managing ACLs ("Eiciel" for Linux is terrible), so we're left managing permissions from Linux command line and Windows Security dialog.
I set a permission in Linux, and the Windows permission gets changed to something I don't want.
I change the Windows permission back to what I want, and the Linux permission gets changed to something I don't want.

I can't seem to separate the ACLs and POSIX permissions like I can on Mac OS X and FreeBSD. However, Samba+NFS still seems like a workable solution, even with the goofy permissions. I'll just have to check permissions a bit more often on the shares.

We do exactly this at work. This is what we configure per share, copy pasted from our config and sanitized:
code:
[group40]
   comment = Project space for GROUP group
   valid users = @groupname
   path = /project/group40
   read only = no
   browseable = yes
   create mode = 0775
   force group = groupname
The samba server is joined to the domain, and users have the same username in both Windows and Unix, so windows users FISHMANPET maps to unix user FISHMANPET. If FISHMANPET is in the Unix group @groupname, then I have permissions to the share. Files I write are owned by me, but the group is forced to groupname (normally it would default to my default group). Not sure why create mode is 0775 (maybe the group requested it for their files). Overall it's been humming along for years without any permissions problems.

Xenomorph
Jun 13, 2001

FISHMANPET posted:

Overall it's been humming along for years without any permissions problems.

How do the permissions look from Windows?

ExcessBLarg!
Sep 1, 2001

Thermopyle posted:

But why is that specific to GUI programs?
Honestly the main problem I've had running GUI programs as root is that they have a tendency to spew lots of dotfiles everywhere and I'll run into permission issues with them later on. Also, I can't think of one GUI program that I'd actually need to run as root.

telcoM
Mar 21, 2009
Fallen Rib

Xenomorph posted:


Giving a user permission to Read a folder via ACL suddenly changes the POSIX permission files in that folder to "read/write/execute". You can change the POSIX permission back (g-wx), and the ACL stays correct. So it's obvious that the POSIX and ACLs can remain separate. I'd like Samba to just leave the POSIX permissions alone. I want it to only touch extended attributes/ACLs. I swear it didn't work like that on FreeBSD.

It's not Samba, it's the POSIX ACL implementation.

acl(5) posted:

CORRESPONDENCE BETWEEN ACL ENTRIES AND FILE PERMISSION BITS
The permissions defined by ACLs are a superset of the permissions speci‐
fied by the file permission bits.

There is a correspondence between the file owner, group, and other per‐
missions and specific ACL entries: the owner permissions correspond to
the permissions of the ACL_USER_OBJ entry. If the ACL has an ACL_MASK
entry, the group permissions correspond to the permissions of the
ACL_MASK entry. Otherwise, if the ACL has no ACL_MASK entry, the group
permissions correspond to the permissions of the ACL_GROUP_OBJ entry.
The other permissions correspond to the permissions of the ACL_OTHER_OBJ
entry.

The file owner, group, and other permissions always match the permissions
of the corresponding ACL entry. Modification of the file permission bits
results in the modification of the associated ACL entries, and modifica‐
tion of these ACL entries results in the modification of the file permis‐
sion bits.

[...]

RATIONALE
IEEE 1003.1e draft 17 defines Access Control Lists that include entries
of tag type ACL_MASK, and defines a mapping between file permission bits
that is not constant. The standard working group defined this relatively
complex interface in order to ensure that applications that are compliant
with IEEE 1003.1 (“POSIX.1”) will still function as expected on systems
with ACLs. The IEEE 1003.1e draft 17 contains the rationale for choosing
this interface in section B.23.

That seems to say that the permission bits explicitly are not separate from ACLs.

So, the result is something of a mess because of an effort to maintain backward compatibility.

Way back when I sat on a course on some other Unix, I was told that when ACLs are placed on a file, the behavior of the "ls -l" command changes: instead of displaying the actual state of the permission bits, they reflect the overall presence of read/write/execute permissions/ACLs for user(s) and group(s). So, if you had a file that is displayed as "-rwx------+" in a "ls -l" listing, that would mean the file has read, write and execute permissions for some named users, but they would not necessarily all apply for the same user. For example, user joe might have read and execute permissions, but not write, and user mike might have read and write permissions, but not permission to execute.

Likewise, the group bits would describe what kind of privileges have been granted to specific groups, but not all displayed permissions would necessarily apply to the same group.

The instructor suggested that the proper course of action was to ignore the permission bits completely whenever you see the '+' sign that indicates an ACL is present; instead you should use the appropriate command to view the actual ACL to get the real deal.

This advice has served me well over the years on Linux, Solaris, HP-UX and occasionally some other Unixes.

I could not quickly find specific documentation on the behavior of the GNU ls command in the presence of ACLs. I guess I might have to RTFS if I want to get to the bottom of it.

But on Linux, the command to view the complete Posix ACL is "getfacl".
For Xenomorph, I think replicating the situation and running a "getfacl" before and after the chmod is probably the only way to really understand what is going on.

Vulture Culture
Jul 14, 2003

I was never enjoying it. I only eat it for the nutrients.

telcoM posted:

It's not Samba, it's the POSIX ACL implementation.


That seems to say that the permission bits explicitly are not separate from ACLs.

So, the result is something of a mess because of an effort to maintain backward compatibility.

Way back when I sat on a course on some other Unix, I was told that when ACLs are placed on a file, the behavior of the "ls -l" command changes: instead of displaying the actual state of the permission bits, they reflect the overall presence of read/write/execute permissions/ACLs for user(s) and group(s). So, if you had a file that is displayed as "-rwx------+" in a "ls -l" listing, that would mean the file has read, write and execute permissions for some named users, but they would not necessarily all apply for the same user. For example, user joe might have read and execute permissions, but not write, and user mike might have read and write permissions, but not permission to execute.

Likewise, the group bits would describe what kind of privileges have been granted to specific groups, but not all displayed permissions would necessarily apply to the same group.

The instructor suggested that the proper course of action was to ignore the permission bits completely whenever you see the '+' sign that indicates an ACL is present; instead you should use the appropriate command to view the actual ACL to get the real deal.

This advice has served me well over the years on Linux, Solaris, HP-UX and occasionally some other Unixes.

I could not quickly find specific documentation on the behavior of the GNU ls command in the presence of ACLs. I guess I might have to RTFS if I want to get to the bottom of it.

But on Linux, the command to view the complete Posix ACL is "getfacl".
For Xenomorph, I think replicating the situation and running a "getfacl" before and after the chmod is probably the only way to really understand what is going on.
It's important to note that POSIX ACLs aren't the only ACL implementation, either. Some filesystems (e.g. ZFS, GPFS) support NFSv4 ACLs, which integrate much better with CIFS and behave a lot more predictably to CIFS clients.

Xenomorph
Jun 13, 2001

Misogynist posted:

It's important to note that POSIX ACLs aren't the only ACL implementation, either. Some filesystems (e.g. ZFS, GPFS) support NFSv4 ACLs, which integrate much better with CIFS and behave a lot more predictably to CIFS clients.

I understand why ZFS isn't on Linux - but why isn't NFSv4 ACLs? Samba seems to ignore them completely on Linux (but take *full* advantage of them on Solaris and BSD).

Mierdaan
Sep 14, 2004

Pillbug
Hey Linux nerds - we have a structural biologist starting at my work soon who needs to do GPU-intensive modeling on a CentOS workstation. What brand of GPU is least likely to make me want to kill myself, trying to support it?

Adbot
ADBOT LOVES YOU

spankmeister
Jun 15, 2008






Nvidia

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply