ubuntu - Shell script, directory is writable strange behavior -


here -w option description test's man page :

   -w file           file exists , write permission granted 

and example better thousand words :

$ ls -ld /home/maxime/.gvfs dr-x------ 2 maxime maxime 0 aug  5 22:53 /home/maxime/.gvfs $ [ -w /home/maxime/.gvfs ] && echo "is writable"  writable $ touch /home/maxime/.gvfs/file touch: cannot touch `/home/maxime/.gvfs/file': no such file or directory 

as can see, directory shouldn't writable : r , x flags set. but, test says can write in it... first strange thing. other 1 happens when try create file in : no such file or directory.

by way, i'm running above commands user "maxime", , i'm using dash ubuntu 12.04.

well, i'm bit lost here, got explanation ?

.gvfs special file, in fact virtual file system created gvfs-fuse-daemon. should not use directly.


Comments

Popular posts from this blog

ios - UICollectionView Self Sizing Cells with Auto Layout -

node.js - ldapjs - write after end error -

DOM Manipulation in Wordpress (and elsewhere) using php -