changing ownership of NTFS drive

Asked by Doug

I have a Seagate freeagent desk 1.5 TB USB drive

This drive was used to back up my windows XP computer before the XP operating system became beyond repair and I and changed over from dual boot XP / UBUNTU 11.10 to UBUNTU12.04 and the 2 USB drives would not mount at the same time. I changed back to UBUNTU 11.10.

I used the Seagate Manager to do the backups

I had a problem with the drive being read only I am now able to write to the folders but during the process all the existing files and folders became owned by ROOT and now Root will not allow me to take back ownership of the files and they have become read only so all my back ups can not be updated.

I tried both suggested codes

sudo chown -R $USER /media/FreeAgent

sudo chown -R douglas /media/FreeAgent

and

sudo chmod -R 777 /media/FreeAgent

neither of these codes take back ownership of the folders and files and changed the permission on the files to read only

Can anyone help

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu util-linux Edit question
Assignee:
No assignee Edit question
Solved by:
Doug
Solved:
Last query:
Last reply:
Revision history for this message
Doug (douglasblackusa-b) said :
#1

douglas@douglas-Satellite-A105:~$ sudo fdisk -l; lsb_release -a; uname -a
[sudo] password for douglas:

Disk /dev/sda: 100.0 GB, 100030242816 bytes
255 heads, 63 sectors/track, 12161 cylinders, total 195371568 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000ebfed

   Device Boot Start End Blocks Id System
/dev/sda1 * 2048 193294335 96646144 83 Linux
/dev/sda2 193296382 195371007 1037313 5 Extended
/dev/sda5 193296384 195371007 1037312 82 Linux swap / Solaris

Disk /dev/sdb: 1500.3 GB, 1500301908992 bytes
255 heads, 63 sectors/track, 182401 cylinders, total 2930277166 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x5a4e52e5

   Device Boot Start End Blocks Id System
/dev/sdb1 * 63 2930276351 1465138144+ 7 HPFS/NTFS/exFAT

Disk /dev/sdc: 8004 MB, 8004304896 bytes
19 heads, 5 sectors/track, 164562 cylinders, total 15633408 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000de021

   Device Boot Start End Blocks Id System
/dev/sdc1 2048 15632383 7815168 b W95 FAT32
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 11.10
Release: 11.10
Codename: oneiric
Linux douglas-Satellite-A105 3.0.0-19-generic #33-Ubuntu SMP Thu Apr 19 19:05:57 UTC 2012 i686 i686 i386 GNU/Linux
douglas@douglas-Satellite-A105:~$

Revision history for this message
Doug (douglasblackusa-b) said :
#2

douglas@douglas-Satellite-A105:~$ sudo mount ; cat /etc/fstab ; id
[sudo] password for douglas:
/dev/sda1 on / type ext4 (rw,errors=remount-ro,commit=0)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
udev on /dev type devtmpfs (rw,mode=0755)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)
none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)
none on /run/shm type tmpfs (rw,nosuid,nodev)
/dev/sdb1 on /media/FreeAgent type fuseblk (rw,nosuid,nodev,allow_other,blksize=4096)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
gvfs-fuse-daemon on /home/douglas/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=douglas)
/dev/sdc1 on /media/scandisk type vfat (rw,nosuid,nodev,uid=1000,gid=1000,shortname=mixed,dmask=0077,utf8=1,showexec,flush,uhelper=udisks)
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>

proc /proc proc nodev,noexec,nosuid 0 0
#Entry for /dev/sda1 :
UUID=42798daa-5b5b-425c-bd8a-111d25f92736 / ext4 errors=remount-ro 0 1
#Entry for /dev/sdb1 :
UUID=5288BFD688BFB737 /media/FreeAgent ntfs-3g defaults,nosuid,nodev,locale=en_US.UTF-8 0 0
#Entry for /dev/sda5 :
UUID=6a29db4b-5b2c-403b-a40b-4698379876e9 none swap sw 0 0

uid=1000(douglas) gid=1000(douglas) groups=1000(douglas),4(adm),20(dialout),24(cdrom),46(plugdev),116(lpadmin),118(admin),124(sambashare)
douglas@douglas-Satellite-A105:~$

Revision history for this message
Doug (douglasblackusa-b) said :
#3

# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>

proc /proc proc nodev,noexec,nosuid 0 0
#Entry for /dev/sda1 :
UUID=42798daa-5b5b-425c-bd8a-111d25f92736 / ext4 errors=remount-ro 0 1
#Entry for /dev/sdb1 :
UUID=5288BFD688BFB737 /media/FreeAgent ntfs-3g defaults,nosuid,nodev,locale=en_US.UTF-8, UID=1000,GID=1000,umask=1000 0 0

#Entry for /dev/sda5 :
UUID=6a29db4b-5b2c-403b-a40b-4698379876e9 none swap sw 0 0

this does not work

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#4

NTFS cannot have it's ownerships and such changed using chown and chmod. You need to set the owner and access when you mount the device.

sudo chown -R $USER /media/FreeAgent
sudo chown -R douglas /media/FreeAgent

Are the same difference.

Revision history for this message
Doug (douglasblackusa-b) said :
#5

So How do I change this in fstab to change ownership of the files.

UUID=5288BFD688BFB737 /media/FreeAgent ntfs-3g defaults,nosuid,nodev,locale=en_US.UTF-8, UID=1000, GID=1000, umask=1000 0 0

Revision history for this message
Doug (douglasblackusa-b) said :
#6

This line sorted it in Fstab

/dev/sdb1 /media/FreeAgent ntfs nls=iso8859-1,umask=000,sync,utf8,gid=douglas,user,dirsync,uid=douglas 0 0