Cannot rename across bind mounts

Reuben Martin rmartin at
Tue Sep 22 02:32:21 EST 2009


I am having problems with renaming a file if the source or destination path is located on a bind mount.

For instance if in the root directory, I have the directories "Files1" and "Files2" where one or both of the directories are created as the result of a bind mount, then when trying to do 

rename /Files1/a /Files2/b

it produces an error saying it "Couldn't rename file".

The ownership and permissions of files and directories have no bearing on this problem. Renaming the files without going outside of the bind mount doesn't cause problems, only when crossing the bind mount does the error occur.

Is this a bug, or is this an intended behavior for some security reason?


More information about the openssh-unix-dev mailing list