Change Hard Drive Permissions

Hello Everyone,

I have 2 Hard Disks in my system. One is formatted as NTFS. The other is part NTFS and part linux.
I cannot change permissions on my NTFS partitions even when logged in as root. Trying to do so stalls the process and reinitialization of the change permission process does not happen.

Any advice.

Thanks
Nittin

It could be that the ntfs is dirty. Try to reboot in windows and perform a scandisk from there letting it to correct file system errors

After u do that i suggest u u se ntfs-config to change parmissions on ntfs partitions.Its very easy to use.
From yast install the package ntfs-config and the run

sudo ntfs-config 

From the configuration tool that will pop-up u will be able to manipulate your ntfs drives

Just a small caveat on ntfs-config: it’s the ants pants for internal drives. It creates entries in fstab.
It’s not so good for external drives because entries in fstab for drives that don’t exist (like a switched off usb ntfs drive) will stop the boot process.

Give a try to scandisk before attempting any other action. Usually it is due to an incorrect file system structure. The other tools like ntfs-config work assuming that the file system organization is correct.

Hmm…, maybe here is the answer. I hope it works for you.
Good luck.

I don’t think it is the same problem. The other user was not able to write the ntfs partition while the actual user cannot change the permissions. So i suspect that something is wrong in file system. So i have to insist: be sure that the volume is clean and let windows performs its checks. Then if the problem persists we have to explore other roads. So i ‘pray’ the user to give it a try and let us know what happens

Hi Eveyone,

Thanks for advice. However even after scanning and formatting the ddrives i am unable t change the permissions.

Nittin:?

Maybe it’s time for some diagnostics. PLease open a console/terminal, enter su to get rootly powers, then enter the diagnostic commands below. They’ll create a text response in the console which you can block out with your mouse, right click – copy, and paste the entire console session back here. Here are the commands:

cat /etc/fstab
rpm -qa ntfs-3g
rpm -qa ntfs-config
cat /etc/SuSE-release
fdisk -l | grep NTFS
df -Th | grep fuse

They will tell us which ntfs-3g programs are installed, what version of Suse is running, what ntfs partitions exist on your machine, what ntfs partitions are mounted in fstab and how and what ntfs partitions are mounted regardless of how they are mounted. Don’t forget to do su first.

On Wed, 13 Aug 2008 11:56:03 GMT
hitechchef <hitechchef@no-mx.forums.opensuse.org> wrote:

>
> Hi Eveyone,
>
> Thanks for advice. However even after scanning and formatting the
> ddrives i am unable t change the permissions.
>
> Nittin:?
>
>

What exactly do you mean by “permissions” ? microsoft’s and linux’s idea of
permissions aren’t always the same.

Seems like you have two internal drives, one all ntfs, one split with two
partitions, ntfs/linux.

Are they being mounted read-only (ro)? Are they ‘dirty’? ntfs-3g won’t (by
default) mount any ntfs partitions if they’re not ‘clean’. You can force it,
but it still complains. Best to boot to windows, chkdsk, then properly
shutdown to reboot back into linux.

Still don’t understand what you want by ‘permissions’. To be able to write
to the drive? To allow only root to write to drive? to allow users to write
to drive?

Please post the contents of your /etc/fstab file.

Loni


L R Nix
lornix@lornix.com

Hello everyone,

Sorry, I went out of town for a few days.

By permissions I meant read/write permissions on Hard drives.

Yes, I have 2 hard drives. Seagate 320G. This is partitioned into 125G for Linux and 175G NTFS. Hitachi 500G. This is all NTFS.

They are mounted read/write for root. But in normal login they are reead only.

I formatted both drives, and also ran scandisk from Windows. Still no luck.

Results of the commands are :

linux-neon:/home/nittin # rpm -qa ntfs-3g
ntfs-3g-1.2506-5.1

linux-neon:/home/nittin # rpm -qa ntfs-config
ntfs-config-1.0.1-99.1

linux-neon:/home/nittin # cat /etc/SuSE-release
openSUSE 11.0 (X86-64)
VERSION = 11.0

linux-neon:/home/nittin # cat /etc/fstab
/dev/disk/by-id/scsi-SATA_ST3320620AS_6QF45FF3-part5 swap swap defaults 0 0
/dev/disk/by-id/scsi-SATA_ST3320620AS_6QF45FF3-part6 / ext3 acl,user_xattr 1 1
/dev/disk/by-id/scsi-SATA_ST3320620AS_6QF45FF3-part7 /home ext3 acl,user_xattr 1 2
/dev/disk/by-id/scsi-SATA_MAXTOR_6L040J2_362209121618-part1 /windows/C ntfs-3g users,gid=users,fmask=133,dmask=022,locale=en_US.UTF-8 0 0
/dev/disk/by-id/scsi-SATA_ST3320620AS_6QF45FF3-part1 /windows/D ntfs-3g users,gid=users,fmask=133,dmask=022,locale=en_US.UTF-8 0 0
/dev/disk/by-id/scsi-SATA_Hitachi_HDP7250_GEB531RE0YWR4B-part1 /windows/E ntfs-3g users,gid=users,fmask=133,dmask=022,locale=en_US.UTF-8 0 0
proc /proc proc defaults 0 0
sysfs /sys sysfs noauto 0 0
debugfs /sys/kernel/debug debugfs noauto 0 0
usbfs /proc/bus/usb usbfs noauto 0 0
devpts /dev/pts devpts mode=0620,gid=5 0 0

linux-neon:/home/nittin # df -Th | grep fuse
/dev/sdb1 fuseblk 38G 4.6G 33G 13% /windows/C
/dev/sdc1 fuseblk 176G 109G 68G 62% /windows/D
/dev/sdd1 fuseblk 466G 98G 369G 21% /windows/E

linux-neon:/home/nittin # fdisk -|| grep NTFS

Unable to open -

Thanks for patience.

Nittin

On Fri, 22 Aug 2008 12:26:01 GMT
hitechchef <hitechchef@no-mx.forums.opensuse.org> wrote:

> Yes, I have 2 hard drives. Seagate 320G. This is partitioned into 125G
> for Linux and 175G NTFS. Hitachi 500G. This is all NTFS.
>
> They are mounted read/write for root. But in normal login they are
> reead only.
>
> I formatted both drives, and also ran scandisk from Windows. Still no
> luck.
>
> linux-neon:/home/nittin # cat /etc/fstab
> /dev/disk/by-id/scsi-SATA_MAXTOR_6L040J2_362209121618-part1 /windows/C
> ntfs-3g
> users,gid=users,fmask=133,dmask=022,locale=en_US.UTF-8 0 0
> /dev/disk/by-id/scsi-SATA_ST3320620AS_6QF45FF3-part1 /windows/D
> ntfs-3g users,gid=users,fmask=133,dmask=022,locale=en_US.UTF-8 0 0
> /dev/disk/by-id/scsi-SATA_Hitachi_HDP7250_GEB531RE0YWR4B-part1
> /windows/E ntfs-3g
> users,gid=users,fmask=133,dmask=022,locale=en_US.UTF-8 0 0

Actually, looks like there’s three drives in the system, a Seagate 320GB, a
Maxtor 40GB and the Hitachi 500GB… but that’s not the issue.

I believe you cannot get WRITE access to the files because you’ve masked it
out.

The fmask and dmask options to ntfs-3g act as ‘blocks’ to the permissions
actually show to a user.

Think of the permissions as the triplets:

rwxrwxrwx = 777

The fmask=133 options TURNS OFF those bits… so you get

rwxrwxrwx = 777
–x-wx-wx = 133 (these are cleared)

rw-r–r-- = 644 (all that is given)

Your dmask = 022, so:

rwxrwxrwx = 777
----w–w- = 022 (to be cleared)

rwxr-xr-x = 755 (passed to system)

The question now is… who’s the owner? You’ve got ‘users’ in the mount
options, meaning that any user should be able to mount and umount the
partitions… but when they’re initially mounted… who owns the mounts?

If they’re automounted at boot, then the owner at that time would be root…
and since root owns the mount, everyone else (group and other), get read only
access.

Adding the ‘noauto’ option should help resolve this, although someone would
have to mount the fuse mounts at some time.

Hope this helps

Loni


L R Nix
lornix@lornix.com

All you need is a simple edit.

Avoid the fake Linux permissions for NTFS (gid, fmask, dmask).
Avoid making it mountable by users (users – you don’t want it mountable by users, you just want it mounted automatically on boot).
Just make it as the NTFS creators intended – world writable. Change these:

/dev/disk/by-id/scsi-SATA_MAXTOR_6L040J2_362209121618-part1 /windows/C ntfs-3g users,gid=users,fmask=133,dmask=022,locale=en_US.UTF-8 0 0
/dev/disk/by-id/scsi-SATA_ST3320620AS_6QF45FF3-part1 /windows/D ntfs-3g users,gid=users,fmask=133,dmask=022,locale=en_US.UTF-8 0 0
/dev/disk/by-id/scsi-SATA_Hitachi_HDP7250_GEB531RE0YWR4B-part1 /windows/E ntfs-3g users,gid=users,fmask=133,dmask=022,locale=en_US.UTF-8 0 0

to these

/dev/disk/by-id/scsi-SATA_MAXTOR_6L040J2_362209121618-part1 /windows/C ntfs-3g defaults,locale=en_US.UTF-8 0 0
/dev/disk/by-id/scsi-SATA_ST3320620AS_6QF45FF3-part1 /windows/D ntfs-3g defaults,locale=en_US.U TF-8 0 0
/dev/disk/by-id/scsi-SATA_Hitachi_HDP7250_GEB531RE0YWR4B-part1 /windows/E ntfs-3g defaults,locale=en_US.UTF-8 0 0

Which is really a matter of replacing this bit:

users,gid=users,fmask=133,dmask=022

with this bit:

defaults

You can open the file fstab (which is a text file) for editing in a KDE text editor with this command in a console:

kdesu kwrite /etc/fstab

or if you use Gnome then this is Gnome’s call:

gnomesu gedit /etc/fstab

Luck

PS the scripting in this bulletin board has a bug and sometimes changes “UTF” to “U space TF”. “UTF” is a single word.

Hello everbody,

I have the same problem as hitechchef, I have followed all the steps mentioned here and still no luck.

I just want to be able to write to the ntfss as a plain user. I can somehow as super user.

Thanks to you all who keep this forum working.

Hello everbody,

I have the same problem as hitechchef, I have followed all the steps mentioned here and still no luck.

I just want to able to write to the ntfs partitions as a plain user not just as Super User.
I remember there was a problem with the partitions before installing OpenSuse11 but I used chkdsk /f in windows and I think everything was fixed for I was then able to install OpenSuse. And also later read the ntfs partitions running Linux

Thanks to you all who keep this forum working.

Please post the dialogue you get in a console when you enter these commands:
sudo /sbin/fdisk -l | grep NTFS
df -TH | grep fuseblk
cat /etc/fstab | grep ntfs-3g

numberone@linux-4zpk:~> sudo /sbin/fdisk -l | grep NTFS
root’s password:
/dev/sda1 1 1043 8377866 7 HPFS/NTFS
/dev/sda5 1146 3972 22707846 7 HPFS/NTFS
numberone@linux-4zpk:~> df -TH | grep fuseblk
/dev/sda5 fuseblk 24G 13G 12G 53% /media/hda20
/dev/sda1 fuseblk 8.6G 1.9G 6.8G 22% /media/hda22
numberone@linux-4zpk:~> cat /etc/fstab | grep ntfs-3g
/dev/disk/by-id/scsi-SATA_IC25N040ATCS04-_CSH409DLGUW96B-part5 /media/hda20 ntfs-3g defaults,locale=en_GB.UTF-8 0 0
/dev/disk/by-id/scsi-SATA_IC25N040ATCS04-_CSH409DLGUW96B-part1 /media/hda22 ntfs-3g defaults,locale=en_GB.UTF-8 0 0
numberone@linux-4zpk:~>

This how I divided the hard disk:
First partition, about 8.5GB, primary, ntfs for WindowsXP.
Second partition, about 800MB, primary, swap.
Third partition, about 23GB, primary, extended, containing a logical ntfs, for data storage purposes.
Fourth partition, about 7.5GB, primary, ext3, for Linux.

This is what came to my mind at that moment. Maybe it was not a very good a idea.

Thanks for the attention.

That partitioning looks unusual but at the same time it looks OK to me.
fdisk says Linux sees the partitions as NTFS
df says that they are mounted and contain real files
fstab says that they should be mounted read/write for someone with the locale set to Great Britain.

So I can’t see a problem unless the filesystem has the so-called dirty flag set. Anyway, let’s look deeper; here is a question and a few experiments:

I think you have tried to schedule a run of chkdsk /f from inside windows and received the message to confirm to run it on next boot. And you booted and it did not run. Is that right?

Try these experiments: open a console and enter the command su to get rootly powers.
Then enter this command and post the results back here (I want to see what’s in hda22 and if anything, what the permissions are):
ls -l /media/hda22
Then enter this command to unmount the sda1 drive:
umount /dev/sda1
Then run this command and post the result here (I want to see the permissions on hda22):
ls -l /media
Then enter this command in the console to mount the drive again (I want to see if there are error messages) and post the results back here:
ntfs-3g /dev/sda1 /media/hda22
Then execute this command and post the results back here:
ls -l /media/hda22
Finally, let’s see what packages are installed. Enetr this com,mand and post back here:
rpm -qa | grep ntfs
and this command to check the version:
cat /etc/SuSE-release

numberone@linux-4zpk:~> su
Password:
linux-4zpk:/home/numberone # ls -l /media/hda22
total 688441
drwxrwxrwx 1 root root 4096 2008-08-09 16:36 Archivos de programa
-rwxrwxrwx 1 root root 4952 2002-09-10 22:00 Bootfont.bin
-rwxrwxrwx 1 root root 193 2008-08-09 11:57 boot.ini
drwxrwxrwx 1 root root 4096 2008-08-09 16:30 Documents and Settings
-rwxrwxrwx 1 root root 47580 2002-09-10 22:00 NTDETECT.COM
-rwxrwxrwx 1 root root 234752 2002-09-10 22:00 ntldr
-rwxrwxrwx 1 root root 704643072 2008-08-23 22:26 pagefile.sys
drwxrwxrwx 1 root root 0 2008-08-22 02:21 RECYCLER
drwxrwxrwx 1 root root 0 2008-08-09 16:28 System Volume Information
drwxrwxrwx 1 root root 16384 2008-08-09 16:30 WINDOWS
linux-4zpk:/home/numberone # umount /dev/sda1
linux-4zpk:/home/numberone # ls -l /media
total 8
drwxrwxrwx 1 root root 4096 2008-08-19 23:44 hda20
drwxr-xr-x 2 root root 4096 2008-08-10 15:34 hda22
linux-4zpk:/home/numberone # ntfs-3g /dev/sda1 /media/hda22
linux-4zpk:/home/numberone # ls -l /media/hda22
total 688441
drwxrwxrwx 1 root root 4096 2008-08-09 16:36 Archivos de programa
-rwxrwxrwx 1 root root 4952 2002-09-10 22:00 Bootfont.bin
-rwxrwxrwx 1 root root 193 2008-08-09 11:57 boot.ini
drwxrwxrwx 1 root root 4096 2008-08-09 16:30 Documents and Settings
-rwxrwxrwx 1 root root 47580 2002-09-10 22:00 NTDETECT.COM
-rwxrwxrwx 1 root root 234752 2002-09-10 22:00 ntldr
-rwxrwxrwx 1 root root 704643072 2008-08-23 22:26 pagefile.sys
drwxrwxrwx 1 root root 0 2008-08-22 02:21 RECYCLER
drwxrwxrwx 1 root root 0 2008-08-09 16:28 System Volume Information
drwxrwxrwx 1 root root 16384 2008-08-09 16:30 WINDOWS
linux-4zpk:/home/numberone # rpm -qa | grep ntfs
ntfs-3g-1.2506-5.1
ntfsprogs-1.13.1-80.1
ntfs-config-1.0.1-99.1
linux-4zpk:/home/numberone # cat /etc/SuSE-release
openSUSE 11.0 (i586)
VERSION = 11.0
linux-4zpk:/home/numberone #