Hi there!
I have a PC with DUAL BOOT for openSUSE Leap 42.2 (clean installed) and Windows 7.
My /etc/fstab file has the following entry for the NTFS partition:
But, when I want to move a file to that partition, the following message is printed out:
adrian@asia:Temporal> ls
test_file.txt
adrian@asia:Temporal> mv test_file.txt /DATA/Users/Adrián/Documents/ mv: preserving times for ‘/DATA/Users/Adrián/Documents/test_file.txt’: Operation not permitted
mv: preserving permissions for ‘/DATA/Users/Adrián/Documents/test_file.txt’: Operation not permitted
adrian@asia:Temporal> ls
adrian@asia:Temporal>
As you can see, the file (“test_file.txt”) is moved anyway.
If I try to copy the file to the NTFS partition, it is normally copied:
adrian@asia:Temporal> cp test_file.txt /DATA/Users/Adrián/Documents/
adrian@asia:Temporal> ls
test_file.txt
adrian@asia:Temporal>
What is wrong?
Why “Operation not permitted” when I try to move the file?
Can sombody help me to avoid this message?
When I try to move the file by mean Dolphin, an error message is printed out saying:
**"Access denied to /DATA/Users/Adrián/Documents/**test_file.txt"
thus the only thing we know about it is that it exists. But we know nothing about it’s ownership and permission. Things that are crucial to understand which operations are permitted or not.
Thus please
ls -l test_file.txt
And btw, please use CODE tags, not Quote tags, around computer texts. It is the # button in the tool bar of the post editor.
Are yuu sure it was moved? It was copied. But is the original file deleted?
Moving (in Unix/Linux) with the mv command is a bit strange beast. You can use it for:
Changing the name of a file (nothing is moved at all). You need w-permission for the directory and rx permissions in all directories leading to it.
Moving the file within the same file system to a place in another directory. Here the file is not moved at all, but the entry record of the file in it’s directory is moved to another directory. That is just a minor action. (BTW you can do a name change together with the move). You need w-permission for both involved directories and rx permissions in all directories leading to them.
Moving the file to another file system involves a copy of the file to that other file system and a remove of the file on the original file system. It is in fact a combination of a cp and an rm. For the cp you need wx-permissions for both directories, rx permission for all directories leading to it and r-permission for file. For the rm you need additional wxr permission for the original directory.
I tried to gather information from you to check this. I think what we are still missing is the ownership/permission of the “sending” directory Temporal. And those are critical to the rm part of the move action.
Did I understand this problem wrong? Did aecordoba’s problem was only the preserving of times and permissions was not permitted? So the mv/cp operation is successful with original timestamps and permissions lost/reset.
IF this is the case, then caf4926’s suggestion should work, using following /etc/fstab option:
UUID=904EBA4B4EBA2A3C /DATA ntfs-3g defaults 0 0
Forgive me if I’m wrong, just trying to figure out the situation.
I do not read anything about “preserving time and permissions” in the first post of this thread. I think the following is what he asks:
Why “Operation not permitted” when I try to move the file?
Can sombody help me to avoid this message?
It is btw impossible to preserve permissions (and owners) when copying to an NTFS file system. They do not exist on such a file system and can thus not be stored there, let alone preserved.
Sorry for the confusion that I pruned the original messages, which are in the quoted section.
So there are informations before the “Operation not permitted” statements. So I think the operations not permitted are the two “preserving” operation but not the “mv” operation, because aecordoba also said,
Sorry guys but I think I have something new about this problem.
’
I just checked in my laptop, having a Windows 10 and openSUSE Tumbleweed dual systems just like the OP’s. It seems can preserve the timestamp while mv a file from Linux to NTFS partition of the Win10. Here is the output.
~> ls -nl gpu.hang.error.txt
-rw------- 1 1000 100 775146 Nov 22 14:39 gpu.hang.error.txt
~> mv gpu.hang.error.txt /WinD
~> ls -l /WinD/gpu.hang.error.txt
-rw------- 1 1000 0 775146 Nov 22 14:39 /WinD/gpu.hang.error.txt
And FYI, my fstab for this partition looks like this,
Hm, I think you are correct. I am afraid that I was confused by the computer output not being between CODE tags and also because that output is obviously fumbled with. Some characters are bold there, which I do not believe the shell and/or ls does. And when the output is fumbled with, I mistrust all of it :(.
In my resume above where I explained that mv from one file system to another, there is missing the fact that also the equivalence of touch to set the date/time stamps of the new file to those connected to the original file is needed.
Now owner of all files on the mounted NTFS file system is root (due to mount parameters). And adrian can not change the date/time (using touch or any other means) on a file in a directory that are both owned by root: permission error.
Thus the solution to mount with adrian as owner will help adrian, but not other users.
============
I always try to avoid non-Linux file systems as the plague.
I doubt this is Linux style. When you have a problem with your car, the repair shop also wants technical information as raw as possible, without anybody changing things in it or trying to stress a conclusion he/she may have jumped to.
Agreed. Sorry for my bad parlance. I just want to say that new user is still learning the way of expressing, or reporting problem to make it clearer and more straightforward (as original) to experienced users. For example, to learn the use of quote and / or code markup in a forum.
Oh yes, everything has it’s learning curve. Specially the CODE tags are not easy to find. Most often we send a PM to new people when we see they don’t know about it because it is not an obvious feature.
Thank you, to all.
One more question:
Can somebody tell me where can I get full documentation about fstab in order to understand this configuration file?