[SOLVED] Error setting permissions when copy to a NTFS part

Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
P4NCH1

[SOLVED] Error setting permissions when copy to a NTFS part

Post by P4NCH1 »

Hi, i looked up pretty much in the inet for a solution for this, but was useless...

I had installed Linux Mint 16 XFCE to a netbook and mounted some partitions when installing, this is my fstab:

Code: Select all

# / was on /dev/sda7 during installation
UUID=b859ed3c-35e5-4ce3-9bf8-fd56f03696e2 /               ext4    errors=remount-ro 0       1
# /media/data was on /dev/sda6 during installation
UUID=73DBE0A32BC5C914 /media/data     ntfs    defaults,umask=007,gid=46 0       0
# /media/win was on /dev/sda2 during installation
UUID=8C2E9C652E9C4A5A /media/win      ntfs    defaults,umask=007,gid=46 0       0
# swap was on /dev/sda5 during installation
UUID=1aa5471a-390b-49a6-9463-c5ee4a2a2a28 none            swap    sw              0       0
but when I try to copy a file to any of the NTFS partitions, I get this error:

Image

So, I saw my fstab in my PC (with Linux Mint 15 XFCE) and it has the same options in the ntfs partitions (defaults,umask=007,gid=46)... I don't know what to do :/
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
altair4
Level 20
Level 20
Posts: 11447
Joined: Tue Feb 03, 2009 10:27 am

Re: Error setting permissions when copy to a NTFS partition

Post by altair4 »

UUID=73DBE0A32BC5C914 /media/data ntfs defaults,umask=007,gid=46 0 0
That line will mount the partition to /media/data with permissions of 770 with only root and members of the plugdev ( 46 ) group granted write access. So the question is are you a member of the plugdev group?

Run the following command to find out:

Code: Select all

id
If you are not add yourself to the group:

Code: Select all

sudo gpasswd -a altair4 plugdev
Change altair4 to your own user name.

Then logoff and login again for the group membership change to take affect.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
P4NCH1

Re: Error setting permissions when copy to a NTFS partition

Post by P4NCH1 »

yeah, I already did that of add my user to the plugdev group (I saw it in the inet):

Code: Select all

zanahoria@blackpawn ~ $ id
uid=1000(zanahoria) gid=1000(zanahoria) groups=1000(zanahoria),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),112(lpadmin),119(sambashare)
So, one more thing (strange thing...): I can create folders and documents in that partitions, but still cant copy anything to them without getting that error ("Error setting permissions")
altair4
Level 20
Level 20
Posts: 11447
Joined: Tue Feb 03, 2009 10:27 am

Re: Error setting permissions when copy to a NTFS partition

Post by altair4 »

So, one more thing (strange thing...): I can create folders and documents in that partitions, but still cant copy anything to them without getting that error ("Error setting permissions")
You are right that is strange. I have no idea actually but you notice that the error message isn't "permission denied" it's "error setting permissions".

Are you doing a copy to the partition as a user or through an application. If the application sends a file to that partition and then attempts to change permissions of that file it will fail since you can't change Linux permissions of a specific file on an NTFS partition.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
P4NCH1

Re: Error setting permissions when copy to a NTFS partition

Post by P4NCH1 »

I tryed to copy in a terminal and it works:

Code: Select all

zanahoria@blackpawn ~ $ mkdir -v blah
mkdir: created directory ‘blah’
zanahoria@blackpawn ~ $ cd blah/
zanahoria@blackpawn ~/blah $ echo "hola" > hola
zanahoria@blackpawn ~/blah $ ls
hola
zanahoria@blackpawn ~/blah $ cd ..
zanahoria@blackpawn ~ $ cp -v -R blah/ /media/data/
‘blah/’ -> ‘/media/data/blah’
‘blah/hola’ -> ‘/media/data/blah/hola’
And again, I tryed to copy that folder to /media/data with the file manager and: the error. So, the problem must be with Thunar... Do you recomend me to remove it and install again?

_________________________________
EDIT:

I removed and installed Thunar

Code: Select all

zanahoria@blackpawn ~ $ sudo apt-get remove thunar
[sudo] password for zanahoria: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
  mint-meta-xfce thunar thunar-archive-plugin thunar-media-tags-plugin
  thunar-volman xfce4-places-plugin
0 upgraded, 0 newly installed, 6 to remove and 13 not upgraded.
After this operation, 3.797 kB disk space will be freed.
Do you want to continue [Y/n]? 
(Reading database ... 149027 files and directories currently installed.)
Removing mint-meta-xfce ...
Removing xfce4-places-plugin ...
Removing thunar-volman ...
Removing thunar-archive-plugin ...
Removing thunar-media-tags-plugin ...
Removing thunar ...
Processing triggers for man-db ...
Processing triggers for desktop-file-utils ...
Processing triggers for gnome-menus ...
Processing triggers for bamfdaemon ...
Rebuilding /usr/share/applications/bamf-2.index...
Processing triggers for mime-support ...
Processing triggers for hicolor-icon-theme ...
zanahoria@blackpawn ~ $ sudo apt-get install mint-meta-xfce thunar thunar-archive-plugin thunar-media-tags-plugin
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  thunar-volman xfce4-places-plugin
The following NEW packages will be installed:
  mint-meta-xfce thunar thunar-archive-plugin thunar-media-tags-plugin
  thunar-volman xfce4-places-plugin
0 upgraded, 6 newly installed, 0 to remove and 13 not upgraded.
Need to get 640 kB of archives.
After this operation, 3.797 kB of additional disk space will be used.
Do you want to continue [Y/n]? 
Get:1 http://packages.linuxmint.com/ petra/main mint-meta-xfce all 2013.12.02 [3.324 B]
Get:2 http://archive.ubuntu.com/ubuntu/ saucy/universe thunar i386 1.6.3-1ubuntu1 [322 kB]
Get:3 http://archive.ubuntu.com/ubuntu/ saucy/universe thunar-archive-plugin i386 0.3.1-2 [42,2 kB]
Get:4 http://archive.ubuntu.com/ubuntu/ saucy/universe thunar-media-tags-plugin i386 0.2.1-1 [63,1 kB]
Get:5 http://archive.ubuntu.com/ubuntu/ saucy/universe thunar-volman i386 0.8.0-2 [138 kB]
Get:6 http://archive.ubuntu.com/ubuntu/ saucy/universe xfce4-places-plugin i386 1.5.0-1 [71,1 kB]
Fetched 640 kB in 13s (47,2 kB/s)                                              
Selecting previously unselected package thunar.
(Reading database ... 148788 files and directories currently installed.)
Unpacking thunar (from .../thunar_1.6.3-1ubuntu1_i386.deb) ...
Selecting previously unselected package thunar-archive-plugin.
Unpacking thunar-archive-plugin (from .../thunar-archive-plugin_0.3.1-2_i386.deb) ...
Selecting previously unselected package thunar-media-tags-plugin.
Unpacking thunar-media-tags-plugin (from .../thunar-media-tags-plugin_0.2.1-1_i386.deb) ...
Selecting previously unselected package thunar-volman.
Unpacking thunar-volman (from .../thunar-volman_0.8.0-2_i386.deb) ...
Selecting previously unselected package xfce4-places-plugin.
Unpacking xfce4-places-plugin (from .../xfce4-places-plugin_1.5.0-1_i386.deb) ...
Selecting previously unselected package mint-meta-xfce.
Unpacking mint-meta-xfce (from .../mint-meta-xfce_2013.12.02_all.deb) ...
Processing triggers for desktop-file-utils ...
Processing triggers for gnome-menus ...
Processing triggers for bamfdaemon ...
Rebuilding /usr/share/applications/bamf-2.index...
Processing triggers for mime-support ...
Processing triggers for man-db ...
Processing triggers for hicolor-icon-theme ...
Setting up thunar (1.6.3-1ubuntu1) ...
Setting up thunar-archive-plugin (0.3.1-2) ...
Setting up thunar-media-tags-plugin (0.2.1-1) ...
Setting up thunar-volman (0.8.0-2) ...
Setting up xfce4-places-plugin (1.5.0-1) ...
Setting up mint-meta-xfce (2013.12.02) ...
zanahoria@blackpawn ~ $
but still got the same error
altair4
Level 20
Level 20
Posts: 11447
Joined: Tue Feb 03, 2009 10:27 am

Re: Error setting permissions when copy to a NTFS partition

Post by altair4 »

This is a new one for me. If it also happened in the terminal I would think you don't have ntfs-3g installed so that's not it.

The only thing I can think of is gvfs. You might want to reinstall the following gvfs packages:

Code: Select all

gvfs-backends 
gvfs-bin
gvfs-common
gvfs-fuse
But I'll be honest with you it's just a guess.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
P4NCH1

Re: Error setting permissions when copy to a NTFS partition

Post by P4NCH1 »

I think you misunderstood me. I said:
P4NCH1 wrote: I tryed to copy in a terminal and it works (...)
But still, I check if I have nfst-3g installed and it seems to be:

Code: Select all

zanahoria@blackpawn ~ $ aptitude search ntfs-3g
v   libntfs-3g841                   -                                           
i   ntfs-3g                         - read/write NTFS driver for FUSE           
p   ntfs-3g-dbg                     - read/write NTFS driver for FUSE (debug)   
p   ntfs-3g-dev                     - read/write NTFS driver for FUSE (developme
and then I reinstalled the packages you said:

Code: Select all

zanahoria@blackpawn ~ $ sudo apt-get remove --purge gvfs-backends gvfs-bin gvfs-common gvfs-fuse 
[sudo] password for zanahoria: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
  gvfs* gvfs-backends* gvfs-bin* gvfs-common* gvfs-daemons* gvfs-fuse*
  gvfs-libs*
0 upgraded, 0 newly installed, 7 to remove and 13 not upgraded.
After this operation, 4.322 kB disk space will be freed.
Do you want to continue [Y/n]? 
(Reading database ... 149027 files and directories currently installed.)
Removing gvfs-fuse ...
Removing gvfs-backends ...
Removing gvfs:i386 ...
Removing gvfs-bin ...
Purging configuration files for gvfs-bin ...
Removing gvfs-daemons ...
Removing gvfs-libs:i386 ...
Removing gvfs-common ...
Processing triggers for gconf2 ...
Processing triggers for libglib2.0-0:i386 ...
Processing triggers for man-db ...
zanahoria@blackpawn ~ $ sudo apt-get install gvfs-backends gvfs-bin gvfs-common gvfs-fuse 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  gvfs gvfs-daemons gvfs-libs
Suggested packages:
  gvfs-backends-goa
The following NEW packages will be installed:
  gvfs gvfs-backends gvfs-bin gvfs-common gvfs-daemons gvfs-fuse gvfs-libs
0 upgraded, 7 newly installed, 0 to remove and 13 not upgraded.
Need to get 658 kB of archives.
After this operation, 4.322 kB of additional disk space will be used.
Do you want to continue [Y/n]? 
Get:1 http://archive.ubuntu.com/ubuntu/ saucy/main gvfs-common all 1.18.2-0ubuntu1 [40,3 kB]
Get:2 http://archive.ubuntu.com/ubuntu/ saucy/main gvfs-libs i386 1.18.2-0ubuntu1 [102 kB]
Get:3 http://archive.ubuntu.com/ubuntu/ saucy/main gvfs-daemons i386 1.18.2-0ubuntu1 [107 kB]
Get:4 http://archive.ubuntu.com/ubuntu/ saucy/main gvfs i386 1.18.2-0ubuntu1 [90,0 kB]
Get:5 http://archive.ubuntu.com/ubuntu/ saucy/main gvfs-backends i386 1.18.2-0ubuntu1 [258 kB]                              
Get:6 http://archive.ubuntu.com/ubuntu/ saucy/main gvfs-bin i386 1.18.2-0ubuntu1 [48,3 kB]                                  
Get:7 http://archive.ubuntu.com/ubuntu/ saucy/main gvfs-fuse i386 1.18.2-0ubuntu1 [13,2 kB]                                 
Fetched 658 kB in 14s (45,5 kB/s)                                                                                           
Selecting previously unselected package gvfs-common.
(Reading database ... 148862 files and directories currently installed.)
Unpacking gvfs-common (from .../gvfs-common_1.18.2-0ubuntu1_all.deb) ...
Selecting previously unselected package gvfs-libs:i386.
Unpacking gvfs-libs:i386 (from .../gvfs-libs_1.18.2-0ubuntu1_i386.deb) ...
Selecting previously unselected package gvfs-daemons.
Unpacking gvfs-daemons (from .../gvfs-daemons_1.18.2-0ubuntu1_i386.deb) ...
Selecting previously unselected package gvfs:i386.
Unpacking gvfs:i386 (from .../gvfs_1.18.2-0ubuntu1_i386.deb) ...
Selecting previously unselected package gvfs-backends.
Unpacking gvfs-backends (from .../gvfs-backends_1.18.2-0ubuntu1_i386.deb) ...
Selecting previously unselected package gvfs-bin.
Unpacking gvfs-bin (from .../gvfs-bin_1.18.2-0ubuntu1_i386.deb) ...
Selecting previously unselected package gvfs-fuse.
Unpacking gvfs-fuse (from .../gvfs-fuse_1.18.2-0ubuntu1_i386.deb) ...
Processing triggers for man-db ...
Processing triggers for libglib2.0-0:i386 ...
Processing triggers for gconf2 ...
Setting up gvfs-common (1.18.2-0ubuntu1) ...
Setting up gvfs-libs:i386 (1.18.2-0ubuntu1) ...
Setting up gvfs-daemons (1.18.2-0ubuntu1) ...
Setting up gvfs:i386 (1.18.2-0ubuntu1) ...
Setting up gvfs-backends (1.18.2-0ubuntu1) ...
Setting up gvfs-bin (1.18.2-0ubuntu1) ...
Setting up gvfs-fuse (1.18.2-0ubuntu1) ...
zanahoria@blackpawn ~ $ 
No luck. Same error trying to copy to a NTFS filesys with Thunar T_T

_________________
EDIT:

To keep going with this, after checked the md5sum of my downloaded ISO, I installed Linux Mint 16 Petra from the same pendrive to my PC and I get the same error ("Error setting permissions") when I want to copy a file to a NFST partition with Thunar (the file manager)... Anyone else have the same problem?
Just in case, later I'll try to burn the ISO to a DVD or create a new bootable usb and install again the OS.
pazuzuthewise

Re: Error setting permissions when copy to a NTFS partition

Post by pazuzuthewise »

I don't believe this is a thunar error, maybe it has to do with the mounting options from fstab (the error message appears only when copying to an ntfs partition mounted automatically at boot from fstab; I have another ntfs partition that is mounted only upon access, and there are no problems with it). My reason is that I've noticed other strange behavior on that partition. The owner of all the files is root, but I can, as a normal user create, modify, delete. Also, the deleted files are not moved to the Trash (on the mounted-upon-access ntfs partition this works fine, and the owner is my username).

This is my original fstab:

Code: Select all

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda5 during installation
UUID=67e9d480-17f8-4781-90e0-e6882cad8e1b /               ext4    errors=remount-ro 0       1
# /mnt/data was on /dev/sda6 during installation
UUID=0C009FC87F74C2EB /mnt/data       ntfs    defaults,umask=007,gid=46 0       0
# swap was on /dev/sda7 during installation
UUID=4cbce625-0aac-48da-b1b9-9506c0bde2bd none            swap    sw              0       0
I've changed the line of the ntfs partition into this:

Code: Select all

UUID=0C009FC87F74C2EB /mnt/data       ntfs    defaults,umask=007,uid=1000,gid=1000 0       0
Now all works as it should: the annoying error message while copying on it doesn't appear anymore, all files belong to me and deleted files go to the Trash.
pazuzuthewise

Re: Error setting permissions when copy to a NTFS partition

Post by pazuzuthewise »

Opened a bug report on this issue at: https://bugs.launchpad.net/linuxmint/+bug/1289127
altair4
Level 20
Level 20
Posts: 11447
Joined: Tue Feb 03, 2009 10:27 am

Re: Error setting permissions when copy to a NTFS partition

Post by altair4 »

This has turned out to be an interesting bug.

Some observations:

[1] This isn't a Mint bug since it happens to Xubuntu 13.10 as well.

[2] Need to do more testing but it does indeed seem to be a Thunar bug since:

*** I can do a manual copy to the mounted partition with no such error. You should be able to verify this yourself:

Code: Select all

cp /path/to/your/file /media/data
*** It doesn't happen when using Nautilus in Ubuntu 13.10. Haven't tried it with Nemo in Mint16 yet.

[3] It seems to happen to anyone who is not the owner of the mounted partition.
UUID=73DBE0A32BC5C914 /media/data ntfs defaults,umask=007,gid=46 0 0
With that line the owner of the mounted partition is root and a root instance of thunar ( as in gksu thunar ) does not get the error message on a copy. pazuzuthewise's fix of taking ownership of the mounted partition works because now the owner of the process and the owner of the partition match. ( BTW, it's not that you can't send anything to the trash it's that trash is owned by root and you don't have access to root's trash. Taking ownership of the partition "uid=1000" makes you the owner of the trash).

This is still a problem for multi-user installs however since the original fstab line allows all local users who are members of the plugdev group write access which they do in fact have but if they do not want error messages they need to use another file manager.

This is going to be a tough bug since it's relatively obscure ( XFCE users are in the minority ) and support ends in about 30 days. So we need to see if the bug persists in Xubuntu 14.04.

EDIT: Found a Thunar Bug Report that describes the symptoms: https://bugzilla.xfce.org/show_bug.cgi?id=10502
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
P4NCH1

Re: Error setting permissions when copy to a NTFS partition

Post by P4NCH1 »

Ok, so, the only thing we can do is wait until Xubuntu/Thunar fix the problem, right?
And, if is a Thunar's problem: Changing the file manager we can solve it temporary... What file manager can we use instead?
altair4
Level 20
Level 20
Posts: 11447
Joined: Tue Feb 03, 2009 10:27 am

Re: Error setting permissions when copy to a NTFS partition

Post by altair4 »

If you are the only user of the system pazuzuthewise's fix will work:
UUID=73DBE0A32BC5C914 /media/data ntfs defaults,umask=007,uid=1000,gid=46 0 0
Just unmount the partition:

Code: Select all

sudo umount /media/data
Add the uid=1000 option to the line in fstab

Then remount with this command:

Code: Select all

sudo mount -a
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
ogghi

Re: Error setting permissions when copy to a NTFS partition

Post by ogghi »

Perfect, this fixed the issue I had here!
Thanks!
Locked

Return to “Xfce”