gman has asked for the wisdom of the Perl Monks concerning the following question:
*** file permisions: $VAR1 = bless( { 'uid' => 500, 'flags' => 15, 'mtime' => 1203350526, 'atime' => 1203350526, 'perm' => 33092, 'gid' => 500, 'size' => '0' }, 'Net::SFTP::Attributes' );
Thanks, Corymy $attrs = Net::SFTP::Attributes->new(Stat => [ stat "test.file" ]); print "*** file permisions: " . Dumper($attrs) ."\n"; $attrs->perm( [ '0777' ] ); # what format is this? $sftp->do_setstat('test.file', $attrs); $attrs = Net::SFTP::Attributes->new(Stat => [ stat "test.file" + ]); print "*** file permisions: " . ($attrs->{'perm'}) ."\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: setting file permissions through sftp
by pc88mxer (Vicar) on Feb 18, 2008 at 17:14 UTC | |
by gman (Friar) on Feb 18, 2008 at 17:23 UTC | |
by almut (Canon) on Feb 18, 2008 at 17:36 UTC | |
by gman (Friar) on Feb 18, 2008 at 18:21 UTC |