Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^2: Checking for directory write permissions

by sara2005 (Scribe)
on Jun 26, 2006 at 18:30 UTC ( [id://557634] : note . print w/replies, xml ) Need Help??


in reply to Re: Checking for directory write permissions
in thread Checking for directory write permissions

Thanks a lot

-w option worked!!

Replies are listed 'Best First'.
Re^3: Checking for directory write permissions
by Tanktalus (Canon) on Jun 27, 2006 at 03:34 UTC

    Warning. The -w option will give you a misleading postive result in the case where you have permissions, but the partition is mounted read-only (popular for NFS on unix). We actually just wrote a quick function to test writeability by opening a file for write access wherever we were checking, and, if successful, deleting it afterwards. It was the only foolproof way we could come up with of detecting the situation.