Accessing NTFS as non-root in 13.1?

Hi folks–

After installing 13.1/64 I was unable to access any NTFS partitions without a root password. In particular, I have a number of VMware machines on an NTFS partition. OpenSUSE itself resides on an SSD that’s too small for the VMs. VMware is unable to access the partitions unless I start it as root.

I know this is probably a security feature and not a bug, but I’m the only person who uses this machine. How can I globally allow all users to access these partitions? Running as root is not really an option. TIA!

Normally, if the NTFS partition is being mounted by openSUSE from a fstab file, I do two things. I use the fstab mount option of 1. defaults and 2. I make sure the permissions of the mount folder found in openSUSE, that resides on the openSUSE root / partition is set to 777. You are not setting any file or folder on the actual NTFS partition to 777, only the mounting folder. These two actions should allow anyone to read and write to files on the NTFS partition/formatted drive.

Thank You,

In the past I would do exactly that, hand-edit my fstab file, but 13.1 no longer includes entries for anything but the drive the OS resides on:

/dev/disk/by-id/ata-INTEL_SSDSC2CW180A3_CVCV2344027K180EGN-part2 swap swap defaults 0 0
/dev/disk/by-id/ata-INTEL_SSDSC2CW180A3_CVCV2344027K180EGN-part1 / ext4 acl,user_xattr 1 1

Is all I have. Now, I could add entries for each of the five HDDs (most with multiple partitions) attached to the system-- In the past Suse has filled in those entries in fstab already (at least it did as of oS 11.x; I skipped the 12.x series) but that’s too much like work. Also, my Mint 16 installation’s fstab is similar in that it doesn’t contain entries for the other drives either, but Mint doesn’t require root to access the partitions in question.

(Mint’s fstab)
UUID=5c7a88b5-ada9-4a49-bbc8-73c043a2108e / ext4 errors=remount-ro 0 1
UUID=df433e8d-3591-420c-aee1-0e997f81b20e /boot ext4 defaults 0 2
UUID=51905f36-f961-40fa-a081-2c3fe57579a8 none swap sw 0 0

I wonder if fstab is the tree I need to be barking up. I will try changing the permissions of the /mount directory though. Thanks!

(Yes, I know I need to add discard to fstab for my SSD, and really shouldn’t have the swapfile on it, but I have enough memory so that swap rarely gets used)

That’s true for a fresh install. But entries of your other drives don’t get removed on upgrades…
You don’t necessarily have to edit fstab manually, you can also set up your drive mounts in YaST->System->Partitioner.

Btw, I have this entry for my Windows NTFS partition, works fine with read-write access for all users:

/dev/sdb1            /windows/C           ntfs-3g    defaults              0 0

And yes, the mount point’s permissions should be 777:

# ls -l /windows/insgesamt 0
drwxrwxrwx 2 root root 48  8. Dez 2011  C

(that’s after unmounting the partition, of course… :wink: )

If you mount a partition (that’s not in fstab) on an internal drive in GNOME/KDE (e.g. by clicking on it in the file manager), you need of course the root password. (for external drives this should not be needed by default)
You can change this by adjusting the polkit privileges…

I add all drives to my /etc/fstab fie that I expect to stay connected all the time. I add the** nofail** option for external USB hard drives not being used for root / or /home. I normally use the disk by-id method to identify my drives. For edits to the /etc/fstab or any system fie as root, have a look at my blog here:

SYSEdit - System File Editor - Version 1.50 - Blogs - openSUSE Forums

Thank You,

How do I do this? I don’t get it. I’m from the Ubuntu world where NTFS partitions are mounted automatically at installation.

Many thanks!

May depend on what you do at the Installer. You can option mounting/not mounting NTFS. Buy default openSUSE will mount them as read only for normal users. You have to set that if you want normal users to have full access.

Either edit /etc/fstab manually and add a line similar to those that were posted already (that’s the way it was done looong before Ubuntu and should work on Ubuntu as well… :wink: ) , or do as I said before:

Go to “Hard Disks”, select the partition you want to mount and click on “Edit…”.
You can select there “Mount partition” and where it should be mounted to. (you can enter a path you like, AFAIK it should even be created automatically)
This will then be saved to /etc/fstab and mounted on boot.

For an NTFS partition you don’t have to change anything else.

Just be sure to not select “Format Drive”. :wink:

Wrong.
The Installer doesn’t mount them automatically anymore AFAIK. And the first post here would suggest that as well.

And setting just “defaults” as mount options does give you read/write access for all users:
/etc/fstab again:

/dev/sdb1            /windows/C           ntfs-3g    defaults              0 0

mount: (stripped)

...
/dev/sdb1 on /windows/C type fuseblk (rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other,blksize=4096)
...

ls -l /windows/C: (stripped)

drwxrwxrwx 1 root root          0 15. Mai 2011  ATI
-rwxrwxrwx 1 root root          0 26. Nov 2001  AUTOEXEC.BAT
-rwxrwxrwx 1 root root       4952 23. Aug 2001  bootfont.bin
-rwxrwxrwx 1 root root        211 26. Nov 2009  boot.ini
...

Do you believe this? :wink:

So you edit the /etc/fstab file as root and you can use the sysedit bash script if you wish. You can make a new entry or or edit an exiting one. There are many possible drive load options. Here is one example entry, made as root, for a NTFS partition, to an existing USB external hard:

/dev/disk/by-id/usb-ST1000DM_003-9YN162_1D0F65888888-0:0-part1  /Backup ntfs-3g **defaults**,discard,noatime,nodiratime,**nofail** 0 0

I highlighted two important entries. The drive is SSD which brings other settings that can be used.

Thank You,