Permission troubles copying files to NTFS

Bug #195216 reported by Rafael Belmonte
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
KDE Base
Fix Released
Medium
dolphin (Ubuntu)
Invalid
Undecided
Unassigned
kdebase (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Using Kubuntu Hardy Heron + KDE 3.5.9
Permissions on NTFS partitions are not well configured.
Steps:
1) I install Kubuntu Hardy from Desktop CD.
2) During installation i choose manual partitioning and i configure a partition sdb1 to be used as NTFS and mounted on /media/datos.
3) Kubuntu is installed and running.
4) I create a file in my HOME directory.
5) I copy the created file and I paste it on a folder inside ntfs drive.
What happens?
A window is displayed with title "Information - D3lphin" that says:
"Permissions of /home/rafael/Aplicaciones/jesuuss.txt could not be changed"
I click on Ok button and i can check that the file has been copied.
But think that if you copy one hundred files, you obtain one hundred windows with this warning.

The fix of this is easy, it is necessary to review default parameters in /etc/fstab for ntfs partitions.

I attach a capture of the window, due to a bug in language-selector-qt i cannot capture a window fully in English, but i have written the content in the report.

Revision history for this message
Rafael Belmonte (eaglescreen) wrote :
Revision history for this message
Rafael Belmonte (eaglescreen) wrote :

I have tested that if I use these options for ntfs partitions in /etc/fstab this problem is not produced:
rw,user,locale=es_ES.UTF-8 0 0

Revision history for this message
Mauricio Peñaloza S. (elkan76) wrote :

Hi, Is your directory /media/datos for your personal use or more users.
If it's for personal use, then open a terminal and do the following:
1) sudo chown -R YOUR_USER /media/datos
Here we change the owner of the directory to your user (replace YOUR_USER by your user's name).

If it's for communitary use, open a terminal an do the following:
1) sudo chmod -R 777 /media/datos
Here we change the permissions to access everybody.

I hope that i can help you.
Otherwise look about permissions on the ubuntu site of your localization (ubuntu-es, ubuntu-cl, ubuntu-ar).

Revision history for this message
Rafael Belmonte (eaglescreen) wrote :

Thanks, but I already known these commands, I think this issue shouldn't appear in a Kubuntu desktop.
Why it is necessary doing that only for ntfs partitions?
I think Kubuntu use ntfs-3g for mounting them, this permit any user change their content is not? Then why is necessary to use chmod and chown, changing mounting options is enough to fix this warning.

Revision history for this message
Jonathan Thomas (echidnaman) wrote :

Is this still an issue in Intrepid?

Revision history for this message
Rafael Belmonte (eaglescreen) wrote :

Yes, the same happens in Kubuntu 8.10 Intrepid ibex.

Revision history for this message
Jonathan Thomas (echidnaman) wrote :

I would guess that ubiquity isn't setting ntfs permissions correctly? KDE shouldn't have anything to do with it, and if its not an ubiquity problem then maybe the ubiquity devs can throw this in the right direction

Changed in kdebase:
status: Incomplete → New
Revision history for this message
Rafael Belmonte (eaglescreen) wrote :

This issue is still present in jaunty.

Revision history for this message
Chris (c-ammeraal-deactivatedaccount) wrote :

Funny thing is, this happens even when you copy / move from one NTFS partition to another. Using Kubuntu 9.04.
The # line below is the old setting. I installed a fresh version of Kubuntu, and selected to mount /media/docs during installation in the partitioning section. The line below solves the problem for me, but changes permissions and group ownership to 777 and root respectively (which isn't a problem for me).
But i agree: whether the error message makes sense or not, it shouldn't pop up a hundred times.

# UUID=06C759042738AD2E /media/docs ntfs defaults,nls=utf8,umask=007,gid=46 0 1
UUID=06C759042738AD2E /media/docs ntfs-3g defaults,users 0 0

Revision history for this message
In , Acristoffers (acristoffers) wrote :

Version: 1.3 (using KDE 4.3.1)
OS: Linux
Installed from: Ubuntu Packages

When I copying or moving files from my EXT4 FS to a NTFS or FAT(32) FS and Dolphin (also happens with Konqueror) can't change files permissions it shows a Dialog to tell me it.

But this Dialog does not have an option such as "Don't show this message again", so if it cannot change the permission for 100 files, it will show 100 Dialogs.

It would be good if:

1) there was an option "Don't show this again"

2) all the errors were shown only once, when the copy/move has finished (as a big list of all errors)

* Sorry for putting it in Dolphin section, I don't know where is the best place...

Revision history for this message
In , Pbakhuis (pbakhuis) wrote :

Confirming this happens in openSUSE 11.2 RC2 as well.
Dolphin 4.3.1-5.6.3.
Endless flood of error dialogs (as soon as you open one, the next pops up).
Waiting for the entire copy operating to finish and clicking ok (the only option) end it.

This really should be done with a checkbox for "Don't show me this error again" or a button Ok to all.. or via an error without a dialog.

Revision history for this message
In , Getaceres-h (getaceres-h) wrote :

This is a very annoying bug because the dialog is shown for every file that is copied and it blocks Dolphin.

Some months ago I tried to introduce to Linux to my brother and I installed it Kubuntu Jaunty. He liked the look of KDE in general but he usually copies a lot of files from the filesystem to his backup partition and USB drives. Using it for a week was enough for him to ask me to remove the message and I couldn't do it. I had to install Nautilus and put an icon in his desktop. Now, Nautilus does not integrate with KDE at all and it tries to open files with the GNOME applications instead of the KDE ones so, explaining him why he had to use two different file managers (one to browse and one to copy) increased his "Linux sucks" impression.

Using plasma notification or a "Don't show again" or "Ignore all" option would be a good solution but blocking Dolphin for such a stupid message is not the best solution, I think.

Revision history for this message
In , Acristoffers (acristoffers) wrote :

It could just show a message in the status bar, like when it cannot mount a partition...

Revision history for this message
In , Doug Brunner (madengineer10) wrote :

It appears that part of the underlying problem is with detecting whether a file system supports the notion of permissions. For me (using KDE 4.3.2), the dialog does not show up when copying to a VFAT filesystem, but it does when copying to NTFS. I traced it by making each instance of the string "Could not change permissions" distinctive; it turns out that the dialog originates on lines 276-277 of file_unix.cpp in kioslave:

           if ( mp && mp->testFileSystemFlag( KMountPoint::SupportsChmod ) )
               warning(i18n("Could not change permissions for\n%1", dest));

I then went to look at KMountPoint::testFileSystemFlag (in kio, in the file kmountpoint.cpp), and found that it has a list of filesystem types, and if the filesystem is one of them, it sets a variable called isMsDos to true. If isMsDos is true, ::SupportsChmod returns false. Unfortunately, just detecting the filesystem type doesn't help here since NTFS-3g is a FUSE driver and consequently shows a filesystem type of fuseblk, which could include filesystems other than NTFS. Perhaps a better way to go would be to do a quick series of tests on a filesystem that's just been opened, and then store those results? This would make the system immune to problems when new filesystem types are added.

Revision history for this message
In , David Faure (faure) wrote :

Good analysis, thanks!

Doing tests sounds slow and complicated, how about we hide this warning for all fuseblk filesystems? I don't think it is actually that useful, to the point where it would be a problem to miss the warning in cases where the filesystem actually supports chmod?

Revision history for this message
In , Doug Brunner (madengineer10) wrote :

That seems reasonable, as long as KDE still tries to do the chmod (for the benefit of fuse filesystems that do support chmod, chown, etc.), but fails silently in the case of filesystems that don't support it.

The list of "no warnings" filesystems should probably include a few different variants actually; according to https://bugs.launchpad.net/ubuntu/+source/nautilus/+bug/92099, an ntfs-3g filesystem can show up as fuse, fuseblk, fuse.ntfs-3g, or fuseblk.ntfs-3g. Future kernels will probably be moving towards showing the .ntfs-3g subtype. Actually, when I mount an sshfs, it shows up as fuse.sshfs, so there is some support for showing subtypes in /etc/mtab and /proc/mounts already.

Montel Edwards (montel)
affects: ubiquity (Ubuntu) → ntfs-3g (Ubuntu)
Revision history for this message
In , Dario Andres (andresbajotierra) wrote :

Bug 221192 contains more useful information too.

Revision history for this message
In , Dario Andres (andresbajotierra) wrote :

*** Bug 221192 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Dario Andres (andresbajotierra) wrote :

@Peter: could something be done on Dolphin level ?

Revision history for this message
In , Dario Andres (andresbajotierra) wrote :

*** Bug 179970 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Peter-penz19 (peter-penz19) wrote :

@Dario: no, on Dolphin level nothing can be done here

Revision history for this message
In , Frank78ac (frank78ac) wrote :

*** Bug 223068 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Frank78ac (frank78ac) wrote :

*** Bug 230913 has been marked as a duplicate of this bug. ***

Revision history for this message
skybon (skybon-deactivatedaccount-deactivatedaccount) wrote :

Please check if this bug is present in Lucid.

Changed in ntfs-3g (Ubuntu):
status: New → Incomplete
Revision history for this message
Rafael Belmonte (eaglescreen) wrote :

Yes this is still in lucid, this could be focused as a KDE4 issue rather than a ntfs-3g issue, Dolphin should warn user in a non-intrusive message to avoid the user need to close hundreds of warning windows if he is copying hundreds of files.

Changed in ntfs-3g (Ubuntu):
status: Incomplete → Confirmed
status: Confirmed → New
Revision history for this message
amichair (amichai2) wrote :

This indeed happens to me in Lucid too, however I noticed that if I close the messagebox while copying many files, a new one pops up for the next file until they're all done, however if I leave the messagebox alone (do not dismiss it but just move the window out of the way), then no new messages pop up for the other files - I can wait for all files to complete copying, then dismiss the first messagebox, and thus even for hundreds of files there is only a single messagebox shown to dismiss. Still annoying, but it's a workaround, fwiw.

Revision history for this message
Jean-Pierre (jean-pierre-andre) wrote :

When setting partial ownership/permission parameters (such as forcing a gid without defining a uid), you are bound to have problems because the rights cannot be evaluated properly.
Do not forget that even on ntfs (unless you use an old ntfs-3g version), you can use normal Linux permissions. This however requires some effort, and reading the manual may be useful.

Revision history for this message
In , ghomem (gustavo) wrote :
Revision history for this message
In , Frank78ac (frank78ac) wrote :

*** Bug 259124 has been marked as a duplicate of this bug. ***

summary: - Permission troubles copying file to NTFS
+ Permission troubles copying files to NTFS
Changed in dolphin:
importance: Unknown → Medium
status: Unknown → New
Revision history for this message
In , Frank78ac (frank78ac) wrote :

*** Bug 282483 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Rafael Belmonte (eaglescreen) wrote :

*** This bug has been confirmed by popular vote. ***

Changed in dolphin:
status: New → Invalid
affects: dolphin → kde-baseapps
affects: ntfs-3g (Ubuntu) → kdebase (Ubuntu)
Changed in kdebase (Ubuntu):
status: New → Confirmed
Changed in kde-baseapps:
importance: Medium → Unknown
status: Invalid → Unknown
Changed in kde-baseapps:
importance: Unknown → Medium
status: Unknown → Confirmed
Revision history for this message
In , Frank78ac (frank78ac) wrote :

*** Bug 282634 has been marked as a duplicate of this bug. ***

Revision history for this message
Harald Sitter (apachelogger) wrote :

Closing in favor of upstream report, please refer there for updates.

Changed in dolphin (Ubuntu):
status: New → Invalid
Changed in kdebase (Ubuntu):
status: Confirmed → Invalid
Revision history for this message
In , Doktor5000 (doktor5000) wrote :

Ping?
FWIW, is it really that difficult to hide this message?

Revision history for this message
In , Aldoo (aldo-public) wrote :

Just had to deal with an endless series of such dialogs...
... then I remembered I've been seeing this behavior for ages and wondered why it was still here.

Anyway, +20 votes for this bug.

Revision history for this message
In , Doktor5000 (doktor5000) wrote :

(In reply to comment #20)
> Just had to deal with an endless series of such dialogs...

FWIW, just leave the first instance of the dialog open, let the copy process finish, and then click it away. If you do this while the copy process is still underway, then you'll get one dialog for each file until the process is finished.

Revision history for this message
In , gurpal2000 (g-9hn) wrote :

So this IS a bug. I have a synology NAS with a shared folder mounted via Gigolo on KDE. Yes Gigolo because smb4k isn't fit for purpose (another story). Anyway, if you use the CMD line to copy a file to the .gvfs/shareblah folder there's no prompt. It's only the Dolphin GUI that has this message. So why is there no error message on the console vs Dolphin ???

Revision history for this message
In , Doktor5000 (doktor5000) wrote :

Any progress on this one? This is happening since three years, easy fixes and workarounds are available, and this problem happens very often and is a big usability blocker, and very visible to users.

Please fix.

Revision history for this message
In , David Faure (faure) wrote :

Git commit 51c00963ce4d27b016cf11f71a96dea7a9da02af by David Faure.
Committed on 20/08/2012 at 20:51.
Pushed by dfaure into branch 'KDE/4.9'.

NTFS doesn't support chmod, so ignore chmod errors when copying files.

FUSE doesn't make it easy to detect NTFS mounts, though...
In this code we have to hardcode "fuseblk" and hope that more recent versions
of FUSE indeed show "fuseblk.ntfs-3g" instead, as a bug report suggested.

But even worse: I want to replace this code with KFileSystemType which
uses statvfs(), which is much faster and less code, but on linux that method
returns the same number (FUSE_SUPER_MAGIC, 0x65735546) for all fuse filesystems :(

Also add SMB/CIFS mounts to the list of filsystems "made by microsoft and therefore
doesn't support chown, chmod, utime, nor proper symlinks".

FIXED-IN: 4.9.1

M +6 -1 kdecore/io/kmountpoint.cpp

http://commits.kde.org/kdelibs/51c00963ce4d27b016cf11f71a96dea7a9da02af

Changed in kde-baseapps:
status: Confirmed → Fix Released
Revision history for this message
In , Apcomptec (apcomptec) wrote :

Hi. Recently I got this error with KDE 4.12.5

Revision history for this message
In , Apcomptec (apcomptec) wrote :

Confirmed to KDE 4.13.3

Revision history for this message
In , darthxelam (darth-xelam) wrote :

confirmed with 4.14.2

Revision history for this message
In , Unsuspicious-fakename+kdebugs (unsuspicious-fakename+kdebugs) wrote :

Problem still exists in plasma 5.3.2 with ntsf as well as fat32
( tested with ssh network mounts in dolphin 15.04 )

Revision history for this message
In , Apcomptec (apcomptec) wrote :

Confirmed for KDE 4.14.9

Revision history for this message
In , Davide-d (davide-d) wrote :

*** Bug 351545 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Heinz Werner Kramski (kramski) wrote :

Problem still exists in Plasma 5.5.5-1 (Dolphin 15.12.2) on CIFS mount (Samba 4.3.5-1) on Arch.

Revision history for this message
In , GOo (goo) wrote :

The same problem still persits also when copying files to a remote SFTP folder with Plasma 5.9 / Dolphin 17.03.70.

Revision history for this message
In , Daniel Mensinger (dmense) wrote :

This issue still exists on Plasma 5.11.5 / KIO 5.42.0 (Arch Linux) when copying files from my local btrfs partition to my CIFS mounted FritzBox NAS storage (using krusader).

This bug only occurs with this specific CIFS mount. I could not reproduce it with other SAMBA servers.

https://imgur.com/a/aCJYH

The relevant fstab line:
//192.168.1.1/##### /mnt/fritzbox cifs nofail,users,username=###,password=###,vers=1.0,x-systemd.automount 0 0

Please reopen this bug.

Is this warning even necessary/useful?

It is very probable that the user is spammed with this message for every single file that he copies. I cannot think of a scenario where a directory is copied and chmod/chown fails (and there is a legitimate issue) only for a select few files.

In the current state, it is easier to open a terminal and kill the file manager than to click through the thousands of warnings until you can reach the close button of the file manager.

A much better solution would be to show all errors once in a dialog when all files have been copied, or to open a dialog for the first error and then append all other errors to it.

Revision history for this message
In , David Faure (faure) wrote :

Yes, regression during recent refactoring. https://phabricator.kde.org/D10358 is about to fix it.

Revision history for this message
In , Nate-b (nate-b) wrote :

*** Bug 196042 has been marked as a duplicate of this bug. ***

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.