Say I'm the owner of a directory and I have read and write permissions, but not execute permissions, where the directory structure is like this:
x/ (drw-r--r--)
y (-rw-r--r--)
z (-rw-r--r--)
I know that without execute permissions, I can't cd
to the directory, but I thought that renaming files within the directory would count as "writing" to the directory. Thus it surprised me that the following command gave a permission denied.
mv x/y x/w
Why does mv
require execute permissions on the directory x
? Is it something special about the mv
command? Is mv
using cd
internally or something?
mv
requires execute permissions on the directoryx
. – Harvinder Sep 21 '14 at 02:08