in reply to Re^2: automounted directory status
in thread automounted directory status
But it *is* answering the question asked. 'Is /mnt/blahblah' writeable now' is not the same question as 'is /mnt/blahblah writeable after it has been autommounted'. You are asking 'is it writeable now'. The canonical way of asking that question is a stat(2) call. As I demonstrated, that is what perl does. It's what your shell probably does too - mine certainly does:
$ strace sh -c "if [ -w /etc ]; then echo Writeable; fi" ... stat("/etc", {st_mode=S_IFDIR|0755, st_size=12288, ...}) = 0 ...
Which clearly shows that perl is Doing The Right Thing by using stat(2) to check whether the directory is writeable.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: automounted directory status
by AlPaton (Novice) on Feb 03, 2014 at 14:05 UTC | |
by DrHyde (Prior) on Feb 04, 2014 at 12:20 UTC | |
by AlPaton (Novice) on Feb 05, 2014 at 11:22 UTC |