#14 permission denied on mlocate.db
Closed: Fixed Opened by sebbu.

updatedb browse the files in the path requested, then print

"updatedb: error replacing `/cygdrive/o/mlocate/var/mlocate/mlocate.db': Permission denied"

If the file already exist

The first run ( without database ) works fine, without errors

updatedb -V

updatedb (mlocate) 0.22.2

uname -a

CYGWIN_NT-5.1 sebbu-ordi 1.5.25(0.156/4/2) 2008-06-12 19:34 i686 Cygwin

id

uid=0(root) gid=0(root)

ls -al var/mlocate/mlocate.db

-rwxrwxrwx 1 root root 65M Feb 26 12:52 var/mlocate/mlocate.db


Thanks for your report.

The failing system call is rename("/cygdrive/o/mlocate/var/mlocate/temporary_file" , "/cygdrive/o/mlocate/var/mlocate/mlocate.db").

Can you figure out why is it failing? Are the permissions of the directory set correctly? Does Windows perhaps prohibit rename() over an existing file, or oven an existing open file?

You might be able to use mv(1) as a way to test the behavior of rename(3) from the command-line.

When updatedb isn't launched, i can overwrite the file without problems.

And yes, windows prohibit rename() over an existing OPEN file.

It seems the limitation was coming for the cygwin1.dll rename(3) system function call.

It has been recoded for cygwin 1.7.2, and doesn't fail anymore in the latest versions.

All previous version than 1.7.2 give the error i incurred.

Metadata