bash-2.05# ./ch_sunflare-beam.pl
You are on sunflare
Which ACLs would you like to apply to /mkt/sbo/inbound
rwx
You said rwx
/mkt/sbo/inbound
1: No such file or directory
bash-2.05#
####
#!/usr/bin/perl -w
use strict;
my @users = qw(ux43 ux95 ux61 ux10 ux78 vx14 ux26 vx20);
my $users;
my @dirs_sunflarebeam = "/mkt/sbo/inbound";
my $hostname = `hostname`;
print "You are on $hostname\n";
print "Which ACLs would you like to apply to @dirs_sunflarebeam\n";
my $ans = ;
chomp $ans;
print "You said $ans\n";
my @args = ("setfacl", "-m");
foreach my $dirs(@dirs_sunflarebeam){
print "$dirs\n"; <==this prints ok however the $dirs fails below with the message posted above:
system(@args, "u:$users[0]:$ans", "$dirs") == 0
or die "system @args failed $?";
# system(@args, "u:$users[3]:$ans", $dirs) == 0
# or die "system @args failed $?";
}
my $dir = @dirs_sunflarebeam;
#print "$dirs\n";
system("getfacl", "$dir");
####
bash-2.05# getfacl /mkt/sbo/inbound
# file: /mkt/sbo/inbound
# owner: mkt
# group: mkt
user::rwx
user:ux10:rwx #effective:rwx
user:ux438:rwx #effective:rwx
user:pdev:rwx #effective:rwx
group::rwx #effective:rwx
mask:rwx
other:rwx
bash-2.05#