I have been using rsync over ssh (cygwin) for some time now from a Windows 2003 Server to back up files to a Debian box which has a USB hard drive attached.

The files are rsynced directly to the USB hard drive which is mounted as /media/backup on the Debian box.

The backup is run from a scheduled task on the Windows box and the stdout and stderr are output to files which are emailed to me after the backup completes.

Every now and again I see errors in the stderr file like:

rsync: failed to set times on "/media/backup/[some file name] ": Read-only file system (30)

for every file that has changed since the last backup.

When I see this error I unmount the drive and remount. That resolves the problem.

Can anyone enlighten me as to why this error occurs? i.e. Why would a USB drive become read-only once every couple of months?

2 Answers 2


The filesystem is being made read-only in response to some error in interacting with it. You should see something come up in dmesg and/or /var/log/messages (or equivalent) before the rsync starts complaining.


What file system is on the USB drive? If it is NTFS, it might not have been cleanly unmounted. So the default is generally to mount it read-only until you have run a disk check or until the unclean mount flag is cleared. (Not sure what the flag is actually called).

  • The USB drive is formatted ext3. Jul 9, 2009 at 11:54
  • Hmmmm... I would look at dmesg as chaos said. Maybe something like a journal abort, very well could be a bad drive if you are getting those. Or maybe the USB cable keeps getting yanked. Jul 9, 2009 at 11:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .