bruceravel / demeter

Process and analyze X-ray Absorption Spectroscopy data using Feff and either Larch or Ifeffit.
http://bruceravel.github.io/demeter
Other
67 stars 32 forks source link

Add support for access control lists #27

Closed tschoonj closed 8 years ago

tschoonj commented 8 years ago

Hi Bruce,

We faced a problem here opening certain files over our network: an error message popped up saying they were not readable. I traced back the origins of the issue to the files' access control lists. Using the suggestion from http://perldoc.perl.org/functions/-X.html I implemented a fix which seems to work fine.

Best,

Tom

bruceravel commented 8 years ago

Hi Tom,

Thanks for this. And great thanks for not only tracking down the problem, but suggesting a solution. Wow! Awesome!

Could you say a few more words about the situation, just so I know what to look for should this come up again? What was the nature of the network access (smb, nfs, whatever)? What was the machine on the other end? What was the nature of the ACL and permissions of the file on the other end? Thanks. B

tschoonj commented 8 years ago

Hi Bruce,

The file is indeed stored on an NFS network, but that may not be relevant as ext4 also supports ACL.

The problem is quite obvious actually: I only have read access to the file if the ACL are processed.

Thanks for merging in the patch!

Best,

Tom

$ groups
awf63395 dls_staff dls_dasc dls-softinst

$ ls -lh /dls/i18/data/2016/sp12477-1/Experiment_1/ascii/67820_Y-foil_1.dat
-rw-rw----+ 1 gda2 sp12477_1 1.4K Jan 28 10:25 /dls/i18/data/2016/sp12477-1/Experiment_1/ascii/67820_Y-foil_1.dat

$ getfacl /dls/i18/data/2016/sp12477-1/Experiment_1/ascii/67820_Y-foil_1.dat
getfacl: Removing leading '/' from absolute path names
# file: dls/i18/data/2016/sp12477-1/Experiment_1/ascii/67820_Y-foil_1.dat
# owner: gda2
# group: sp12477_1
user::rw-
user:i18detector:rwx        #effective:rw-
user:gda2:rwx           #effective:rw-
group::r-x          #effective:r--
group:i18detector:rwx       #effective:rw-
group:dls_dasc:rwx      #effective:rw-
group:dls_sysadmin:rwx      #effective:rw-
group:dls-detectors:r-x     #effective:r--
group:i18_data:r-x      #effective:r--
group:i18_staff:r-x     #effective:r--
group:sp12477_1:r-x     #effective:r--
mask::rw-
other::---