ReadyNAS access denied error on read-only file move

Running 9.5.2 and still learning its subtleties...

Whenever I go to move read only files (or blocks of files, some of which are RO), I get an access denied error. They'll copy without a problem (and the settings clear the RO flag), but there's no explanation that access is denied because of the RO flag, nor is there the conventional "this file is read only do you want to do this anyway" kind of message.

I searched the prefs UI, and the forums, but couldn't find any mention of the problem or how to fix it.

Hoping someone can set me straight...

When copying or moving files Opus shouldn't care about the read-only flag on the source files.

If you are overwriting a read-only file in the destination, Opus should show a message saying "Warning! The destination file is marked as 'read-only'!" and ask if you want to replace it or not.

You can turn off that warning and always replace if you want, but it doesn't sound like that is what you're seeing.

Can you post a screenshot of the error message you're seeing? Just attach it to a reply using the PostReply button (not the QuickReply area).

Here's the error...

I don't think that's due to the read-only flag.

Do you have permission to move the files in that folder? Does the same move using Explorer work?

What happens if you push Retry?

Yes, I have permissions to move files.

In Explorer, I get a warning that the file is RO asking me if I want to move it.

If I push "Retry", it simply returns to this error window.

And if I deselect the RO flag... Dopus moves the file just fine.

Strange...

Which versions of Opus and Windows?

What kind of folder is the source? Local HDD or something else?

Opus 9.5.2 on WXP Pro.

It's a networked drive.

I meant to check this before... the issue does NOT occur on a local drive. Only in this networked context.

What kind of network drive? Is it Windows at the other end or Samba (OS X, Linux etc.) or some kind of NAS device?

It's an Infrant ReadyNAS.

My guess is this is a bug in the NAS, or a permissions issue with the NAS.

(Plenty of other NAS have had bugs which Opus has had to work around, so this might be another one. Many NAS devices seem to be badly written, at least when you start using them with anything but Explorer, since Explorer tends to be the only thing they get tested against. Also means Microsoft dare not change how Explorer copies files for fear of triggering similar problems.)

In terms of permissions, when you used Explorer to successfully files off the device, was that from the same user account and same machine, and with the same files which showed the error with Opus?

What happens if you right-click a file and open its properties, then clear the Read-Only attribute? Does the attribute get cleared when you click OK? From a quick read of its manual, it sounds as though the device may use the read-only attribute to indicate that the entire filesystem is read-only (to the user and/or machine viewing it, or because it's an NTFS drive which the manual says it only mounts as read-only).

[quote="leo"]My guess is this is a bug in the NAS, or a permissions issue with the NAS.

(Plenty of other NAS have had bugs which Opus has had to work around, so this might be another one. Many NAS devices seem to be badly written, at least when you start using them with anything but Explorer, since Explorer tends to be the only thing they get tested against. Also means Microsoft dare not change how Explorer copies files for fear of triggering similar problems.)[/quote]
Opus is the only file manager -- or program that does file management tasks -- that has this issue. Since my initial post, I've tested the same behavior against close to a dozen apps on Windows and Linux and none of them exhibits this behavior.

And having tested Opus a good long while ago before I bought it, I don't recall it happening on older versions, either. Obviously, I can't guarantee that I was moving RO files, but it's certainly not unreasonable to think that I would do that in the several month timespan of Opus' test license.

If I try to delete a file with RO permissions from Opus, I get the "file locked what do you want to do" confirmation dialogue that I expect I should get when moving.

Looks like there's a word missing here, but if you meant "using Explorer to copy files off the device"... that's not accurate. I wasn't using Explorer to copy files off the device. I was using Explorer to copy files from different mounted drives ON the device... and without issue...

Yep.

So let me get this straight:

  • You select a file marked as 'read-only' on the NAS drive and click Move to move it to your local hard drive
  • The file copies ok, but then you get an 'access denied' error instead of the original file being deleted
  • Clicking Retry to the error message just redisplays the error

Is that correct?

If you look at the file while the error message is displayed, is the 'read only' flag still set on it?

If it is, it seems like the NAS is ignoring the command from Opus to clear the read only flag. You could try looking with Process Monitor to see what commands are being sent and their result.

[quote="jon"]So let me get this straight:

  • You select a file marked as 'read-only' on the NAS drive and click Move to move it to your local hard drive
  • The file copies ok, but then you get an 'access denied' error instead of the original file being deleted
  • Clicking Retry to the error message just redisplays the error

Is that correct?[/quote]
Not quite. This is what I've been doing:

  • I select an RO file on the NAS and drag copy into a subdirectory of its current location. (Also tried this with the Move button to a lister in the opposite pane, with the same results, as you would expect.)
  • The file does not copy at all, and I get the 'access denied' error.
  • Clicking 'Retry' to the error message redisplays the error.

Your question inspired some additional testing:

  • Selecting an RO file on the NAS and moving it to a local drive, or to a different mapped drive on the NAS... works as you would expect. Permission preserved and the file moves without issue or mention.

[quote="jon"]If you look at the file while the error message is displayed, is the 'read only' flag still set on it?

If it is, it seems like the NAS is ignoring the command from Opus to clear the read only flag. You could try looking with Process Monitor to see what commands are being sent and their result.[/quote]

Looking at the file while the error message is displayed, the flag IS still set... but this differs from your earlier use case/question in that NO copy operation was actually done. So -- does that change the issue?

Using the Copy button, the file copies to the same drive without issue, and the RO flag is stripped per the pref.

I don't often use Process Monitor, so I'm not sure if I've grabbed all of the transaction, but I think this is what it thinks is going on:

119186 12:01:09.9381012 PM dopus.exe 1412 CreateFile H:\work\Eudora -slash- Penelope\website stuff\Screen shot 2010-02-05 at 10.44.17 AM.png ACCESS DENIED Desired Access: Read Attributes, Delete, Synchronize, Disposition: Open, Options: Synchronous IO Non-Alert, Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a 119187 12:01:09.9408258 PM dopus.exe 1412 ReadFile C:\WINDOWS\CSC\00000001 SUCCESS Offset: 0, Length: 64 119188 12:01:09.9409431 PM dopus.exe 1412 RegCloseKey <INVALID NAME> INVALID HANDLE

Does any of this help clarify?

What happens if you try to rename a read-only file without moving it? (i.e. Select it, hit F2, give it a new name.)

On the NAS, I get the error, then it kicks me into the File Renamer window. Clicking okay there returns to the error window in a loop. So can't rename.

On a local drive, it simply renames the file as you would expect.

Sounds like a bug in the NAS where it isn't allowing read-only files to be renamed in some situations.

Sounds a lot like this bug that has affected lots of people (and seems to have different behaviour in Explorer depending on OS version, which could also explain why some programs trigger it and not others):

readynas.com/forum/viewtopic ... +read+only

I'm by no means trying to excuse the NAS from responsibility if it's at fault, but...

A ) This isn't the same NAS product as mine, and the entire thread seemed to be concerned with user permissions (from actions in Explorer and only Explorer)
B ) It does nothing to explain why I can move (or rename) these files in every app I've tried on both Windows and Linux, except for Opus.

It also doesn't explain why the failed move operation generates some kind of cryptic error. It's not like Opus can't tell the file is RO. And it's not like it doesn't catch the fact that it's RO if I go to delete it. In that event Opus does exactly what you'd expect it to do: gives a warning that the file is marked "read only" and asks what to do next.

Surely these behaviors are to do with Opus and not what Opus is trying to read/write. Right?

The thread seems to cover several versions of the ReadyNAS product.

It shouldn't matter if the file is read-only when it's being renamed (which includes moves that don't move it to another partition).

The read-only flag should be irrelevant to this operation. If it isn't then that's a bug in the NAS.

The read-only attribute (should) only protects the data in the file, not the name of the file.

The error message is telling you you don't have permission because that's what the NAS is telling Opus.

Normal file-system behaviour is that the RO flag does not prevent file renames (or moves, which is really just a rename as well). So Opus doesn't bother to check for RO when moving (on the same partition) or renaming - because there should never be a need to.

Yes, because normal file-system behaviour is for the RO flag to prevent a file delete. So Opus looks for the flag specifically, and if set offers to let you clear it and delete the file.