Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2015-01

linux ACL

5 messages · 4 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Koenraad Lelong

Hi,

I need to set ACL's on files on Linux. Is there something ready-made in fpc ? Or should I use a TProcess and execute a setfacl that way ?

TIA

Koenraad

Michael Van Canneyt
to Koenraad Lelong
Koenraad Lelong wrote
Hi, I need to set ACL's on files on Linux. Is there something ready-made in fpc ? Or should I use a TProcess and execute a setfacl that way ?

I have no knowledge of a native implementation.

Please, add a feature request to the bugtracker to add support for *xattr calls in linux (or generally unix if it turns out to be a posix call)

Michael.

Mark Morgan Lloyd
to Henry Vermaak
Henry Vermaak wrote 9 lines
On Fri, Jan 23, 2015 at 11:37:05AM +0100, Koenraad Lelong wrote: > Hi, > > I need to set ACL's on files on Linux. Is there something ready-made > in fpc ? Or should I use a TProcess and execute a setfacl that way ? Easiest would be to create a binding for libacl. ACL is specified by POSIX, so there's nothing stopping fpc from implementing it natively, though.

Would this require root access? As an aside, I've used capabilities to allow a program to listen to a low-numbered TCP port and found that setting it uid root was incompatible with GTK (Qt was fine).

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]
Henry Vermaak
to Mark Morgan Lloyd
Mark Morgan Lloyd wrote 12 lines
Henry Vermaak wrote: >On Fri, Jan 23, 2015 at 11:37:05AM +0100, Koenraad Lelong wrote: >>Hi, >> >>I need to set ACL's on files on Linux. Is there something ready-made >>in fpc ? Or should I use a TProcess and execute a setfacl that way ? > >Easiest would be to create a binding for libacl. ACL is specified by >POSIX, so there's nothing stopping fpc from implementing it natively, >though. Would this require root access?

Only if you don't own the file, I guess. I can use setfacl on files I own.

As an aside, I've used capabilities to allow a program to listen to a low-numbered TCP port and found that setting it uid root was incompatible with GTK (Qt was fine).

I'm using capabilities to allow an fpc daemon running as non-root to set the time and it's working OK.

Henry