SOLVED: Additional drives mount as read-only

I’m using openSUSE 11.2, with some eSATA hard drives. For some reason, they’re set to read-only, and I can’t change it. I set parameters in fstab as fmask=113,dmask=002,umask=0002,rw

Oddly, I was able to delete a file in there, but my samba users have read-only access, and I can’t use chown or chmod: I get no error message, but nothing happens.

I’m guessing that these are NTFS drives mounted in the openSUSE operating system.
Q1: Is that right.
Q2: Are you sharing them by Samba to windows machines or to Linux machines?
Q3: are they USB attached drives or internal drives?
Q4: do you want to write to these partitions directly from the installed openSUSE O/S, or over the network, or both?

Please post here the returns you get when you run these commands in a console window:

  • cat /etc/fstab
  • sudo /sbin/fdisk -l
  • testparm -s

Thanks – that should clue us in

PS you can’t chown or chmod fat or ntfs drives, you control those from the mount options.

A1: Yes.
A2: Windows machines.
A3: They’re eSATA drives, which I believe openSUSE recognises as internal drives.
A4: Both.

cat /etc/fstab
/dev/disk/by-id/ata-Crucial_CT64GBFAA0_-part1 swap                 swap       defaults              0 0
/dev/disk/by-id/ata-Crucial_CT64GBFAA0_-part2 /                    ext4       acl,user_xattr        1 1
/dev/disk/by-id/ata-Crucial_CT64GBFAA0_-part3 /home                ext4       acl,user_xattr        1 2
/dev/disk/by-id/ata-WDC_WD5000AACS-00ZUB0_WD-WCASU2295671-part1 /windows/C           ntfs-3g    users,gid=users,fmask=113,dmask=002,umask=0002,rw,locale=en_US.UTF-8 0 0
/dev/disk/by-id/ata-WDC_WD10EADS-00L5B1_WD-WCAU4C282604-part1 /windows/D           ntfs-3g    users,gid=users,fmask=113,dmask=002,locale=en_US.UTF-8 0 0
/dev/disk/by-id/ata-WDC_WD10EADS-00L5B1_WD-WCAU4C273831-part1 /windows/E           ntfs-3g    users,gid=users,fmask=113,dmask=002,locale=en_US.UTF-8 0 0
/dev/disk/by-id/ata-WDC_WD10EADS-00L5B1_WD-WCAU4C271264-part1 /windows/F           ntfs-3g    users,gid=users,fmask=113,dmask=002,locale=en_US.UTF-8 0 0
/dev/disk/by-id/ata-WDC_WD10EADS-00M2B0_WD-WMAV50267588-part1 /windows/G           ntfs-3g    users,gid=users,fmask=113,dmask=002,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
/sbin/fdisk -l

Disk /dev/sda: 66.0 GB, 66018344960 bytes
255 heads, 63 sectors/track, 8026 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00063a37

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1         262     2104483+  82  Linux swap / Solaris
/dev/sda2   *         263        2873    20972857+  83  Linux
/dev/sda3            2874        8026    41391472+  83  Linux

Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xfee6fee6

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1       60801   488384001    7  HPFS/NTFS

Disk /dev/sdc: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000613b2

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1               1      121601   976760001    7  HPFS/NTFS

Disk /dev/sdd: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000caba5

   Device Boot      Start         End      Blocks   Id  System
/dev/sdd1               1      121601   976760001    7  HPFS/NTFS

Disk /dev/sde: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000794d7

   Device Boot      Start         End      Blocks   Id  System
/dev/sde1               1      121601   976760001    7  HPFS/NTFS

Disk /dev/sdf: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x0009b5df

   Device Boot      Start         End      Blocks   Id  System
/dev/sdf1               1      121601   976760001    7  HPFS/NTFS

Disk /dev/sdg: 1030 MB, 1030225920 bytes
4 heads, 3 sectors/track, 167680 cylinders
Units = cylinders of 12 * 512 = 6144 bytes
Disk identifier: 0xedf0edf0

   Device Boot      Start         End      Blocks   Id  System
/dev/sdg1              21      167680     1005958+   b  W95 FAT32
testparm -s
Load smb config files from /etc/samba/smb.conf
Processing section "[profiles]"
Processing section "[printers]"
Processing section "[print$]"
Processing section "[file-server]"
Loaded services file OK.
Server role: ROLE_STANDALONE
[global]
	workgroup = TRINITY
	netbios name = FAMILY-SERVER
	map to guest = Bad User
	passdb backend = smbpasswd
	name resolve order = wins bcast host lmhosts
	printcap name = cups
	add machine script = /usr/sbin/useradd  -c Machine -d /var/lib/nobody -s /bin/false %m$
	os level = 65
	preferred master = Yes
	domain master = Yes
	idmap uid = 10000-20000
	idmap gid = 10000-20000
	cups options = raw

[profiles]
	comment = Network Profiles Service
	path = %H
	read only = No
	create mask = 0600
	directory mask = 0700
	store dos attributes = Yes

[printers]
	comment = All Printers
	path = /var/tmp
	create mask = 0600
	printable = Yes
	browseable = No
	browsable = No

[print$]
	comment = Printer Drivers
	path = /var/lib/samba/drivers
	write list = @ntadmin, root
	force group = ntadmin
	create mask = 0664
	directory mask = 0775

[file-server]
	comment = Shared files
	path = /windows/C
	read only = No
	inherit acls = Yes

Thanks. It would also be helpful to know how to set the owner at mount time.

What a coincidence, did we fully cover that over here:
Samba problem: not showing on the network - openSUSE Forums

If we did I’ll close the thread as solved

??

Oddly, yes… but my problems aren’t over yet (check the original thread).

Try editing each windows entry in fstab like this

ntfs-3g defaults 0 0

so one of your examples:

/dev/disk/by-id/ata-WDC_WD10EADS-00L5B1_WD-WCAU4C282604-part1 /windows/D           ntfs-3g defaults 0 0

reboot required

Carl that’s absolutely the correct answer in normal circumstances. However the OP has additional requirements that you would not know about because they’re in another thread ==> The partition is being shared over a Samba workgroup, as outlined here:
Samba problem: not showing on the network - openSUSE Forums

and for that case OP needs to match the share permissions with the mount permissions like so:
ntfs-3g options string:

uid=billybob,gid=users,umask=0022

samba share code to match:

[file-server]
comment = Shared files
path = /windows/C
force user = billybob
guest ok = yes
read only = No

FYI and FWIW :slight_smile: