Author Topic: "Could not change permissions" message with Windows partition  (Read 1382 times)

Offline Go2doug

  • Jr. Member
  • **
  • Posts: 20
    • Doug Vitale Tech Blog
"Could not change permissions" message with Windows partition
« on: January 27, 2011, 12:02:33 PM »
I have PCLOS installed on the same drive as Windows Vista and Window XP NTFS partitions. When I move or copy files from PCLOS to the NTFS partitions, a message appears saying "Could not change permissions for /media/Vista-XP/.../file.abc". Then when I boot to Vista or XP, the file that I transferred from PCLOS is shared fully to the Everyone group, instead of inheriting the file permissions of the parent folder. The default file permissions in both my XP and Vista installations are:

HOME DIRECTORY:
HOSTNAME/Administrators - Full Control
HOSTNAME/Me - Full Control
SYSTEM - Full Control

OUTSIDE HOME:
HOSTNAME\Administrators - Full Control
HOSTNAME\Users - Read, Read and Execute, List Folder Contents
Authenticated Users - Modify, Read and Execute, List Folder Contents, Read, Write
SYSTEM - Full Control

This is a pain because after I move the files from Linux, I have to manually edit the file permissions in Windows to reflect those above. I don't recall having this issue with previous installations of PCLOS or other Linux distros.

I do have libntfs10, ntfs-3g, ntfs-config, and ntfsprogs installed. In the NTFS configuration manager, "Enable write support for internal device" is selected, and both the XP and Vista partitions are selected as writable.

Thanks for any help.

Offline cyrwyn

  • Hero Member
  • *****
  • Posts: 833
Re: "Could not change permissions" message with Windows partition
« Reply #1 on: January 27, 2011, 04:04:26 PM »
Windows file systems are incapable of permissions and many other things that -NIX filesystems can do.
Using Linux for over 18 years and still counting.

Offline nixer

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 587
Re: "Could not change permissions" message with Windows partition
« Reply #2 on: January 27, 2011, 04:33:36 PM »
I have been having this same problem and after reading your thread I thought I would give it a shot.  My searching found this:

http://www.pclinuxos.com/forum/index.php/topic,80224.0.html

To summarize, I added "cifs noperm" to the line in the etc/fstab file.  I unmounted and then remounted the partition and I saved a file to it from another ntfs partition across the network and I did not receive that dreaded message.  One person stated that adding this information to his fstab file did not do anything, but for me it did. 
Desktop:  AMD 3.6ghz X4, Gigabyte MB, 8GB ram, Multiple PCLOS's, 2.6.38.8-pclos3.pae.bfs
Server: Intel 3.4ghz X2, 4GB RAM, SATA, gnome2, *.pae.bfs, Headless, Servers: LAMP, FTP, Samba, Print, PXE, BT
HTPC: Phenom II X4 2.8ghz, 4GB Ram, 1TB SATA, PCLinuxOS-KDE, NVIDIA N220GT HDMI, *.pae.bfs

Offline nixer

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 587
Re: "Could not change permissions" message with Windows partition
« Reply #3 on: January 27, 2011, 05:38:25 PM »
ongoto, this is the entry in my fstab file but it still delivers the permissions error:
Quote
# Entry for /dev/sda10 :
UUID=C0FFCAB9BCE2AC97 /mnt/Data ntfs-3g user,exec,rw,noauto,nls=utf8,umask=000 0 0

However, this entry does not produce the error message:
Quote
# Entry for /dev/sda10 :
UUID=C0FFCAB9BCE2AC97 /mnt/Data ntfs-3g cifs noperm,defaults,umask=000 0 0

Is there anything wrong with using the second statement?  Or can something be altered in the first statement that can eliminate the permissions message?

Thanks, and I do not mean to hijack this thread but I'll bet that the original poster has a fstab entry similar to mine and thus could be corrected almost identically.
Desktop:  AMD 3.6ghz X4, Gigabyte MB, 8GB ram, Multiple PCLOS's, 2.6.38.8-pclos3.pae.bfs
Server: Intel 3.4ghz X2, 4GB RAM, SATA, gnome2, *.pae.bfs, Headless, Servers: LAMP, FTP, Samba, Print, PXE, BT
HTPC: Phenom II X4 2.8ghz, 4GB Ram, 1TB SATA, PCLinuxOS-KDE, NVIDIA N220GT HDMI, *.pae.bfs

Offline kjpetrie

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3997
Re: "Could not change permissions" message with Windows partition
« Reply #4 on: January 27, 2011, 05:52:34 PM »
noperms will stop the error message because Linux won't try to set the permissions anymore. If it doesn't try it won't fail.

Linux and Windows use different systems for permissions and don't understand each other's permissions.
-----------
KJP
-----------------------------------------------------------
PClos64 RC1 on Intel D945GCLF2 motherboard (Atom 330), 2GB DDR2 RAM, Maxtor STM325031, HL-DT-ST DVDRAM GSA-H42N, Amilo LSL 3220T monitor. Also Acer 5810TG (with custom kernel) and Asus eeePC 2G surf

Offline nixer

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 587
Re: "Could not change permissions" message with Windows partition
« Reply #5 on: January 27, 2011, 07:18:00 PM »
Quote
Where did you come across using cifs? just curious.

In the third post of this thread I linked to a thread in this forum board which linked to to other forum posts on other boards.  In one post, it mentioned the "cifs" part.  I tried it and it worked.

I am glad it worked but I am most concerned about whether or not it could be dangerous to the data on the ntfs partition.  I don't want to do anything that would jeopardize that.  I have always trusted the samba and ntfs-3g mounting process but when changing something just because it stops an error message and not really knowing why it does it or what the consequences are, well is is a concern.  Thanks for the information given in this thread.
Desktop:  AMD 3.6ghz X4, Gigabyte MB, 8GB ram, Multiple PCLOS's, 2.6.38.8-pclos3.pae.bfs
Server: Intel 3.4ghz X2, 4GB RAM, SATA, gnome2, *.pae.bfs, Headless, Servers: LAMP, FTP, Samba, Print, PXE, BT
HTPC: Phenom II X4 2.8ghz, 4GB Ram, 1TB SATA, PCLinuxOS-KDE, NVIDIA N220GT HDMI, *.pae.bfs

Offline Go2doug

  • Jr. Member
  • **
  • Posts: 20
    • Doug Vitale Tech Blog
Re: "Could not change permissions" message with Windows partition
« Reply #6 on: January 27, 2011, 09:02:54 PM »
noperms will stop the error message because Linux won't try to set the permissions anymore. If it doesn't try it won't fail.

Linux and Windows use different systems for permissions and don't understand each other's permissions.

I guess I always assumed that NTFS-3G could set NTFS permissions in addition to reading and writing to NTFS drives and partitions. I think I only recently noticed this permissions issue because Vista changes the icons of files that are shared to the Everyone group. Windows XP doesn't do this.

I edited the XP line in /etc/fstab with "cifs noperm" and the warning message that prompted this thread no longer appears. However, "cifs noperm" no longer appears in my fstab file, yet the warning message still doesn't show up. Very weird. Here it is as it stands now:

tmpfs   /dev/shm   tmpfs   defaults   0   0
#Entry for /dev/sda4 :
UUID=bea3d9ee-001d-4adb-9123-25cfd9edd599   /   ext4   defaults   1   1
#Entry for /dev/sda2 :
UUID=C41E62C91E62B458   /media/Windows\040Vista\040Home\040Premium   ntfs-3g   defaults,nosuid,nodev,locale=en_US.UTF-8   0   0
#Entry for /dev/sda3 :
UUID=C0B6A1A2B6A19A04   /media/Windows_XP_Professional   ntfs-3g   defaults,locale=en_US.UTF-8   0   0
none   /proc   proc   defaults   0   0
#Entry for /dev/sda1 :
UUID=af983ecd-5976-4995-9343-7ea163a2b2d9   swap   swap   defaults   0   0
none   /dev/pts   devpts   defaults   0   0


I know I added "cifs noperm" to the XP line (right before 'defaults') and saved the change. Where did it go? Oh well, the warning message is gone, so all's well that ends well.

It will still be a pain to manually configure the NTFS permission settings, but I found a way to do it quickly. Let's say you have a Windows folder, like C:\Pictures. You have some files in that folder that you created in Windows, and you have other files that you copied over from Linux. As discussed, the first set of files from Windows will have the default NTFS permissions of that folder, while the files transferred from Linux will have the Everyone - Full Control setting.

To configure all the files with the same NTFs permissions in one shot in Windows, you need to:

1. Right-click on the files' parent folder (in this case C:\Pictures), choose Properties. Go to the Security tab.
2. Click Advanced.
3. Click Edit.
4. Select "Replace all existing inheritable permissions on all descendants with inheritable permissions from this object".

Offline Bald Brick

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 6384
  • I'm going South
Re: "Could not change permissions" message with Windows partition
« Reply #7 on: January 28, 2011, 03:55:36 AM »
Windows handles file/folder names containing spaces well, but Linux hates it.  That might explain those \040's.  Underscores should be used instead of spaces.  If it were me, I'd replace that line with the one you had before without the cif.  

There are other posts about fstab being re-written but I don't know if it ever got solved.

Linux could handle file and folder names containing spaces years before Windows could. And Linux handles them at least as well. I have dozens of them and they've never given me any trouble, even if I sometimes have to insert the escape character \ before a space in a configuration file or at the command line.

It's when some of your file names have been created under Windows that the situation becomes messy. You could say that Linux just doesn't like Windows' habit of replacing the spaces with the escape sequence \040.
« Last Edit: January 28, 2011, 03:58:25 AM by Bald Brick »
Feed the trolls!
They need it!

AMD Athlon 7450 Dual-Core Processor, 7.80 GiB RAM, Nvidia GeForce GT 120/PCIe/SSE2, OpenGL/ES-version: 3.3 0 NVIDIA 295.40, SBx00 Azalia (Intel HDA) soundcard, ‎Logitech B500 webcam, SAA7146 DVB card, HDDs: Seagate 250824AS, Western Digital WD10EAVS-00D

Online pags

  • Hero Member
  • *****
  • Posts: 2519
  • Keep it clean.
Re: "Could not change permissions" message with Windows partition
« Reply #8 on: February 01, 2011, 11:16:26 AM »
Windows handles file/folder names containing spaces well, but Linux hates it.  That might explain those \040's.  Underscores should be used instead of spaces.  If it were me, I'd replace that line with the one you had before without the cif. 

There are other posts about fstab being re-written but I don't know if it ever got solved.

???
Hex 040 is <Space> in EBCDIC.  020 is ASCII.
I wonder why Windows would do such a conversion?
Weird.
...uhhh...
...let me check Unicode...

Online pags

  • Hero Member
  • *****
  • Posts: 2519
  • Keep it clean.
Re: "Could not change permissions" message with Windows partition
« Reply #9 on: February 01, 2011, 11:22:48 AM »
Nope.  Not Unicode.

What code page table (language settings) are you using in Windows?

Offline kjpetrie

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3997
Re: "Could not change permissions" message with Windows partition
« Reply #10 on: February 01, 2011, 11:32:37 AM »
040 = 0x20 = 32 in octal, hexadecimal and decimal, respectively.

They are different ways of writing the same number and interchangeable in most contexts.
-----------
KJP
-----------------------------------------------------------
PClos64 RC1 on Intel D945GCLF2 motherboard (Atom 330), 2GB DDR2 RAM, Maxtor STM325031, HL-DT-ST DVDRAM GSA-H42N, Amilo LSL 3220T monitor. Also Acer 5810TG (with custom kernel) and Asus eeePC 2G surf

Online pags

  • Hero Member
  • *****
  • Posts: 2519
  • Keep it clean.
Re: "Could not change permissions" message with Windows partition
« Reply #11 on: February 01, 2011, 11:36:20 AM »
040 = 0x20 = 32 in octal, hexadecimal and decimal, respectively.

They are different ways of writing the same number and interchangeable in most contexts.


Forgot about octal... :o

Still, weird behaviour, from Windows (as if anything other should be expected)  ::)

Online pags

  • Hero Member
  • *****
  • Posts: 2519
  • Keep it clean.
Re: "Could not change permissions" message with Windows partition
« Reply #12 on: February 01, 2011, 11:38:28 AM »
Go2doug,
  Would you be willing to change the volume labels of the Window's partitions (either from Linux, or their respective OS's) to something that doesn't contain any spaces, and then recreate the fstab?