You are not logged in.

#1 2009-04-14 15:18:18

epsilon
Member
Registered: 2009-04-02
Posts: 75

Read/write access for NFTS partitioned drive

I'm trying to enable read and write access for my user on Arch... My root can read/write to the drive in question, but the user get's a permission denied error when trying to access it.

Tell me if you need any more information. From what I understand, a chown command should allow access, but I tried the commands suggested from the folks in #archlinux and they did not work.

Additionally, I have a question regarding the nature of user accounts. If I deleted one, what information would I be losing? Only the file stored in their dir, or is there something else? I mean, all programs are system-wide, right?


mu @ freenode - Last.fm

Offline

#2 2009-04-14 15:23:35

jondkent
Member
From: London
Registered: 2005-09-13
Posts: 123

Re: Read/write access for NFTS partitioned drive

Hi,

Re your user account query; if you mean if you delete user account fred (via userdel -r fred), then this will just delete then user's home dir and their entries in the passwd and group file.

If you mean deleting system accounts, you will need to be careful, though the files within the filesystem itself will not be removed, the ownership will be revert to a number of you delete the user that owned it.  Not a big problem, just something to be aware of.  Basically, unless you really know what you are doing don't remove system accounts.

Offline

#3 2009-04-14 16:34:44

schuay
Package Maintainer (PM)
From: Austria
Registered: 2008-08-19
Posts: 564

Re: Read/write access for NFTS partitioned drive

from my personal arch help file (most of this is copy and paste from forum posts/wiki):

#mount ntfs read write
install ntfs-3g
sudo mount -t ntfs-3g /dev/sdb1 mnt/ -o uid=1000,fmask=0113,gid=100,users
i think the important part is "-t ntfs-3g"

#mount ntfs read/write automatically
If you can't write on your NTFS devices create the following file and restart hal:
/etc/hal/fdi/policy/20-ntfs-config-write-policy.fdi

<?xml version="1.0" encoding="UTF-8"?> <!-- -*- SGML -*- -->
<deviceinfo version="0.2">
    <device>
        <match key="volume.fstype" string="ntfs">
            <match key="@block.storage_device:storage.hotpluggable" bool="true">
                <merge key="volume.fstype" type="string">ntfs-3g</merge>
                <merge key="volume.policy.mount_filesystem" type="string">ntfs-3g</merge>
            </match>
        </match>
    </device>
</deviceinfo>

If you just upgraded to hal-0.5.11-7 and suddenly mounting a device stopped working for non-root users with one of these errors:

    * "PermissionDeniedByPolicy mount-removable no"
    * "PermissionDeniedByPolicy mount-removable-extra-options no"
    * "org.freedesktop.hal.storage.mount-removable no <-- (action, result)"
    * "org.freedesktop.hal.storage.mount-removable-extra-options no <-- (action, result)"you can fix the situation by editing /etc/PolicyKit/PolicyKit.conf and paste the following into the <config> section:
File: /etc/PolicyKit/PolicyKit.conf

        <match user="$USER">
        <!-- replace with your login or delete the line if you want to allow all users to manipulate devices (keep security issues in mind though) -->
                <match action="org.freedesktop.hal.storage.*">
                        <return result="yes"/>
                </match>
                <match action="hal-storage-mount-fixed-extra-options">
                <!-- for internal devices mounted with extra options like a wished mount point -->
                        <return result="yes" />
                </match>
                <match action="hal-storage-mount-removable-extra-options">
                <!-- for external devices mounted with extra options like a wished mount point -->
                        <return result="yes" />
                </match>
        </match> <!-- don't forget to delete this line if you deleted the first one -->

Restart dbus and hal. If you used KDE you will have to restart KDE as well

Last edited by schuay (2009-04-14 16:36:43)

Offline

#4 2009-04-14 17:08:02

Andy Mack
Member
Registered: 2008-06-16
Posts: 133

Re: Read/write access for NFTS partitioned drive

If you rename 20-ntfs-config-write-policy.fdi to 20-ntfs-3g-policy.fdi this should fix it.

Offline

#5 2009-04-14 19:57:44

epsilon
Member
Registered: 2009-04-02
Posts: 75

Re: Read/write access for NFTS partitioned drive

Well everything is fixed because I'm fairly dense and realized that the "Storage" icon on my desktop was reading "/media/storage" rather than... well, the correct one, which it turns out seems to be fine.

Which leads me to another question, although not very important: Why do I have a /media/storage dir and how/should I get rid of it?

Additionally, how do I unmount something? (I'm not using /etc/fstab to mount). I assume it is mount -[flag] ntfs-3g /dev/sdxy /mnt/ but I'm not sure.

Last edited by epsilon (2009-04-14 20:28:21)


mu @ freenode - Last.fm

Offline

#6 2009-04-16 07:12:37

K0tuk
Member
Registered: 2009-04-06
Posts: 125

Re: Read/write access for NFTS partitioned drive

sudo umount <path>

for example:

sudo umount /media/Windows

Offline

#7 2009-04-17 22:00:32

epsilon
Member
Registered: 2009-04-02
Posts: 75

Re: Read/write access for NFTS partitioned drive

How can I ensure that my media always mounts (instead of having to use a command at the beginning of my session for mounting it)?

Also, when I try to mount more than one drive I get a "device / resource busy" error. How do I mount more than one device?


mu @ freenode - Last.fm

Offline

Board footer

Powered by FluxBB