Bug 103809

Summary: NTFS partitions mounted by subfs are rw
Product: [openSUSE] SUSE LINUX 10.0 Reporter: peter czanik <peter>
Component: OtherAssignee: Danny Kukawka <dkukawka>
Status: VERIFIED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: dkukawka
Version: Beta 3   
Target Milestone: ---   
Hardware: i686   
OS: All   
Whiteboard:
Found By: Other Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description peter czanik 2005-08-10 13:40:45 UTC
NTFS partitions mounted by subfs (on removable devices) are 'rw'! This should be
changed back to good, old 'ro', as now, if I only 'ls' the partition, I have to
run chkdsk on next boot. NTFS partitions on nonremovable devices are mounted
'ro', and have no problem at all.
Comment 1 peter czanik 2005-08-28 08:33:20 UTC
I talked to one of the NTFS driver developers. "chkdsk" is intentional, and the
NTFS driver shouldn't cause any problems. I would still prefer to have
partitions in 'ro', as  the driver is pretty limited (no new files, just
overwrite/append, etc.) and does not provide full functionality.
Comment 2 Danny Al-Gaaf 2005-08-29 12:55:54 UTC
What is the entry in /etc/fstab for this harddisk? what say 'mount' ? Is this a 
external or in system harddisk?
Comment 3 peter czanik 2005-08-29 17:58:15 UTC
There is no fstab entry, it's a portable USB HDD, plugged in when needed.
Comment 4 Danny Al-Gaaf 2005-08-29 18:53:26 UTC
and the other question? What say 'mount' ? Could you please attach 
/var/log/messages after plugin the device? Is this already the behavior with a 
beta 3?
Comment 5 peter czanik 2005-08-29 19:07:16 UTC
It's the behavior from beta1 to beta3.

czanik@linux:~> mount
/dev/hda3 on / type reiserfs (rw,acl,user_xattr)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
tmpfs on /dev/shm type tmpfs (rw)
devpts on /dev/pts type devpts (rw,mode=0620,gid=5)
/dev/hda1 on /windows/C type ntfs
(ro,noexec,nosuid,nodev,gid=100,umask=0002,nls=utf8)
/dev/hda5 on /windows/D type vfat
(rw,noexec,nosuid,nodev,gid=100,umask=0002,utf8=true)
usbfs on /proc/bus/usb type usbfs (rw)
/dev/fd0 on /media/floppy type subfs (rw,nosuid,nodev,sync,fs=floppyfss,procuid)
/dev/sda1 on /media/usbdisk type subfs (rw,nosuid,nodev,sync,fs=reiserfs)
/dev/sda6 on /media/H_SZEMET type subfs (rw,nosuid,nodev,sync,fs=ntfs,nls=utf8)
/dev/sda5 on /media/H_ADAT type subfs
(rw,nosuid,nodev,sync,fs=floppyfss,procuid,utf8=true)

/var/log/messages:
Aug 29 20:59:52 linux kernel: usb 4-1: new high speed USB device using ehci_hcd
and address 2
Aug 29 20:59:52 linux kernel: SCSI subsystem initialized
Aug 29 20:59:52 linux kernel: Initializing USB Mass Storage driver...
Aug 29 20:59:52 linux kernel: scsi0 : SCSI emulation for USB Mass Storage devices
Aug 29 20:59:52 linux kernel: usb-storage: device found at 2
Aug 29 20:59:52 linux kernel: usb-storage: waiting for device to settle before
scanning
Aug 29 20:59:52 linux kernel: usbcore: registered new driver usb-storage
Aug 29 20:59:52 linux kernel: USB Mass Storage support registered.
Aug 29 21:00:00 linux kernel:   Vendor: ST380021  Model: A                 Rev: 3.19
Aug 29 21:00:00 linux kernel:   Type:   Direct-Access                      ANSI
SCSI revision: 00
Aug 29 21:00:00 linux kernel: usb-storage: device scan complete
Aug 29 21:00:00 linux kernel: SCSI device sda: 156301488 512-byte hdwr sectors
(80026 MB)
Aug 29 21:00:00 linux kernel: sda: assuming drive cache: write through
Aug 29 21:00:00 linux kernel: SCSI device sda: 156301488 512-byte hdwr sectors
(80026 MB)
Aug 29 21:00:00 linux kernel: sda: assuming drive cache: write through
Aug 29 21:00:00 linux kernel:  sda: sda1 sda2 < sda5 sda6 >
Aug 29 21:00:00 linux kernel: Attached scsi disk sda at scsi0, channel 0, id 0,
lun 0
Aug 29 21:00:01 linux hal-subfs-mount[5892]: registered at resmgrd and called(0)
/bin/mount -t subfs -o fs=reiserfs,sync,nosuid,nodev,exec /dev/sda1 "/medi
a/usbdisk"
Aug 29 21:00:01 linux kernel: ReiserFS: sda1: found reiserfs format "3.6" with
standard journal
Aug 29 21:00:01 linux kernel: ReiserFS: sda1: using ordered data mode
Aug 29 21:00:01 linux kernel: ReiserFS: sda1: journal params: device sda1, size
8192, journal first block 18, max trans len 1024, max batch 900, max commit
 age 30, max trans age 30
Aug 29 21:00:01 linux kernel: ReiserFS: sda1: checking transaction log (sda1)
Aug 29 21:00:01 linux kernel: ReiserFS: sda1: Using r5 hash to sort names
Aug 29 21:00:02 linux hal-subfs-mount[5909]: registered at resmgrd and called(0)
/bin/mount -t subfs -o fs=ntfs,sync,nosuid,nodev,exec,nls=utf8 /dev/sda6 "
/media/H_SZEMET"
Aug 29 21:00:02 linux kernel: NTFS volume version 3.1.
Aug 29 21:00:02 linux kernel: NTFS-fs error (device sda6): ntfs_check_logfile():
The two restart pages in $LogFile do not match.
Aug 29 21:00:02 linux kernel: NTFS-fs error (device sda6): load_system_files():
Failed to load $LogFile.  Mounting read-only.  Mount in Windows.
Aug 29 21:00:02 linux hal-subfs-mount[5918]: registered at resmgrd and called(0)
/bin/mount -t subfs -o fs=floppyfss,sync,procuid,nosuid,nodev,exec,utf8=tr
ue /dev/sda5 "/media/H_ADAT"
Aug 29 21:00:38 linux kernel: end_request: I/O error, dev fd0, sector 0
Aug 29 21:00:38 linux kernel: end_request: I/O error, dev fd0, sector 0
Aug 29 21:00:38 linux kernel: end_request: I/O error, dev fd0, sector 0
Aug 29 21:00:38 linux submountd: mount failure, No such device or address
Aug 29 21:00:38 linux kernel: end_request: I/O error, dev fd0, sector 0
Aug 29 21:00:38 linux kernel: subfs: unsuccessful attempt to mount media (256)

Comment 6 Danny Al-Gaaf 2005-08-29 23:47:38 UTC
@Adrian: Any ideas? should we mount by default rw or not? I'm no preferences, 
since the write support for ntfs from kernel is more than useless normally.
Comment 7 Adrian Schröter 2005-08-30 05:10:13 UTC
we should go to ro mode, imho. but it should be configurable within HAL. 
Comment 8 Ulrich Lange 2005-09-03 06:24:59 UTC
The problem is sill there in beta 4 and makes not really sense to show rw and
than ... no rights for writing (see below). Please change to ro otherwise it is
confusing for someone.

mount
/dev/hda2 on / type reiserfs (rw,acl,user_xattr)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
tmpfs on /dev/shm type tmpfs (rw)
devpts on /dev/pts type devpts (rw,mode=0620,gid=5)
usbfs on /proc/bus/usb type usbfs (rw)
/dev/sda1 on /media/Data_Extern type subfs (rw,nosuid,nodev,sync,fs=ntfs,nls=utf8)

ls -lia /
 15 drwxr-xr-x    5 root root    136 Sep  3 17:01 media

ls -lia /media
17915 drwxrwxrwx   1 root root   0 Sep  3 17:01 Data_Extern
   16 drwxr-xr-x   2 root root  48 Sep  3 11:16 cdrecorder
   17 drwxr-xr-x   2 root root  48 Sep  3 11:16 cdrom

ls -lia /media/Data_Extern
 27 drwx------  1 root root    0 Sep 30  2004 RECYCLER
 33 drwx------  1 root root    0 Sep 29  2004 System Volume Information
 57 drwx------  1 root root    0 Oct 18  2004 Temp

echo "jkhsfjkhnsfkjs" > test.txt
bash: test.txt: Permission denied
Comment 9 Danny Al-Gaaf 2005-09-03 11:45:46 UTC
Nobody sad that this issue is fixed.
Comment 10 Danny Al-Gaaf 2005-09-04 18:30:35 UTC
fixed now in SVN for RC1