Results 1 to 6 of 6

Thread: Can not change ownership of hard drive

  1. #1
    Join Date
    Sep 2009
    Location
    London
    Beans
    986

    Can not change ownership of hard drive

    I am using a seperate hard drive for all my document storage. As I have a dual boot Windows to allow me to use the odd program that will only work on Windows it is formatted to NTFS. It mounts, using fstab as follows...
    Code:
    #Entry for /dev/sda3 :
    UUID=XXXXXXXXXXX	/media/Documents	ntfs-3g	defaults,rw, uid=1000,locale=en_GB.UTF-8	0	0
    The Directory and all its contents are opening as root. This is a problem because it means anything I store there is also owned by root and can mean that some days nothing works, i.e. I can't copy, delete or even store things in these folders. I say sometimes, because sometimes, it seems to allow me, but mostly I have little control.

    I have tried opening Nautilus as root and changing permissions and ownership but it reverts back.

    How can I fix this, please?

  2. #2
    Join Date
    Jun 2006
    Location
    UK
    Beans
    Hidden!
    Distro
    Ubuntu 18.04 Bionic Beaver

    Re: Can not change ownership of hard drive

    You are showing a space between two of your mount options in your fstab line, thus:

    Code:
    defaults,rw, uid=1000,locale=en_GB.UTF-8
    Assuming that wasn't a transcription error in your post, remove the space so that the options read:

    Code:
    defaults,rw,uid=1000,locale=en_GB.UTF-8
    Unmount and remount the partition and see if that fixes it. If not, hopefully someone with more knowledge of mounting ntfs filesystems will be along to help.
    Ubuntu 16.04 Desktop Guide - Ubuntu 18.04 Desktop Guide - Forum Guide to BBCode - Using BBCode code tags - IRC #ubuntuforums

    Member: Not Canonical Team

    Please do not PM me about your forum account unless you have been asked to. The correct place to contact an admin about your account is here.

  3. #3
    Join Date
    Sep 2009
    Location
    London
    Beans
    986

    Re: Can not change ownership of hard drive

    Quote Originally Posted by coffeecat View Post
    You are showing a space between two of your mount options in your fstab line, thus:

    Code:
    defaults,rw, uid=1000,locale=en_GB.UTF-8
    Assuming that wasn't a transcription error in your post, remove the space so that the options read:

    Code:
    defaults,rw,uid=1000,locale=en_GB.UTF-8
    Unmount and remount the partition and see if that fixes it. If not, hopefully someone with more knowledge of mounting ntfs filesystems will be along to help.
    Thank you.
    will give it a go. just changed fstab, will see what happens next reboot. My concern is that Windows MIGHT be locking it....

  4. #4
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: Can not change ownership of hard drive

    Then tell Windows to properly close the file system always at shutdown.

    Changing permissions doesn't work on NTFS file systems under Linux. The permissions are set at mount time for all the files and directories. There are mount options to control them, but they are for all files and all directories. Using a Linux file system is better for that reason, but also because Linux file systems like ext4 use kernel drivers, so they aren't so slow, like NTFS.

    I use these options when mounting NTFS for use by my main userid (1000:1000):
    Code:
    nodev,permissions,windows_names,nosuid,noatime,async,big_writes,timeout=2,uid=1000,gid=1000
    Some are for security, some for performance, some to force filenames that Windows will like.

  5. #5
    Join Date
    Sep 2009
    Location
    London
    Beans
    986

    Re: Can not change ownership of hard drive

    Sorry, not had any notifications. I agree about file type. I'll give your mount options a go and see what happens - fingers crossed.

  6. #6
    Join Date
    Sep 2009
    Location
    London
    Beans
    986

    Re: Can not change ownership of hard drive

    Quote Originally Posted by TheFu View Post
    Then tell Windows to properly close the file system always at shutdown.

    Changing permissions doesn't work on NTFS file systems under Linux. The permissions are set at mount time for all the files and directories. There are mount options to control them, but they are for all files and all directories. Using a Linux file system is better for that reason, but also because Linux file systems like ext4 use kernel drivers, so they aren't so slow, like NTFS.

    I use these options when mounting NTFS for use by my main userid (1000:1000):
    Code:
    nodev,permissions,windows_names,nosuid,noatime,async,big_writes,timeout=2,uid=1000,gid=1000
    Some are for security, some for performance, some to force filenames that Windows will like.

    You know what, I think that has fixed it. Thank you.
    Code:
    nodev,permissions,windows_names,nosuid,noatime,async,big_writes,timeout=2,uid=1000,gid=1000
    from
    Code:
    defaults,rw,uid=1000,locale=en_GB.UTF-8
    Thank you.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •