- my $login = shift || $::lx_office_conf{testing}{login} || 'demo';
- my $client = shift || $::lx_office_conf{testing}{client} || '';
- _login($client, $login);
+ # Try actually creating a file. Due to ACLs this might be possible
+ # even if the basic Unix permissions and Perl's -w test say
+ # otherwise.
+ my $file = "${dir}/.writetest";
+ my $out = IO::File->new($file, "w") || return 0;
+ $out->close;
+ unlink $file;
+
+ return 1;