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

Thanks a lot

-w option worked!!

  • Comment on Re^2: Checking for directory write permissions

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.